cubevis 0.5.21__py3-none-any.whl → 0.5.23__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.21'
1
+ __version__ = '0.5.23'
cubevis/toolbox/_cube.py CHANGED
@@ -54,7 +54,7 @@ from cubevis.bokeh.sources import ImageDataSource, ImagePipe, DataPipe
54
54
  from cubevis.bokeh.format import WcsTicks
55
55
  from cubevis.bokeh.models import EditSpan
56
56
  from ..data import casaimage
57
- from ..utils import pack_arrays, find_ws_address, set_attributes, resource_manager, polygon_indexes, is_interactive_jupyter
57
+ from ..utils import pack_arrays, find_ws_address, set_attributes, resource_manager, polygon_indexes, is_interactive_jupyter, have_firefox
58
58
  from ..bokeh.models import EvTextInput
59
59
  from ..bokeh.tools import CBResetTool
60
60
  from ..bokeh.state import available_palettes, find_palette, default_palette
@@ -849,7 +849,8 @@ class CubeMask:
849
849
  'wheel_zoom', 'pan',
850
850
  ResetTool( icon=casaimage.as_mime(join( dirname(dirname(__file__)), "__icons__", 'zoom-to-fit.png' )),
851
851
  description="Reset pan/zoom but preserve extents" ) ],
852
- sizing_mode="scale_width" )
852
+ sizing_mode="stretch_both"
853
+ )
853
854
 
854
855
  self._cm_adjust['fig'].toolbar.active_scroll = self._cm_adjust['fig'].select_one(WheelZoomTool)
855
856
 
@@ -879,7 +880,7 @@ class CubeMask:
879
880
  ### square: 𝑦=𝑥^2
880
881
  ### gamma: 𝑦=𝑥^𝛾
881
882
  ### power: 𝑦=(𝛼^𝑥−1)/(𝛼−1)
882
- self._cm_adjust['alpha-value'] = TextInput( value="1000", prefix="alpha", max_width=170, visible=False )
883
+ self._cm_adjust['alpha-value'] = TextInput( value="10", prefix="alpha", max_width=170, visible=False )
883
884
  self._cm_adjust['gamma-value'] = TextInput( value="1", prefix="gamma", max_width=170, visible=False )
884
885
  self._cm_adjust['equation'] = Div(text='''<math><mrow><mi>y</mi><mo>=</mo><mi>x</mi></mrow></math>''', margin=(12, 0, 0, 0)) # linear
885
886
  self._cm_adjust['scaling'] = Dropdown( label='linear',
@@ -1049,7 +1050,11 @@ class CubeMask:
1049
1050
  return dict( result='failure', update={ } )
1050
1051
 
1051
1052
  scaling_background = '#f8f8f8'
1052
- return column( self._cm_adjust['fig'],
1053
+ return column( row( *[ self._cm_adjust['fig'] ] +
1054
+ ### Firefox incorrectly sizes the colormap histogram plot resulting in the right
1055
+ ### side being outside of the browser window... this may have to be tweaked again
1056
+ ### when Jupyter notebooks are supported...
1057
+ ( [ Spacer( width=120 ) ] if have_firefox( ) else [ ] ), sizing_mode='stretch_both' ),
1053
1058
  row( Tip( self._cm_adjust['min input'],
1054
1059
  tooltip=Tooltip( content=HTML("set minimum clip here or drag the left red line above"),
1055
1060
  position="top" ) ),
@@ -1068,7 +1073,7 @@ class CubeMask:
1068
1073
  tooltip=Tooltip( content=HTML('set gamma value as indicated in the equation'),
1069
1074
  position="top" ) ) ),
1070
1075
  width=325, styles={'background-color': scaling_background, 'border': '1px solid black', 'padding': '10px'} ),
1071
- sizing_mode="scale_width" )
1076
+ sizing_mode="stretch_both" )
1072
1077
 
1073
1078
  def bitmask_ctrl( self, reuse=None, **kw ):
1074
1079
 
cubevis/utils/__init__.py CHANGED
@@ -44,6 +44,7 @@ from ._docenum import DocEnum
44
44
  from ._copydoc import copydoc
45
45
  from ._pkgs import find_pkg, load_pkg
46
46
  from ._jupyter import is_interactive_jupyter
47
+ from ._browser import have_firefox
47
48
 
48
49
  from astropy import units
49
50
  from regions import PixCoord
