Changeset 930 for trunk/python


Ignore:
Timestamp:
03/24/06 13:43:33 (19 years ago)
Author:
mar637
Message:

added align arg to average_time().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r918 r930  
    1616                  (integration time weighted) or 'tintsys' (Tsys
    1717                  and tint). The default is 'tint'
     18        align:    align the spectra in velocity before averaging. It takes
     19                  the time of the first spectrum in the first scantable
     20                  as reference time.
    1821    Example:
    1922        # return a time averaged scan from scana and scanb
     
    2427        scanav = average_time(scan, scanav=True)
    2528    """
    26     scanAv = False
     29    scanav = False
    2730    if kwargs.has_key('scanav'):
    28        scanAv = kwargs.get('scanav')
     31       scanav = kwargs.get('scanav')
    2932    weight = 'tint'
    3033    if kwargs.has_key('weight'):
     
    3336    if kwargs.has_key('mask'):
    3437        mask = kwargs.get('mask')
     38    align = False
     39    if kwargs.has_key('align'):
     40        align = kwargs.get('align')
    3541    varlist = vars()
    3642    if isinstance(args[0],list):
     
    5763    if scanAv: scanAv = "SCAN"
    5864    else: scanAv = "NONE"
    59     s = scantable(stm._average(lst, mask, weight, scanAv, False))
     65    s = scantable(stm._average(lst, mask, weight, scanav, align))
    6066    s._add_history("average_time",varlist)
    6167    print_log()
Note: See TracChangeset for help on using the changeset viewer.