Changeset 407 for trunk/python


Ignore:
Timestamp:
02/10/05 15:31:36 (20 years ago)
Author:
mar637
Message:

Minor fixes around asapreader/sdreader

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r402 r407  
    345345            return retval
    346346       
    347     def get_time(self):
     347    def get_time(self, row=-1):
    348348        """
    349349        Get a list of time stamps for the observations.
    350350        Return a string for each integration in the scantable.
    351351        Parameters:
     352            row:    row no of integration. Default -1 return all rows
     353        Example:
    352354            none
    353         Example:
    354             none
    355355        """
    356356        out = []
    357         for i in range(self.nrow()):
    358             out.append(self._gettime(i))
    359         return out
     357        if row == -1:
     358            for i in range(self.nrow()):
     359                out.append(self._gettime(i))
     360            return out
     361        else:
     362            if row < self.nrow():
     363                return self._gettime(row)
    360364
    361365    def set_unit(self, unit='channel'):
     
    378382        Set the instrument for subsequent processing
    379383        Parameters:
    380             instr:    Select from "ATPKSMB", "ATPKSHOH", "ATMOPRA",
    381                       "DSS-43" (Tid), "CEDUNA", and "HOBART"
     384            instr:    Select from 'ATPKSMB', 'ATPKSHOH', 'ATMOPRA',
     385                      'DSS-43' (Tid), 'CEDUNA', and 'HOBART'
    382386        """
    383387        self._setInstrument(instr)
     
    433437                      first row, i.e. rowno=0
    434438        Returns:
    435             The abcissa values and it's format string.
     439            The abcissa values and it's format string (as a dictionary)
    436440        """
    437441        abc = self._getabcissa(rowno)
    438         lbl = self._getabcissalabel(rowno)
     442        lbl = self._getabcissalabel(rowno)       
    439443        return abc, lbl
     444        #return {'abcissa':abc,'label':lbl}
    440445
    441446    def create_mask(self, *args, **kwargs):
     
    563568            flags the spectrum for Beam=0, IF=0, Pol=1
    564569        """
    565         if (thebeam < self.nbeam() and  theif < self.nif() and thepol < self.npol()):
    566             stable.setbeam(thebeam)
    567             stable.setif(theif)
    568             stable.setpol(thepol)
    569             stable._flag(self)
     570        if (thebeam < self.nbeam() and
     571            theif < self.nif() and
     572            thepol < self.npol()):
     573            sdtable.setbeam(self, thebeam)
     574            sdtable.setif(self, theif)
     575            sdtable.setpol(self, thepol)
     576            sdtable._flag(self)
    570577        else:
    571578            print "Please specify a valid (Beam/IF/Pol)"
Note: See TracChangeset for help on using the changeset viewer.