Changeset 224


Ignore:
Timestamp:
01/19/05 17:08:47 (19 years ago)
Author:
kil064
Message:

add function 'convertflux'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r180 r224  
    8989        return
    9090       
     91def convertflux(scan, area, eta=1.0, insitu=False, all=True):
     92    """
     93    Return a scan where all spectra are converted to either Jansky or Kelvin
     94        depending upon the flux units of the scan table.
     95    Parameters:
     96        scan:        a scantable
     97        area:        the illuminated area of the telescope (m**2)
     98        eta:         The efficiency of the telescope (default 1.0)       
     99        insitu:      if False (default) a new scantable is returned.
     100                     Otherwise, the conversion is done in-situ
     101        all:         if True (default) apply to all spectra. Otherwise
     102                     apply only to the selected (beam/pol/if)spectra only
     103    """
     104    if not insitu:
     105        from asap._asap import convertflux as _convert
     106        return scantable(_convert(scan, area, eta, all))
     107    else:
     108        from asap._asap import convertflux_insitu as _convert
     109        _convert(scan, area, eta, all)
     110        return
     111       
    91112def bin(scan, width=5, insitu=False):
    92113    """
Note: See TracChangeset for help on using the changeset viewer.