Ignore:
Timestamp:
04/06/06 10:12:03 (18 years ago)
Author:
mar637
Message:

added function to convert between polarisation types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r989 r992  
    974974        if mask is None:
    975975            mask = ()
    976         s = self._math._averagepol(self, mask, weight)
     976        s = scantable(self._math._averagepol(self, mask, weight))
    977977        s._add_history("average_pol",varlist)
    978978        print_log()
    979         return scantable(s)
     979        return s
     980
     981    def convert_pol(self, poltype=None):
     982        """
     983        Convert the data to a different polarisation type.
     984        Parameters:
     985            poltype:    The new polarisation type. Valid types are:
     986                        "linear", "stokes" and "circular"
     987        """
     988        varlist = vars()
     989        try:
     990            s = scantable(self._math._convertpol(self, poltype))
     991        except RuntimeError,msg:
     992            if rcParams['verbose']:
     993              print msg
     994              return
     995            else:
     996                raise
     997        s._add_history("convert_pol",varlist)
     998        print_log()
     999        return s
    9801000
    9811001    def smooth(self, kernel="hanning", width=5.0, insitu=None):
Note: See TracChangeset for help on using the changeset viewer.