@@ -0,0 +1,7 @@
1
+ import webbrowser
2
+
3
+ def have_firefox( ):
4
+ """Check if any variant of Firefox will be used."""
5
+ browser = webbrowser.get()
6
+ firefox_indicators = ['firefox', 'mozilla']
7
+ return any(indicator in browser.name.lower() for indicator in firefox_indicators)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cubevis
3
- Version: 0.5.21
3
+ Version: 0.5.23
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>
@@ -95,13 +95,14 @@ cubevis/remote/_local.py,sha256=PcPCFcwttTFZd3O33-5pqDuGKQKK6CA0gz1MTIkTiNI,1032
95
95
  cubevis/remote/_remote_kernel.py,sha256=wfu7ZzKn-oCxZxzDIkC5puBvGf8WbCLYL3CzM56_FNc,2652
96
96
  cubevis/toolbox/__init__.py,sha256=xzqwAG9863d7UKBVBRw7FrRUQbvCdFcLBq4vTpg63DU,1487
97
97
  cubevis/toolbox/_app_context.py,sha256=0tRY2SSbSCM6RKLFs_T707_ehWkJXPvnLlE1P9cLXJY,3024
98
- cubevis/toolbox/_cube.py,sha256=Thq7hZkcIjhlBf8nlYajyt-JZU1kkVG51VPTO1bHiqQ,294209
98
+ cubevis/toolbox/_cube.py,sha256=T-9I4f_rpiZRarT6rOzCwgveQCnWp7sV1_jNf6OX0lU,294698
99
99
  cubevis/toolbox/_interactive_clean_ui.mustache,sha256=DKmy6dMpGOq4aZImorhF0K2wOV0oi58qkv7o4CdDJEM,103985
100
100
  cubevis/toolbox/_interactive_clean_ui.py,sha256=I9ikjAJjN64gxql_CXoiUCg5wTclrV1pENGbDVczFic,103896
101
101
  cubevis/toolbox/_interactiveclean_wrappers.py,sha256=XqyCGz33CMDhszTxnwZ_3-64GszUK1XYnGKUOxl9sas,5071
102
102
  cubevis/toolbox/_region_list.py,sha256=_1RvnXwqMoaAq8CPy-6IyhabLi_snXqO566onehI2y0,8957
103
103
  cubevis/utils/_ResourceManager.py,sha256=SaaR29etabRiKxmUK-aWvAm4v_OPFJH8CX7bNFm0Lgo,3410
104
- cubevis/utils/__init__.py,sha256=B_2a0yTCurZWiZfg8dUprcNsqNh205thg7KmpcPRNfE,22705
104
+ cubevis/utils/__init__.py,sha256=ThGHifu7ynyK-Sgc-novt85adIfdrUpNWGSIi_tllKM,22740
105
+ cubevis/utils/_browser.py,sha256=rmJ8_wq6XqhXZmVdmWI4t736qB-zd7ZbzfjVdVz40eY,261
105
106
  cubevis/utils/_contextmgrchain.py,sha256=r5SrCBdgQIVH7zXKOmq5oWhDUSeHaZpgsIfWFHvb3cQ,2859
106
107
  cubevis/utils/_conversion.py,sha256=SziCU8sOGtG7djlY766-MeOvnQgvT9C737FEfJ4aYsE,3262
107
108
  cubevis/utils/_copydoc.py,sha256=SI9DOUoTNg9M-Y4J1oci2Ba1jebGHsx_pFX24RSNg3o,1915
@@ -113,8 +114,8 @@ cubevis/utils/_pkgs.py,sha256=mu2CCzndmJZYP81UkFhxveW_CisWLUvagJVolHOEVgM,2294
113
114
  cubevis/utils/_regions.py,sha256=TdAg4ZUUyhg3nFmX9_KLboqmc0LkyOdEW8M1WDR5Udk,1669
114
115
  cubevis/utils/_static.py,sha256=rN-sqXNqQ5R2M3wmPHU1GPP5OTyyWQlUPRuimCrht-g,2347
115
116
  cubevis/utils/_tiles.py,sha256=A9W1X61VOhBMTOKXVajzOIoiV2FBdO5N2SFB9SUpDOo,7336
116
- cubevis/__version__.py,sha256=ps35qNwJ5eINN1iSMDON1JGFN5Qy34GLNmmuzlMtjbs,22
117
- cubevis-0.5.21.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
118
- cubevis-0.5.21.dist-info/METADATA,sha256=F_cnGZlnO7ESz_fH3wDvy3vRdxSmOHg9BHdAIbbbJfc,2629
119
- cubevis-0.5.21.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
120
- cubevis-0.5.21.dist-info/RECORD,,
117
+ cubevis/__version__.py,sha256=I49ytBecDTKF_6KFJBcXA0zcgUvvXhff2l52LZ7lz8M,22
118
+ cubevis-0.5.23.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
119
+ cubevis-0.5.23.dist-info/METADATA,sha256=X0m2sjmGhdkEO7wR87wpOudzfiMzU8EjyLTIoq9Rd7w,2629
120
+ cubevis-0.5.23.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
121
+ cubevis-0.5.23.dist-info/RECORD,,