Last change
on this file since 1821 was 1819, checked in by Kana Sugimoto, 14 years ago |
New Development: No
JIRA Issue: No (merge alma branch to trunk)
Ready for Test: Yes
Interface Changes: No
Test Programs: regressions may work
Module(s): all single dish modules
Description:
Merged all changes in alma (r1386:1818) and newfiller (r1774:1818) branch.
|
File size:
652 bytes
|
Rev | Line | |
---|
[1757] | 1 | from asap._asap import coordinate as _coordinate
|
---|
| 2 |
|
---|
| 3 | class coordinate(_coordinate):
|
---|
| 4 | """Representation of the spectral coordinate of the data (frequency axis).
|
---|
| 5 | """
|
---|
| 6 | def to_frequency(self, pixel, unit='Hz'):
|
---|
| 7 | """
|
---|
| 8 | Convert a channel/pixel value to a frequency.
|
---|
| 9 | """
|
---|
| 10 | umap = {'GHz': 1.e9, 'MHz' : 1.e6, 'kHz': 1.e3, 'Hz': 1. }
|
---|
| 11 | return _coordinate.to_frequency(self, pixel)/umap[unit]
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | def to_velocity(self, pixel, unit='km/s'):
|
---|
| 15 | """
|
---|
| 16 | Convert a channel/pixel value to a velocity.
|
---|
| 17 | """
|
---|
| 18 | umap = {'km/s': 1, 'm/s': 1e-3}
|
---|
| 19 | return _coordinate.to_velocity(self, pixel)/umap[unit]
|
---|
Note:
See
TracBrowser
for help on using the repository browser.