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

Binary file
@@ -0,0 +1,20 @@
1
+ <svg width="512" height="512" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="512" height="512" fill="#f5f5f5"/>
3
+
4
+ <!-- Trash can body (tapered) -->
5
+ <path d="M 160 200 L 352 200 L 332 440 Q 332 460 312 460 L 200 460 Q 180 460 180 440 L 160 200 Z"
6
+ fill="none" stroke="black" stroke-width="24" stroke-linejoin="round"/>
7
+
8
+ <!-- Trash can lid -->
9
+ <rect x="120" y="160" width="272" height="40" rx="20" ry="20"
10
+ fill="none" stroke="black" stroke-width="24"/>
11
+
12
+ <!-- Handle -->
13
+ <rect x="200" y="120" width="112" height="40" rx="20" ry="20"
14
+ fill="none" stroke="black" stroke-width="24"/>
15
+
16
+ <!-- Vertical indents -->
17
+ <line x1="220" y1="220" x2="210" y2="420" stroke="black" stroke-width="16" stroke-linecap="round"/>
18
+ <line x1="256" y1="220" x2="256" y2="420" stroke="black" stroke-width="16" stroke-linecap="round"/>
19
+ <line x1="292" y1="220" x2="302" y2="420" stroke="black" stroke-width="16" stroke-linecap="round"/>
20
+ </svg>
Binary file
@@ -0,0 +1,35 @@
1
+ <svg width="512" height="512" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="512" height="512" fill="#f5f5f5"/>
3
+
4
+ <!-- Trash can body (tapered) -->
5
+ <path d="M 160 200 L 352 200 L 332 440 Q 332 460 312 460 L 200 460 Q 180 460 180 440 L 160 200 Z"
6
+ fill="none" stroke="black" stroke-width="24" stroke-linejoin="round"/>
7
+
8
+ <!-- Trash can lid (tilted open) -->
9
+ <ellipse cx="150" cy="140" rx="136" ry="20"
10
+ transform="rotate(-15 150 140)"
11
+ fill="none" stroke="black" stroke-width="24"/>
12
+
13
+ <!-- Handle (on tilted lid) -->
14
+ <rect x="105" y="100" width="112" height="40" rx="20" ry="20"
15
+ transform="rotate(-15 161 120)"
16
+ fill="black" stroke="none"/>
17
+
18
+ <!-- Vertical indents -->
19
+ <line x1="220" y1="220" x2="210" y2="420" stroke="black" stroke-width="16" stroke-linecap="round"/>
20
+ <line x1="256" y1="220" x2="256" y2="420" stroke="black" stroke-width="16" stroke-linecap="round"/>
21
+ <line x1="292" y1="220" x2="302" y2="420" stroke="black" stroke-width="16" stroke-linecap="round"/>
22
+
23
+ <!-- Overflow items -->
24
+ <circle cx="300" cy="120" r="16" fill="none" stroke="black" stroke-width="12"/>
25
+ <rect x="340" y="100" width="32" height="32" rx="8" fill="none" stroke="black" stroke-width="12"/>
26
+ <circle cx="380" cy="80" r="12" fill="none" stroke="black" stroke-width="10"/>
27
+ <rect x="320" y="60" width="24" height="24" rx="6" fill="none" stroke="black" stroke-width="10"/>
28
+
29
+ <!-- Additional overflow down the right side -->
30
+ <circle cx="390" cy="140" r="14" fill="none" stroke="black" stroke-width="10"/>
31
+ <rect x="400" y="170" width="28" height="28" rx="7" fill="none" stroke="black" stroke-width="10"/>
32
+ <circle cx="420" cy="210" r="10" fill="none" stroke="black" stroke-width="8"/>
33
+ <rect x="410" y="240" width="20" height="20" rx="5" fill="none" stroke="black" stroke-width="8"/>
34
+ <circle cx="430" cy="270" r="8" fill="none" stroke="black" stroke-width="6"/>
35
+ </svg>
Binary file
cubevis/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.5.28'
1
+ __version__ = '0.5.29'
cubevis/toolbox/_cube.py CHANGED
@@ -203,15 +203,19 @@ class CubeMask:
203
203
  cube=casaimage.as_mime(join( dirname(dirname(__file__)), "__icons__", 'add-cube.png' ) ) )
204
204
  _sub_ = dict( chan=casaimage.as_mime(join( dirname(dirname(__file__)), "__icons__", 'sub-chan.png' ) ),
205
205
  cube=casaimage.as_mime(join( dirname(dirname(__file__)), "__icons__", 'sub-cube.png' ) ) )
