nraonrao
 
NRAO Home > CASA > CasaRef
atmosphere.getChanNum - Function

4.1.1 Get the grid position for a given frequency in the specified spectral window.
Description

Return the channel number for given frequency in the specified spectral window relative to the reference channel number.

Arguments





Inputs

freq

GHz

Frequency

allowed:

doubleGHz

Default:

spwid

Int standing for spectral window id (0-based)

allowed:

int

Default:

0

Returns
double

Example

In [2]: at.getRefFreq().value, at.getRefFreq().units  
Out[2]: (90.0, ’GHz’)  
 
In [3]: print at.getChanSep().value, at.getChanSep().units  
10.0 MHz  
 
In [4]: at.getRefChan()  
Out[4]: 32L  
 
In [5]: at.getChanNum(quantity(90.,’GHz’))  
Out[5]: 0.0  
 
In [6]: at.getChanNum(quantity(90.,’GHz’),0)  
Out[6]: 0.0  
 
In [7]: at.getChanNum(quantity(90.08,’GHz’),0)  
Out[7]: 8.0  
 
In [8]: at.getChanNum(quantity(89.985,’GHz’),0)  
Out[8]: -1.5  
 
In [9]: at.getChanNum(quantity(89.98,’GHz’),0)  
Out[9]: -2.0  
 
    

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2008 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

Updated daily during alpha development.