Changeset 2937 for trunk


Ignore:
Timestamp:
04/25/14 14:20:31 (10 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: Yes CAS-6485

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): sd

Description: modified scantable.parse_spw_selection() so that velocity corresponding to the central frequency rather than the centeral value of velocity range is checked in selecting spw via velocity ranges.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r2936 r2937  
    20112011                                """
    20122012
    2013                                 fhead = coord['coord'].to_frequency(0)
    2014                                 ftail = coord['coord'].to_frequency(self.nchan(spw) - 1)
     2013                                crd = coord['coord']
     2014                                fhead = crd.to_frequency(0)
     2015                                ftail = crd.to_frequency(self.nchan(spw) - 1)
    20152016                                fcen  = (fhead + ftail) / 2.0
    20162017
     
    20472048                                """
    20482049
    2049                                 vhead = coord['coord'].to_velocity(0)
    2050                                 vtail = coord['coord'].to_velocity(self.nchan(spw) - 1)
    2051                                 vcen  = (vhead + vtail) / 2.0
     2050                                crd = coord['coord']
     2051                                fhead = crd.to_frequency(0)
     2052                                ftail = crd.to_frequency(self.nchan(spw) - 1)
     2053                                fcen  = (fhead + ftail) / 2.0
     2054                                vcen  = crd.to_velocity(crd.to_pixel(fcen))
    20522055
    20532056                                if ((expr_vmin <= vcen) and (vcen <= expr_vmax)):
Note: See TracChangeset for help on using the changeset viewer.