Ignore:
Timestamp:
03/06/06 11:51:04 (18 years ago)
Author:
mar637
Message:

move to asap2 container

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r720 r876  
    4545    # need special formatting her for history...
    4646
    47     from asap._asap import average as _av
     47    from asap._asap import stmath
     48    stm = stmath()
    4849    for s in lst:
    4950        if not isinstance(s,scantable):
     
    5455            else:
    5556                raise TypeError(msg)
    56     s = scantable(_av(lst, mask, scanAv, weight))
     57    if scanAv: scanAv = "SCAN"
     58    else: scanAv = "NONE"
     59    s = scantable(stm._average(lst, mask, weight, scanAv, False))
    5760    s._add_history("average_time",varlist)
    5861    print_log()
    5962    return s
    6063
    61 def quotient(source, reference, preserve=True):
    62     """
    63     Return the quotient of a 'source' (signal) scan and a 'reference' scan.
    64     The reference can have just one row, even if the signal has many. Otherwise
    65     they must have the same number of rows.
    66     The cursor of the output scan is set to 0
    67     Parameters:
    68         source:        the 'on' scan
    69         reference:     the 'off' scan
    70         preserve:      you can preserve (default) the continuum or
    71                        remove it.  The equations used are
    72                        preserve:  Output = Toff * (on/off) - Toff
    73                        remove:    Output = Toff * (on/off) - Ton
    74     """
    75     varlist = vars()
    76     from asap._asap import quotient as _quot
    77     s = scantable(_quot(source, reference, preserve))
    78     s._add_history("quotient",varlist)
    79     print_log()
    80     return s
     64# def quotient(source, reference, preserve=True):
     65#     """
     66#     Return the quotient of a 'source' (signal) scan and a 'reference' scan.
     67#     The reference can have just one row, even if the signal has many. Otherwise
     68#     they must have the same number of rows.
     69#     The cursor of the output scan is set to 0
     70#     Parameters:
     71#         source:        the 'on' scan
     72#         reference:     the 'off' scan
     73#         preserve:      you can preserve (default) the continuum or
     74#                        remove it.  The equations used are
     75#                        preserve:  Output = Toff * (on/off) - Toff
     76#                        remove:    Output = Toff * (on/off) - Ton
     77#     """
     78#     varlist = vars()
     79#     from asap._asap import quotient as _quot
     80#     s = scantable(_quot(source, reference, preserve))
     81#     s._add_history("quotient",varlist)
     82#     print_log()
     83#     return s
    8184
    8285def simple_math(left, right, op='add', tsys=True):
     
    9497    """
    9598    varlist = vars()
     99    print "Not yet available in asap"
     100    return
    96101    if not isinstance(left,scantable) and not isinstance(right,scantable):
    97102        msg = "Please provide two scantables as input"
Note: See TracChangeset for help on using the changeset viewer.