206
+ _del_ = dict( chan=casaimage.as_mime(join( dirname(dirname(__file__)), "__icons__", 'trash.png' ) ),
207
+ cube=casaimage.as_mime(join( dirname(dirname(__file__)), "__icons__", 'trash_full.png' ) ) )
206
208
  self._mask_icons_ = dict( on=casaimage.as_mime(join( dirname(dirname(__file__)), "__icons__", 'new-layer-sm-selected.png' ) ),
207
209
  off=casaimage.as_mime(join( dirname(dirname(__file__)), "__icons__", 'new-layer-sm.png' ) ) )
208
210
  self._mask_add_sub = { 'add': CustomAction( icon=_add_['chan'], name="Mask Add",
209
211
  description="add region to current channel's mask (hold Shift key then click to add to all channels)" ),
210
212
  'sub': CustomAction( icon=_sub_['chan'], name="Mask Sub",
211
213
  description="subtract region from current channel's mask (hold Shift key then click to subtract from all channels)" ),
214
+ 'dele': CustomAction( icon=_del_['chan'], name="Mask Delete",
215
+ description="delete current channel's mask (hold Shift key then click to delete the mask from all channels)" ),
212
216
  'mask': CustomAction( icon=self._mask_icons_['off'], name="Mask Select",
213
217
  description="select the mask for the current channel" ),
214
- 'img': dict( add=_add_, sub=_sub_ ) }
218
+ 'img': dict( add=_add_, sub=_sub_, dele=_del_ ) }
215
219
 
216
220
  self._fig = { }
217
221
  self._hover = { 'spectrum': None, 'image': None } # HoverTools which are used to synchronize image/spectrum
@@ -438,6 +442,23 @@ class CubeMask:
438
442
  err = "internal error: bad add/subtract scope"
439
443
  else:
440
444
  err = "internal error: bad add/subtract message"
445
+ elif msg['action'] == 'delete':
446
+ if msg['scope'] == 'chan':
447
+ mask = self._pipe['image'].mask( msg['value']['chan'], True )
448
+ mask.fill(0.0)
449
+ self._pipe['image'].put_mask( msg['value']['chan'], mask )
450
+ self._mask_id = str(uuid4( )) ### new mask identifier
451
+ return dict( result='success', update={ } )
452
+ elif msg['scope'] == 'cube':
453
+ stokes = msg['value']['chan'][0]
454
+ for c in range(shape[3]):
455
+ mask = self._pipe['image'].mask( [stokes,c], True )
456
+ mask.fill(0.0)
457
+ self._pipe['image'].put_mask( [stokes,c], mask )
458
+ self._mask_id = str(uuid4( )) ### new mask identifier
459
+ return dict( result='success', update={ } )
460
+ else:
461
+ err = "internal error: bad invert scope"
441
462
  elif msg['action'] == 'not':
442
463
  notf = np.vectorize(lambda x: 0.0 if x != 0 else 1.0)
443
464
  if msg['scope'] == 'chan':
@@ -496,7 +517,8 @@ class CubeMask:
496
517
  ResetTool(name="Reset"), PolySelectTool(name="Poly Mask") ] +
497
518
  ( [ self._mask_add_sub['add'],
498
519
  self._mask_add_sub['sub'],
499
- self._mask_add_sub['mask'] ] if self._mask_path else [ ] ),
520
+ self._mask_add_sub['mask'],
521
+ self._mask_add_sub['dele'] ] if self._mask_path else [ ] ),
500
522
  tooltips=None ), **kw )
501
523
 
502
524
  ###
@@ -1859,6 +1881,21 @@ class CubeMask:
1859
1881
  self._js_mode_code['bitmask-hotkey-setup-add-sub'] +
1860
1882
  '''if ( cb_obj._mode == 'cube' ) mask_sub_cube( )
1861
1883
  else mask_sub_chan( )''' )
1884
+ self._mask_add_sub['dele'].callback = CustomJS( args=dict( annotations=self._annotations,
1885
+ source=self._image_source,
1886
+ ctrl=self._pipe['control'],
1887
+ ids=self._ids,
1888
+ stats_source=self._statistics_source,
1889
+ mask_region_icons=self._mask_icons_,
1890
+ mask_region_button=self._mask_add_sub['mask'],
1891
+ mask_region_ds=self._bitmask_contour_maskmod_ds,
1892
+ contour_ds=self._bitmask_contour_ds,
1893
+ disable_add_sub = self._mask_add_sub_disable,
1894
+ status=self._status_div ),
1895
+ code=self._js['update-status'] +
1896
+ self._js_mode_code['bitmask-hotkey-setup-add-sub'] +
1897
+ '''if ( cb_obj._mode == 'cube' ) mask_del_cube( )
1898
+ else mask_del_chan( )''' )
1862
1899
 
