Changeset 1689 for trunk/python


Ignore:
Timestamp:
02/10/10 11:59:23 (15 years ago)
Author:
Malte Marquarding
Message:

Ticket #177: added skydip function to determine opacities. This resulted in a slight interface change to accept lists of opacities in the scantable.opacity function

Location:
trunk/python
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/__init__.py

    r1645 r1689  
    389389from simplelinefinder import simplelinefinder
    390390from linecatalog import linecatalog
     391from opacity import skydip
    391392
    392393if rcParams['useplotter']:
  • trunk/python/asapfitter.py

    r1589 r1689  
    485485
    486486    @print_log_dec
    487     def plot(self, residual=False, components=None, plotparms=False, filename=None):
     487    def plot(self, residual=False, components=None, plotparms=False,
     488             filename=None):
    488489        """
    489490        Plot the last fit.
  • trunk/python/scantable.py

    r1617 r1689  
     1import functools
    12from asap._asap import Scantable
    23from asap import rcParams
     
    78from asap.coordinate import coordinate
    89from asap import _n_bools, mask_not, mask_and, mask_or
     10
     11
     12def preserve_selection(func):
     13    @functools.wraps(func)
     14    def wrap(obj, *args, **kw):
     15        basesel = obj.get_selection()
     16        val = func(obj, *args, **kw)
     17        obj.set_selection(basesel)
     18        return val
     19    return wrap
     20
    921
    1022class scantable(Scantable):
     
    11041116        and Tsys are multiplied by the correction factor.
    11051117        Parameters:
    1106             tau:         Opacity from which the correction factor is
     1118            tau:         (list of) opacity from which the correction factor is
    11071119                         exp(tau*ZD)
    1108                          where ZD is the zenith-distance
     1120                         where ZD is the zenith-distance.
     1121                         If a list is provided, it has to be of length nIF,
     1122                         nIF*nPol or 1 and in order of IF/POL, e.g.
     1123                         [opif0pol0, opif0pol1, opif1pol0 ...]
    11091124            insitu:      if False a new scantable is returned.
    11101125                         Otherwise, the scaling is done in-situ
     
    11141129        self._math._setinsitu(insitu)
    11151130        varlist = vars()
     1131        if not hasattr(tau, "__len__"):
     1132            tau = [tau]
    11161133        s = scantable(self._math._opacity(self, tau))
    11171134        s._add_history("opacity", varlist)
Note: See TracChangeset for help on using the changeset viewer.