Changeset 2001 for trunk/python
- Timestamp:
- 02/18/11 16:58:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/flagplotter.py
r1997 r2001 15 15 16 16 Example: 17 scan = asa p.scantable(filename='your_filename',average=False)17 scan = asa p.scantable(filename='your_filename',average=False) 18 18 guiflagger = asap.flagplotter(visible=True) 19 19 guiflagger.plot(scan) 20 20 ### flag/Unflag data graphically. 21 scan.save(name='flagged_file.asap',format='ASAP')21 guiflagger.save_data(name='flagged_file.asap',format='ASAP') 22 22 23 23 NOTICE: … … 29 29 self._plotter.window.title('Flag Plotter') 30 30 self._panelling = 'r' 31 self. _stacking = 's'31 self.set_stacking('scan') 32 32 33 33 def _newcasabar(self): … … 40 40 return None 41 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 42 @asaplog_post_dec 55 43 def _invalid_func(self, name): 56 44 msg = "Invalid function 'flagplotter."+name+"'" 45 #raise AttributeError(msg) 57 46 asaplog.push(msg) 58 47 asaplog.post('ERROR') 59 48 49 def set_panelling(self,which='r'): 50 """ This function is not available for the class flagplotter """ 51 if which.lower().startswith('r'): 52 return 53 msg = "Pannel setting is fixed to row mode in 'flagplotter'" 54 asaplog.push(msg) 55 asaplog.post('ERROR') 56 self._panelling = 'r' 57 58 def plotazel(self,*args,**kwargs): 59 """ This function is not available for the class flagplotter """ 60 self._invalid_func(name='plotazel') 61 62 def plotpointing(self,*args,**kwargs): 63 """ This function is not available for the class flagplotter """ 64 self._invalid_func(name='plotpointing') 65 66 def plottp(self,*args,**kwargs): 67 """ This function is not available for the class flagplotter """ 68 self._invalid_func(name='plottp') 69 60 70 def save_data(self, name=None, format=None, overwrite=False): 71 """ 72 Store the plotted scantable on disk. 73 This function simply redirects call to scantable.save() 74 75 Parameters: 76 77 name: the name of the outputfile. For format "ASCII" 78 this is the root file name (data in 'name'.txt 79 and header in 'name'_header.txt) 80 81 format: an optional file format. Default is ASAP. 82 Allowed are: 83 * 'ASAP' (save as ASAP [aips++] Table), 84 * 'SDFITS' (save as SDFITS file) 85 * 'ASCII' (saves as ascii text file) 86 * 'MS2' (saves as an casacore MeasurementSet V2) 87 * 'FITS' (save as image FITS - not readable by class) 88 * 'CLASS' (save as FITS readable by CLASS) 89 90 overwrite: If the file should be overwritten if it exists. 91 The default False is to return with warning 92 without writing the output. USE WITH CARE. 93 """ 61 94 # simply calls scantable.save 62 95 self._data.save(name,format,overwrite)
Note:
See TracChangeset
for help on using the changeset viewer.