plotastrodata 1.9.1__tar.gz → 1.9.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plotastrodata-1.9.1/plotastrodata.egg-info → plotastrodata-1.9.2}/PKG-INFO +1 -1
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/__init__.py +1 -1
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/other_utils.py +4 -5
- {plotastrodata-1.9.1 → plotastrodata-1.9.2/plotastrodata.egg-info}/PKG-INFO +1 -1
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/LICENSE +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/MANIFEST.in +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/README.md +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/analysis_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/const_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/coord_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/ext_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/fft_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/fits_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/fitting_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/los_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/matrix_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/noise_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata/plot_utils.py +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata.egg-info/SOURCES.txt +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata.egg-info/dependency_links.txt +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata.egg-info/not-zip-safe +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata.egg-info/requires.txt +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/plotastrodata.egg-info/top_level.txt +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/setup.cfg +0 -0
- {plotastrodata-1.9.1 → plotastrodata-1.9.2}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plotastrodata
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.2
|
|
4
4
|
Summary: plotastrodata is a tool for astronomers to create figures from FITS files and perform fundamental data analyses with ease.
|
|
5
5
|
Home-page: https://github.com/yusukeaso-astron/plotastrodata
|
|
6
6
|
Download-URL: https://github.com/yusukeaso-astron/plotastrodata
|
|
@@ -35,7 +35,7 @@ def isdeg(s: str) -> bool:
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
def nearest_index(arr: np.ndarray, x: float = 0) -> int:
|
|
38
|
-
"""Get the index of the
|
|
38
|
+
"""Get the index of the input arrary that gives a value nearest to the given value x. np.searchsorted() does not work with a descending array.
|
|
39
39
|
|
|
40
40
|
Args:
|
|
41
41
|
arr (np.ndarray): Sorted array.
|
|
@@ -44,8 +44,7 @@ def nearest_index(arr: np.ndarray, x: float = 0) -> int:
|
|
|
44
44
|
Returns:
|
|
45
45
|
int: The index that gives a value nearest to x.
|
|
46
46
|
"""
|
|
47
|
-
|
|
48
|
-
return idx - 1 if x - arr[idx - 1] <= arr[idx] - x else idx
|
|
47
|
+
return np.argmin(np.abs(arr - x))
|
|
49
48
|
|
|
50
49
|
|
|
51
50
|
def trim(data: np.ndarray | None = None, x: np.ndarray | None = None,
|
|
@@ -72,8 +71,8 @@ def trim(data: np.ndarray | None = None, x: np.ndarray | None = None,
|
|
|
72
71
|
def get_bounds(arr, lim):
|
|
73
72
|
if arr is None or lim is None or None in lim:
|
|
74
73
|
return arr, 0, None
|
|
75
|
-
lo = nearest_index(arr, max(np.min(arr), lim
|
|
76
|
-
hi = nearest_index(arr, min(np.max(arr), lim
|
|
74
|
+
lo = nearest_index(arr, max(np.min(arr), np.min(lim)))
|
|
75
|
+
hi = nearest_index(arr, min(np.max(arr), np.max(lim)))
|
|
77
76
|
lo, hi = sorted((lo, hi))
|
|
78
77
|
return arr[lo:hi + 1], lo, hi + 1
|
|
79
78
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plotastrodata
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.2
|
|
4
4
|
Summary: plotastrodata is a tool for astronomers to create figures from FITS files and perform fundamental data analyses with ease.
|
|
5
5
|
Home-page: https://github.com/yusukeaso-astron/plotastrodata
|
|
6
6
|
Download-URL: https://github.com/yusukeaso-astron/plotastrodata
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|