NRAO Home > CASA > CASA Toolkit Reference Manual

5.1.9 sd.coordinate - Tool

Single-dish specific spectral coordinate conversion
Description

The coordinate class is a representation of the spectral coordinate (frequency axis) of the data. It handles a conversion between pixel/channel values and frequency/velocity ones under the current spectral coordinate.

Spectral coordinate is composed of a set of three values: a reference pixel, a frequency in Hz at the reference pixel, and an increment in Hz (width of each pixel).

Normally, the object of this class is not created from scratch. Instead, the object can be obtained from scantable object using get_coordinate method. Returned spectral coordinate contains spectral coordinate information and rest frequency value, which is needed to handle velocity conversion, of the given row.

Example

     # create a scantable object  
     s=sd.scantable(’OrionS_rawACSmod’,average=False)  
     # get coordinate system  
     c=s.get_coordinate(0)  
     # get coordinate system values  
     c.get_increment()  
     6104.2329788208008  
     c.get_reference_pixel()  
     4096.0  
     c.get_reference_value()  
     45489353563.344795  
     # get pixel value  
     c.to_pixel(4.5489e10)  
     4038.0789891175605  
     # get frequency at channel 0  
     c.to_frequency(0)  
     45464350625.063545  
     # get velocity at channel 0  
     c.to_velocity(0)  
     170.73624010940924

Methods

coordinate Constructor
coordinate.get_increment Get increment of this coordinate system
coordinate.get_reference_pixel Get reference pixel of this coordinate system
coordinate.get_reference_valueGet reference value of this coordinate system
coordinate.to_frequency Convert a channel/pixel value to a frequency
coordinate.to_pixel Convert a frequency value to a channel/pixel
coordinate.to_velocity Convert a channel/pixel value to a velocity

    sd.coordinate.coordinate - Function
    sd.coordinate.coordinate.get_increment - Function
    sd.coordinate.coordinate.get_reference_pixel - Function
    sd.coordinate.coordinate.get_reference_value - Function
    sd.coordinate.coordinate.to_frequency - Function
    sd.coordinate.coordinate.to_pixel - Function
    sd.coordinate.coordinate.to_velocity - Function


More information about CASA may be found at the CASA web page

Copyright © 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search