Ignore:
Timestamp:
07/08/09 16:30:04 (15 years ago)
Author:
Malte Marquarding
Message:

Ticket #170: python derived class for nice access e.g. units and doc strings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r1594 r1600  
    55from asap import selector
    66from asap import linecatalog
     7from asap.coordinate import coordinate
    78from asap import _n_bools, mask_not, mask_and, mask_or
    89
     
    293294        assert(len(spec) == self.nchan())
    294295        return self._setspectrum(spec, rowno)
     296
     297    def get_coordinate(self, rowno):
     298        """Return the (spectral) coordinate for a a given 'rowno'.
     299        NOTE:
     300            * This coordinate is only valid until a scantable method modifies
     301              the frequency axis.
     302            * This coordinate does contain the original frequency set-up
     303              NOT the new frame. The conversions however are done using the user
     304              specified frame (e.g. LSRK/TOPO). To get the 'real' coordinate,
     305              use scantable.freq_align first. Without it there is no closure,
     306              i.e.
     307              c = myscan.get_coordinate(0)
     308              c.to_frequency(c.get_reference_pixel()) != c.get_reference_value()
     309
     310        Parameters:
     311             rowno:    the row number for the spectral coordinate
     312
     313        """
     314        return coordinate(Scantable.get_coordinate(self, rowno))
    295315
    296316    def get_selection(self):
Note: See TracChangeset for help on using the changeset viewer.