Changeset 1471


Ignore:
Timestamp:
01/15/09 12:10:40 (16 years ago)
Author:
Malte Marquarding
Message:

added publich get/set_spectrum functions

Location:
trunk/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/__init__.py

    r1434 r1471  
    434434            get_restfreqs   - get the current list of rest frequencies
    435435            set_restfreqs   - set a list of rest frequencies
    436                 shift_refpix    - shift the reference pixel of the IFs
     436            shift_refpix    - shift the reference pixel of the IFs
     437            set_spectrum    - overwrite the spectrum for a given row
     438            get_spectrum    - retrieve the spectrum for a given
     439            get_mask        - retrieve the mask for a given
    437440            flag            - flag selected channels in the data
    438441            lag_flag        - flag specified frequency in the data
  • trunk/python/scantable.py

    r1443 r1471  
    277277            return info
    278278
     279    def get_spectrum(self, rownow):
     280        """Return the spectrum for the current row in the scantable as a list.
     281        Parameters:
     282             rowno:   the row number to retrieve the spectrum from       
     283        """
     284        return self._getspectrum(rowno)
     285
     286    def get_mask(self, rowno):
     287        """Return the mask for the current row in the scantable as a list.
     288        Parameters:
     289             rowno:   the row number to retrieve the mask from       
     290        """
     291        return self._getmask(rowno)
     292
     293    def set_spectrum(self, spec, rowno):
     294        """Return the spectrum for the current row in the scantable as a list.
     295        Parameters:
     296             spec:   the spectrum
     297             rowno:    the row number to set the spectrum for       
     298        """
     299        assert(len(spec) == self.nchan())
     300        return self._setspectrum(spec, rowno)
    279301
    280302    def get_selection(self):
     
    685707                          to remove
    686708            width:        the width of the frequency to remove, to remove a
    687                           range of frequencies aroung the centre.
     709                          range of frequencies around the centre.
    688710            unit:         the frequency unit (default "GHz")
    689711        Notes:
Note: See TracChangeset for help on using the changeset viewer.