1863
1900
  self._mask_add_sub['mask'].callback = CustomJS( args=dict( annotations=self._annotations,
1864
1901
  contour_ds=self._bitmask_contour_ds,
@@ -2329,6 +2366,19 @@ class CubeMask:
2329
2366
  mask_mod_result )
2330
2367
  } else if ( status ) status.text = '<p>no region found</p>'
2331
2368
  }
2369
+ function mask_del_chan( ) {
2370
+ if ( disable_add_sub.values.disabled ) {
2371
+ update_status_error( disable_add_sub.values.message ?
2372
+ disable_add_sub.values.message :
2373
+ default_add_sub_disabled_text )
2374
+ return
2375
+ }
2376
+ ctrl.send( ids['mask-mod'],
2377
+ { scope: 'chan',
2378
+ action: 'delete',
2379
+ value: { chan: source.cur_chan } },
2380
+ mask_mod_result )
2381
+ }
2332
2382
  function mask_add_cube( ) {
2333
2383
  if ( disable_add_sub.values.disabled ) {
2334
2384
  update_status_error( disable_add_sub.values.message ?
@@ -2376,6 +2426,19 @@ class CubeMask:
2376
2426
  src: mask_region_ds._src_chan } },
2377
2427
  mask_mod_result )
2378
2428
  } else if ( status ) status.text = '<p>no region found</p>'
2429
+ }
2430
+ function mask_del_cube( ) {
2431
+ if ( disable_add_sub.values.disabled ) {
2432
+ update_status_error( disable_add_sub.values.message ?
2433
+ disable_add_sub.values.message :
2434
+ default_add_sub_disabled_text )
2435
+ return
2436
+ }
2437
+ ctrl.send( ids['mask-mod'],
2438
+ { scope: 'cube',
2439
+ action: 'delete',
2440
+ value: { chan: source.cur_chan } },
2441
+ mask_mod_result )
2379
2442
  }''',
2380
2443
  'bitmask-hotkey-setup': '''
2381
2444
  function state_translate_selection( dx, dy ) {
@@ -2875,18 +2938,23 @@ class CubeMask:
2875
2938
  }''',
2876
2939
  'cube-init': '''add._mode = 'chan'
2877
2940
  sub._mode = 'chan'
2941
+ dele._mode = 'chan'
2878
2942
  let foo = casalib.is_empty
2879
2943
  function cube_on( ) {
2880
2944
  add._mode = 'cube'
2881
2945
  add.icon = img['add']['cube']
2882
2946
  sub._mode = 'cube'
2883
2947
  sub.icon = img['sub']['cube']
2948
+ dele._mode = 'cube'
2949
+ dele.icon = img['dele']['cube']
2884
2950
  }
2885
2951
  function cube_off( ) {
2886
2952
  add._mode = 'chan'
2887
2953
  add.icon = img['add']['chan']
2888
2954
  sub._mode = 'chan'
2889
2955
  sub.icon = img['sub']['chan']
2956
+ dele._mode = 'chan'
2957
+ dele.icon = img['dele']['chan']
2890
2958
  }
