Changeset 2754 for trunk/python


Ignore:
Timestamp:
01/31/13 13:14:27 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CSV-2532 (may be related to CSV-1908 and CSV-2161)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: In tool level, added parameter 'freq_tolsr' to

scantable constructor and function sd.splitant.

Test Programs: test_sdsave, test_importasdm_sd

Put in Release Notes: Yes

Module(s): Module Names change impacts.

Description: Describe your changes here...

In importing MS to Scantable, frequency frame information is
imported as is by default, i.e., base frame in Scantable is
TOPO for ALMA data, which is forcibly converted to LSRK with
wrong time and direction reference.

Some functions have a boolean parameter 'freq_tolsr' that controls
the above behavior. If freq_tolsr is False (default), frequency
is imported as is, while frequency is converted to LSRK (wrongly)
when it is True.


Location:
trunk/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r2646 r2754  
    949949
    950950@asaplog_post_dec
    951 def splitant(filename, outprefix='',overwrite=False):
     951def splitant(filename, outprefix='',overwrite=False, getpt=True, freq_tolsr=False):
    952952    """
    953953    Split Measurement set by antenna name, save data as a scantables,
     
    963963                    The default False is to return with warning
    964964                    without writing the output. USE WITH CARE.
     965       getpt        Whether to import direction from MS/POINTING
     966                    table or not. Default is True (import direction).
     967       freq_tolsr   Whether to convert frequency frame information
     968                    to LSRK or not. Default is False (import as is).
    965969
    966970    """
     
    10081012        tb.open(tablename=filename,nomodify=True)
    10091013        tbsel=tb.query('ANTENNA1 == %s && ANTENNA2 == %s'%(antid,antid),tmpname)
    1010         scan=scantable(tmpname,average=False,getpt=True,antenna=int(antid))
     1014        scan=scantable(tmpname,average=False,antenna=int(antid),getpt=getpt,freq_tolsr=freq_tolsr,)
    10111015        outname=prefix+antnames[antid]+'.asap'
    10121016        scan.save(outname,format='ASAP',overwrite=overwrite)
  • trunk/python/scantable.py

    r2753 r2754  
    209209                          Default (false) is taken from rc file.
    210210
     211            getpt:        Whether to import direction from MS/POINTING
     212                          table properly or not.
     213                          This is effective only when filename is MS.
     214                          The default (True) is to import direction
     215                          from MS/POINTING.
     216
     217            freq_tolsr:   Whether to convert frequency frame information
     218                          to LSRK or not.
     219                          This is effective only when filename is MS.
     220                          The default (False) is to import frequency
     221                          as is.
     222                         
    211223        """
    212224        if average is None:
Note: See TracChangeset for help on using the changeset viewer.