source: trunk/python/flagplotter.py@ 2000

Last change on this file since 2000 was 1997, checked in by Kana Sugimoto, 14 years ago

New Development: No

JIRA Issue: Yes (CAS-1306)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: load flag plotter and see the title has changed to "Flag Plotter"

Put in Release Notes: No

Module(s): flagplotter

Description:

Changed Window title to "Flag Plotter".


File size: 2.2 KB
RevLine 
[1996]1from asap.asapplotter import asapplotter
2from asap.logging import asaplog, asaplog_post_dec
3
4from asap.parameters import rcParams
5from asap.selector import selector
6from asap.scantable import scantable
7import matplotlib.axes
8from matplotlib.font_manager import FontProperties
9from matplotlib.text import Text
10
11class flagplotter(asapplotter):
12 """
13 The flag plotter
14 Only row based panneling is allowed.
15
16 Example:
17 scan = asap.scantable(filename='your_filename',average=False)
18 guiflagger = asap.flagplotter(visible=True)
19 guiflagger.plot(scan)
20 ### flag/Unflag data graphically.
21 scan.save(name='flagged_file.asap',format='ASAP')
22
23 NOTICE:
24 The flagged data is not saved until you explicitly run scantable.save
25 """
26 def __init__(self, visible=None, **kwargs):
27 self._scan=None
28 asapplotter.__init__(self,visible=visible, **kwargs)
[1997]29 self._plotter.window.title('Flag Plotter')
[1996]30 self._panelling = 'r'
31 self._stacking = 's'
32
33 def _newcasabar(self):
34 backend=matplotlib.get_backend()
35 if self._visible and backend == "TkAgg":
36 #from asap.casatoolbar import CustomToolbarTkAgg
37 #return CustomToolbarTkAgg(self)
38 from asap.flagtoolbar import CustomFlagToolbarTkAgg
39 return CustomFlagToolbarTkAgg(self)
40 return None
41
42 def set_mode(self, stacking=None, panelling=None, refresh=True):
43 """ This function is not available for the class flagplotter """
44 self._invalid_func(name='set_mode')
45
46 def set_panelling(self, what=None):
47 """ This function is not available for the class flagplotter """
48 self._invalid_func(name='set_panelling')
49
50 def set_stacking(self, what=None):
51 """ This function is not available for the class flagplotter """
52 self._invalid_func(name='set_stacking')
53
54 @asaplog_post_dec
55 def _invalid_func(self, name):
56 msg = "Invalid function 'flagplotter."+name+"'"
57 asaplog.push(msg)
58 asaplog.post('ERROR')
59
60 def save_data(self, name=None, format=None, overwrite=False):
61 # simply calls scantable.save
62 self._data.save(name,format,overwrite)
Note: See TracBrowser for help on using the repository browser.