Changeset 2115


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

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): sdflag

Description:

introduced flagplotter._ismodified (bool) which indicates whether or not
any actual flag operation has been carried out.


Location:
trunk/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/flagplotter.py

    r2001 r2115  
    3030        self._panelling = 'r'
    3131        self.set_stacking('scan')
     32        self._ismodified = False
    3233
    3334    def _newcasabar(self):
     
    9495        # simply calls scantable.save
    9596        self._data.save(name,format,overwrite)
     97
     98    def set_data(self, scan, refresh=True):
     99        if self._is_new_scan(scan):
     100            self._ismodified = False
     101        asapplotter.set_data(self, scan, refresh)
     102    set_data.__doc__ = asapplotter.set_data.__doc__
     103
     104    @asaplog_post_dec
     105    def plot(self, scan=None):
     106        if self._is_new_scan(scan):
     107            self._ismodified = False
     108        asapplotter.plot(self,scan)
     109    plot.__doc__ = asapplotter.plot.__doc__
     110
     111    def _is_new_scan(self,scan):
     112        if isinstance(scan, scantable):
     113            if self._data is not None:
     114                if scan != self._data:
     115                    return True
     116            else:
     117                return True
     118        return False
  • trunk/python/flagtoolbar.py

    r2066 r2115  
    343343        asaplog.push(sout)
    344344        del sout
     345        self.plotter._ismodified = True
    345346        self._clearup_selections(refresh=False)
    346347        self._plot_page(pagemode="current")
     
    363364        asaplog.push(sout)
    364365        del sout
     366        self.plotter._ismodified = True
    365367        self._clearup_selections(refresh=False)
    366368        self._plot_page(pagemode="current")
Note: See TracChangeset for help on using the changeset viewer.