plotastrodata 1.10.2__py3-none-any.whl → 1.10.3__py3-none-any.whl

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/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  import warnings
2
2
 
3
3
  warnings.simplefilter('ignore', FutureWarning)
4
- __version__ = '1.10.2'
4
+ __version__ = '1.10.3'
@@ -286,6 +286,9 @@ class Stretcher():
286
286
  ) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
287
287
  """Set vmin and vmax for color pcolormesh and RGB maps.
288
288
 
289
+ Explicit bounds are stretched and preserved; missing bounds are
290
+ inferred from the clipped, stretched data.
291
+
289
292
  Args:
290
293
  data (np.ndarray): 2D/3D data to plot.
291
294
 
@@ -297,9 +300,15 @@ class Stretcher():
297
300
  vmaxout = [self.vmax] if single else self.vmax
298
301
  dataout = [data] if single else data
299
302
  for i, (c, v0, v1) in enumerate(zip(dataout, vminout, vmaxout)):
300
- dataout[i] = cout = self.do(c.clip(v0, v1), i)
301
- vminout[i] = np.nanmin(cout)
302
- vmaxout[i] = np.nanmax(cout)
303
+ dataout[i] = self.do(c.clip(v0, v1), i)
304
+ if v0 is None:
305
+ vminout[i] = np.nanmin(dataout[i])
306
+ else:
307
+ vminout[i] = self.do(v0, i).item()
308
+ if v1 is None:
309
+ vmaxout[i] = np.nanmax(dataout[i])
310
+ else:
311
+ vmaxout[i] = self.do(v1, i).item()
303
312
  if single:
304
313
  dataout = dataout[0]
305
314
  vminout = vminout[0]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotastrodata
3
- Version: 1.10.2
3
+ Version: 1.10.3
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
@@ -1,4 +1,4 @@
1
- plotastrodata/__init__.py,sha256=2tJOvuIFBRyjdissM6roWx4IzryH7HNlsf0FG87AzZo,87
1
+ plotastrodata/__init__.py,sha256=mHVcagWkZOxvfHaKw0Ldyrrx5-eVNns53DbTYkilUkM,87
2
2
  plotastrodata/analysis_utils.py,sha256=b7Lpoa8_TrLaFRTFB0nnuDzk-wZbetXD6WgOVACmxVY,40831
3
3
  plotastrodata/const_utils.py,sha256=7clioUo-YTKq6CcXos8Ek1TY4CiNEo_V9ESA1Mu3g8g,3288
4
4
  plotastrodata/coord_utils.py,sha256=S34puKwuiIz9HMbs5Cdew3TkWGIbmXWPirYiDCc4TRw,7077
@@ -10,9 +10,9 @@ plotastrodata/los_utils.py,sha256=uG5t1nAmcnEDZ80VD2zB6s55LCHpY57zG89cuL9M0po,64
10
10
  plotastrodata/matrix_utils.py,sha256=Z5R3BK3HeQuF-XQalekCpv2-t_huR80DKdLdvrbrXz4,2358
11
11
  plotastrodata/noise_utils.py,sha256=yzLF580MFdjmOpfGz4OC8U2CzS2KOkhjbZ7UegMRMGg,9193
12
12
  plotastrodata/other_utils.py,sha256=3PJJ8f8qNXrJtgxGmSZSdpBqceJ_Jexf4-Er_aEhSzE,11508
13
- plotastrodata/plot_utils.py,sha256=e6Yl0u1w6ubTj7-d34MR3msU-vDV9sBZ-9kDDxqDj0o,80787
14
- plotastrodata-1.10.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
15
- plotastrodata-1.10.2.dist-info/METADATA,sha256=wdj5h-4dH6om3QP0BuU7AczMPdwg4OPmurEhgOoXJ1I,6060
16
- plotastrodata-1.10.2.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
17
- plotastrodata-1.10.2.dist-info/top_level.txt,sha256=mv2FRRtreGAUE_UF_Z_TYj_NZLECJqkQx7ErkA_Rttg,14
18
- plotastrodata-1.10.2.dist-info/RECORD,,
13
+ plotastrodata/plot_utils.py,sha256=ZQvcFJ5PrAI7NOogZIxv-srz47XPnuedpjCcpXmXGAc,81116
14
+ plotastrodata-1.10.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
15
+ plotastrodata-1.10.3.dist-info/METADATA,sha256=OtBTWkvL0KXe9EVosgmuwGqctTMB3BQ4x38ptLSGPB4,6060
16
+ plotastrodata-1.10.3.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
17
+ plotastrodata-1.10.3.dist-info/top_level.txt,sha256=mv2FRRtreGAUE_UF_Z_TYj_NZLECJqkQx7ErkA_Rttg,14
18
+ plotastrodata-1.10.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (83.0.0)
2
+ Generator: setuptools (84.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5