|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
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). The value
must be >= 0.
| |
| allowed: | int |
|
| Default: | 0 |
|
double
Example
# List current spectral window setting of SPW0
at.getRefFreq()[’value’][0], at.getRefFreq()[’unit’]
# (90.0, ’GHz’)
print at.getChanSep()[’value’][0], at.getChanSep()[’unit’]
# 10.0 MHz
at.getRefChan()
# 32
# Get grid positions
at.getChanNum(qa.quantity(90., ’GHz’))
# 0.0
at.getChanNum(qa.quantity(90., ’GHz’), 0)
# 0.0
at.getChanNum(qa.quantity(90.08, ’GHz’), 0)
# 8.0
at.getChanNum(qa.quantity(89.985, ’GHz’), 0)
# -1.5
at.getChanNum(qa.quantity(89.98,’GHz’), 0)
# -2.0
__________________________________________________________________
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