plotastrodata 1.8.8__tar.gz → 1.8.9__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.8.8/plotastrodata.egg-info → plotastrodata-1.8.9}/PKG-INFO +1 -1
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/__init__.py +1 -1
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/plot_utils.py +19 -14
- {plotastrodata-1.8.8 → plotastrodata-1.8.9/plotastrodata.egg-info}/PKG-INFO +1 -1
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/LICENSE +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/MANIFEST.in +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/README.md +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/analysis_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/const_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/coord_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/ext_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/fft_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/fits_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/fitting_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/los_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/matrix_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/noise_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata/other_utils.py +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata.egg-info/SOURCES.txt +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata.egg-info/dependency_links.txt +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata.egg-info/not-zip-safe +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata.egg-info/requires.txt +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/plotastrodata.egg-info/top_level.txt +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/setup.cfg +0 -0
- {plotastrodata-1.8.8 → plotastrodata-1.8.9}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plotastrodata
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.9
|
|
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
|
|
@@ -308,8 +308,10 @@ def set_minmax(data: np.ndarray, stretch: str, stretchscale: float,
|
|
|
308
308
|
for k in ['vmin', 'vmax']:
|
|
309
309
|
if k not in kw:
|
|
310
310
|
kw[k] = [None] * n
|
|
311
|
-
|
|
312
|
-
|
|
311
|
+
isnan = np.equal(stretchscale, None)
|
|
312
|
+
stretchscale = np.where(isnan, sigma, stretchscale)
|
|
313
|
+
isnan = np.equal(kw['vmin'], None)
|
|
314
|
+
cmin = np.where(isnan, sigma, kw['vmin'])
|
|
313
315
|
|
|
314
316
|
argslist = (stretch, stretchscale, stretchpower)
|
|
315
317
|
for i, stretch_args in enumerate(zip(*argslist)):
|
|
@@ -861,20 +863,21 @@ class PlotAstroData(AstroFrame):
|
|
|
861
863
|
cbticks = do_stretch(cbticks, *stretch_args)
|
|
862
864
|
if cbticks is None and stretch == 'log':
|
|
863
865
|
cbticks, cbticklabels = logcbticks()
|
|
864
|
-
if cbticks is
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
866
|
+
if cbticks is None:
|
|
867
|
+
cbticks = cb.get_ticks()
|
|
868
|
+
cond = (vmin < cbticks) * (cbticks < vmax)
|
|
869
|
+
cb.set_ticks(cbticks[cond])
|
|
870
|
+
if cbticklabels is not None:
|
|
871
|
+
tl = np.array(cbticklabels)[cond]
|
|
872
|
+
else:
|
|
873
|
+
t = undo_stretch(cb.get_ticks(), *stretch_args)
|
|
874
|
+
tl = [f'{d:{cbformat[1:]}}' for d in t]
|
|
875
|
+
cb.set_ticklabels(tl)
|
|
873
876
|
|
|
874
877
|
def add_color(self,
|
|
875
878
|
stretch: str = 'linear',
|
|
876
879
|
stretchscale: float | None = None,
|
|
877
|
-
stretchpower: float =
|
|
880
|
+
stretchpower: float = 0.5,
|
|
878
881
|
show_cbar: bool = True,
|
|
879
882
|
cblabel: str | None = None,
|
|
880
883
|
cbformat: float = '%.1e',
|
|
@@ -887,7 +890,7 @@ class PlotAstroData(AstroFrame):
|
|
|
887
890
|
Args:
|
|
888
891
|
stretch (str, optional): 'log', 'asinh', 'power', or 'linear'. Any other means 'linear'. 'log' means the mapped data are logarithmic. 'asinh' means the mapped data are arc sin hyperbolic. 'power' means the mapped data are power-law (see also stretchpower). Defaults to 'linear'.
|
|
889
892
|
stretchscale (float, optional): Color scale is asinh(data / stretchscale). Defaults to None.
|
|
890
|
-
stretchpower (float, optional): Color scale is ((data / stretchscale)**stretchpower - 1) / stretchpower / ln(10). 1 means the linear scale, while 0 means the logarithmic scale. Defaults to
|
|
893
|
+
stretchpower (float, optional): Color scale is ((data / stretchscale)**stretchpower - 1) / stretchpower / ln(10). 1 means the linear scale, while 0 means the logarithmic scale. Defaults to 0.5.
|
|
891
894
|
show_cbar (bool, optional): Show color bar. Defaults to True.
|
|
892
895
|
cblabel (str, optional): Colorbar label. Defaults to None.
|
|
893
896
|
cbformat (float, optional): Format for ticklabels of colorbar. Defaults to '%.1e'.
|
|
@@ -905,7 +908,9 @@ class PlotAstroData(AstroFrame):
|
|
|
905
908
|
|
|
906
909
|
if cblabel is None:
|
|
907
910
|
cblabel = bunit
|
|
908
|
-
|
|
911
|
+
if stretchscale is None:
|
|
912
|
+
stretchscale = sigma
|
|
913
|
+
|
|
909
914
|
stretch_args = (stretch, stretchscale, stretchpower)
|
|
910
915
|
c = set_minmax(c, *stretch_args, sigma, _kw)
|
|
911
916
|
c = self.vskipfill(c, v)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plotastrodata
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.9
|
|
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
|