Changeset 2001


Ignore:
Timestamp:
02/18/11 16:58:15 (13 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS-1306/ASAP-205)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: several functions in asapplotter are not available in flagplotter

Test Programs: e.g., flagplotter.plotazel

Put in Release Notes: No

Module(s): flagplotter

Description:

Disabled several methods of the super class, asapplotter, in flagplotter class.
Disabled methods are:
set_panelling, plotazel, plotpointing, and plottp.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/flagplotter.py

    r1997 r2001  
    1515
    1616    Example:
    17        scan = asap.scantable(filename='your_filename',average=False)
     17       scan = asa p.scantable(filename='your_filename',average=False)
    1818       guiflagger = asap.flagplotter(visible=True)
    1919       guiflagger.plot(scan)
    2020       ### flag/Unflag data graphically.
    21        scan.save(name='flagged_file.asap',format='ASAP')
     21       guiflagger.save_data(name='flagged_file.asap',format='ASAP')
    2222   
    2323    NOTICE:
     
    2929        self._plotter.window.title('Flag Plotter')
    3030        self._panelling = 'r'
    31         self._stacking = 's'
     31        self.set_stacking('scan')
    3232
    3333    def _newcasabar(self):
     
    4040        return None
    4141
    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 
    5442    @asaplog_post_dec
    5543    def _invalid_func(self, name):
    5644        msg = "Invalid function 'flagplotter."+name+"'"
     45        #raise AttributeError(msg)
    5746        asaplog.push(msg)
    5847        asaplog.post('ERROR')
    5948
     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
    6070    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        """
    6194        # simply calls scantable.save
    6295        self._data.save(name,format,overwrite)
Note: See TracChangeset for help on using the changeset viewer.