2891
2959
  casalib.hotkeys( '*',
2892
2960
  { keyup: true, scope: 'all' },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cubevis
3
- Version: 0.5.28
3
+ Version: 0.5.29
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>
@@ -22,6 +22,11 @@ cubevis/__icons__/sub-chan.png,sha256=wQ-qasFXUIOTf2u1FYDlLw1sOGD9Lc8DxQlazxdvdw
22
22
  cubevis/__icons__/sub-chan.svg,sha256=hEmxtj0ogChOCPPDud-Nki317jxa0mGk-GAjWqVOyj4,2563
23
23
  cubevis/__icons__/sub-cube.png,sha256=mtv21frhc_GuXsfDlUa-0xQzym3Ii4TZiQGm4MFYjrY,10011
24
24
  cubevis/__icons__/sub-cube.svg,sha256=tDCFZ2Es6b8HTiBpgLPG0cOOnlS8dI7LbE2KQxEWFw4,6391
25
+ cubevis/__icons__/trash.png,sha256=Y0Y5OWvhKMvYFOpnlTxwr0jve4eDgUmVZutOROQvtSY,25995
26
+ cubevis/__icons__/trash.svg,sha256=CVF_NUK_VY4ZDoExRY7o10PrzOGSL9av6xajhCgVD9E,979
27
+ cubevis/__icons__/trash_full.png,sha256=1rDPnltwC2N4TEmxDxgh2-KahIJY99wjb6JOBLmDyK8,20710
28
+ cubevis/__icons__/trash_full.svg,sha256=DAvMdNIDPDcSG3LTYEamonaYJJWGp07S2mAMK7p62Qg,1946
29
+ cubevis/__icons__/trash_full_raw.png,sha256=8ChZlNOqnDqmNhNYoqyLiGluYwJSYeQ2UvNLqVUX5hI,68993
25
30
  cubevis/__icons__/zoom-to-fit.png,sha256=aozGbrkoBX1q9kV0p272bg0YKGje1gIfVBkFZRlLAXs,9592
26
31
  cubevis/__icons__/zoom-to-fit.svg,sha256=NtYorWvH4s68iAMriqCPGuTBX5SsgVN310UXGKDM7i8,1802
27
32
  cubevis/__init__.py,sha256=63Y0ROAWuHV1ZHJ8JX7NZl9GQJOaNZI3P1RAhIQkdd0,3296
@@ -96,7 +101,7 @@ cubevis/remote/_local.py,sha256=PcPCFcwttTFZd3O33-5pqDuGKQKK6CA0gz1MTIkTiNI,1032
96
101
  cubevis/remote/_remote_kernel.py,sha256=wfu7ZzKn-oCxZxzDIkC5puBvGf8WbCLYL3CzM56_FNc,2652
97
102
  cubevis/toolbox/__init__.py,sha256=xzqwAG9863d7UKBVBRw7FrRUQbvCdFcLBq4vTpg63DU,1487
98
103
  cubevis/toolbox/_app_context.py,sha256=0tRY2SSbSCM6RKLFs_T707_ehWkJXPvnLlE1P9cLXJY,3024
99
- cubevis/toolbox/_cube.py,sha256=k9y2KnGXmZa8LUTx7e6YVMSIBTN7D_8sE9Jv7oRMqf4,299958
104
+ cubevis/toolbox/_cube.py,sha256=iFIaqYvyIfRJg_z9IUJxUGhkyeZc3InF1axzra1YHw0,305724
100
105
  cubevis/toolbox/_interactive_clean_ui.mustache,sha256=1vGWbm0_1vkd9cJSiAwjAGYCXbWxAmi_Ll9Dwo8wKxI,112022
101
106
  cubevis/toolbox/_interactive_clean_ui.py,sha256=upKXlTUIuToZJEZPy3qBUfppgCfoLchEMqyByXQsQWA,111933
102
107
  cubevis/toolbox/_interactiveclean_wrappers.py,sha256=XqyCGz33CMDhszTxnwZ_3-64GszUK1XYnGKUOxl9sas,5071
@@ -115,8 +120,8 @@ cubevis/utils/_pkgs.py,sha256=mu2CCzndmJZYP81UkFhxveW_CisWLUvagJVolHOEVgM,2294
115
120
  cubevis/utils/_regions.py,sha256=TdAg4ZUUyhg3nFmX9_KLboqmc0LkyOdEW8M1WDR5Udk,1669
116
121
  cubevis/utils/_static.py,sha256=rN-sqXNqQ5R2M3wmPHU1GPP5OTyyWQlUPRuimCrht-g,2347
117
122
  cubevis/utils/_tiles.py,sha256=A9W1X61VOhBMTOKXVajzOIoiV2FBdO5N2SFB9SUpDOo,7336
118
- cubevis/__version__.py,sha256=LgZX0AAm4DR6k_McqE0v9QbUio18we2ckqmZU9nWMco,22
119
- cubevis-0.5.28.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
120
- cubevis-0.5.28.dist-info/METADATA,sha256=d5HOUqVimBHioafvdQ8njeTmoTeIRV4rNhX5d2HaJmw,2629
121
- cubevis-0.5.28.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
122
- cubevis-0.5.28.dist-info/RECORD,,
123
+ cubevis/__version__.py,sha256=pRGq-OZp7rhvAQs6LmIPCzIsSAQhCXt-lXUWw_8ZaSw,22
124
+ cubevis-0.5.29.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
125
+ cubevis-0.5.29.dist-info/METADATA,sha256=SxfkpXe33VEnFz45bdusC35zgQoi82P3ot46p9q6wp4,2629
126
+ cubevis-0.5.29.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
127
+ cubevis-0.5.29.dist-info/RECORD,,