cubevis 0.5.11__py3-none-any.whl → 0.5.12__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.

Potentially problematic release.


This version of cubevis might be problematic. Click here for more details.

cubevis/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.5.11'
1
+ __version__ = '0.5.12'
@@ -208,15 +208,19 @@ class ImagePipe(DataPipe):
208
208
  ### --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
209
209
  amin = image_plane.min( ) ## array min
210
210
  amax = image_plane.max( ) ## array max
211
- rg = [ amin if len(self.__quant_adjustments['bounds'][0]) == 0 else self.__quant_adjustments['bounds'][0][0],
212
- amax if len(self.__quant_adjustments['bounds'][1]) == 0 else self.__quant_adjustments['bounds'][1][0] ]
213
- umin = min(rg) ## user specified min
214
- umax = max(rg) ## user specified max
211
+
212
+ ### --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
213
+ ### Extract user bounds (use array bounds as fallback)
214
+ ### --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
215
+ umin = amin if len(self.__quant_adjustments['bounds'][0]) == 0 else self.__quant_adjustments['bounds'][0][0]
216
+ umax = amax if len(self.__quant_adjustments['bounds'][1]) == 0 else self.__quant_adjustments['bounds'][1][0]
217
+
218
+ ### --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
219
+ ### Handle cropping (when user bounds are narrower than data)
220
+ ### --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
215
221
  if umin > amin:
216
- ## elements that are masked to the minumum color for the image
217
222
  exclude_below = image_plane < umin
218
223
  if umax < amax:
219
- ## elements that are masked to the maximum color for the image
220
224
  exclude_above = image_plane > umax
221
225
 
222
226
  ### --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -240,13 +244,26 @@ class ImagePipe(DataPipe):
240
244
  else:
241
245
  normalize = 0 if umin > 0 else -umin
242
246
  result = np.ma.zeros(image_plane.shape,image_plane.dtype)
243
- result[included] = self.__quant_scaling[selected_scaling]( image_plane[included]+normalize if included is not None else image_plane+normalize,
244
- **self.__quant_adjustments['transfer']['args'] )
245
- if exclude_below is not None:
246
- result[exclude_below] = result[included].min( )
247
- if exclude_above is not None:
248
- result[exclude_above] = result[included].max( )
247
+
248
+ if included is not None:
249
+
250
+ result[included] = self.__quant_scaling[selected_scaling](
251
+ image_plane[included] + normalize,
252
+ **self.__quant_adjustments['transfer']['args']
253
+ )
254
+
255
+ # Set excluded regions to min/max of included values
256
+ if exclude_below is not None:
257
+ result[exclude_below] = result[included].min( )
258
+ if exclude_above is not None:
259
+ result[exclude_above] = result[included].max( )
260
+ else:
261
+ result = self.__quant_scaling[selected_scaling](
262
+ image_plane + normalize,
263
+ **self.__quant_adjustments['transfer']['args']
264
+ )
249
265
  else:
266
+
250
267
  result = image_plane
251
268
 
252
269
  ### --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cubevis
3
- Version: 0.5.11
3
+ Version: 0.5.12
4
4
  Summary: visualization toolkit and apps for casa
5
5
  License: LGPL
6
6
  Author-email: Darrell Schiebel <darrell@schiebel.us>,Pam Harris <pharris@nrao.edu>
@@ -45,7 +45,7 @@ cubevis/bokeh/models/_tip_button.py,sha256=Dw4aO37o0J3n6EoaJ3ui1y8d04qNn3x2dbKiw
45
45
  cubevis/bokeh/sources/__init__.py,sha256=4FsudFuVU4o7VG5OG3K1tiMoxIXcJWNz_K9yzMDE8ls,1581
46
46
  cubevis/bokeh/sources/_data_pipe.py,sha256=PI4vZ_4eywHJfGEanyx-eMJvoeuMrPdMcF_ZbScYSi8,13779
47
47
  cubevis/bokeh/sources/_image_data_source.py,sha256=ezgTWHtHMpbT-jAd1F_xnq3jdcvIGbqNvN9MTbTOnNs,3537
48
- cubevis/bokeh/sources/_image_pipe.py,sha256=4v1-fuE-2LnL18hArkvurQeIy0TsaiX0H0_3iN-n4Xw,27770
48
+ cubevis/bokeh/sources/_image_pipe.py,sha256=4pvoy517N199OMD_q40NkPChsGPSMaR58hw1Gb348NU,28475
49
49
  cubevis/bokeh/sources/_spectra_data_source.py,sha256=Tbq4JczbmWfW9OPTzY2OuCMPOrr9yGQ1xVB63QTHnOw,2200
50
50
  cubevis/bokeh/sources/_updatable_data_source.py,sha256=KlEUTFI26tC7FLu5KF0U36CjjyBmNhSro0-PrLSi7i8,10709
51
51
  cubevis/bokeh/state/__init__.py,sha256=pUzr7PWrFKhGa8G1ogrGqBywrT8nUJ5kh3vKr0z4Zao,1628
@@ -126,8 +126,8 @@ cubevis/utils/_pkgs.py,sha256=mu2CCzndmJZYP81UkFhxveW_CisWLUvagJVolHOEVgM,2294
126
126
  cubevis/utils/_regions.py,sha256=TdAg4ZUUyhg3nFmX9_KLboqmc0LkyOdEW8M1WDR5Udk,1669
127
127
  cubevis/utils/_static.py,sha256=rN-sqXNqQ5R2M3wmPHU1GPP5OTyyWQlUPRuimCrht-g,2347
128
128
  cubevis/utils/_tiles.py,sha256=A9W1X61VOhBMTOKXVajzOIoiV2FBdO5N2SFB9SUpDOo,7336
129
- cubevis/__version__.py,sha256=IB1CJxlYThFf3KnjTGeCxoPXiCTJ_Y8r_YEqVfavyqQ,22
130
- cubevis-0.5.11.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
131
- cubevis-0.5.11.dist-info/METADATA,sha256=aJ3zH7H6h5nmNT9NndGFo8vlt0nbxq9mbW0oa_Ikkck,2629
132
- cubevis-0.5.11.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
133
- cubevis-0.5.11.dist-info/RECORD,,
129
+ cubevis/__version__.py,sha256=z3x2AegQWLToL5yMcS7dHEto7D9XUa4VzCOqg91RCYc,22
130
+ cubevis-0.5.12.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
131
+ cubevis-0.5.12.dist-info/METADATA,sha256=kKWypQp_9ty8BR68rOpj6EW27-GHplOvNgmBqcDX9hA,2629
132
+ cubevis-0.5.12.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
133
+ cubevis-0.5.12.dist-info/RECORD,,