Last change
on this file since 2359 was 1757, checked in by Kana Sugimoto, 14 years ago |
New Development: Yes
JIRA Issue: Yes (CAS-2211)
Ready for Test: Yes
Interface Changes: Yes
What Interface Changed: ASAP 3.0.0 interface changes
Test Programs:
Put in Release Notes: Yes
Module(s): all the CASA sd tools and tasks are affected.
Description: Merged ATNF-ASAP 3.0.0 developments to CASA (alma) branch.
Note you also need to update casa/code/atnf.
|
File size:
1.3 KB
|
Rev | Line | |
---|
[1757] | 1 | //
|
---|
| 2 | // C++ Interface: STCoordinate
|
---|
| 3 | //
|
---|
| 4 | // Description:
|
---|
| 5 | //
|
---|
| 6 | //
|
---|
| 7 | // Author: Malte Marquarding <Malte.Marquarding@csiro.au>, (C) 2009
|
---|
| 8 | //
|
---|
| 9 | // Copyright: See COPYING file that comes with this distribution
|
---|
| 10 | //
|
---|
| 11 | //
|
---|
| 12 | #ifndef ASAPSTCOORDINATE_H
|
---|
| 13 | #define ASAPSTCOORDINATE_H
|
---|
| 14 |
|
---|
| 15 | #include <vector>
|
---|
| 16 |
|
---|
| 17 | #include <casa/aips.h>
|
---|
| 18 | #include <casa/Arrays/Array.h>
|
---|
| 19 | #include <casa/Arrays/Vector.h>
|
---|
| 20 | #include <coordinates/Coordinates/SpectralCoordinate.h>
|
---|
| 21 |
|
---|
| 22 | namespace asap {
|
---|
| 23 |
|
---|
| 24 | class STCoordinate {
|
---|
| 25 | public:
|
---|
| 26 | STCoordinate() {};
|
---|
| 27 |
|
---|
| 28 | STCoordinate(const STCoordinate& other) : spec_(other.spec_) {};
|
---|
| 29 |
|
---|
| 30 | STCoordinate(const casa::SpectralCoordinate& spec) :
|
---|
| 31 | spec_(spec) {};
|
---|
| 32 |
|
---|
| 33 | virtual ~STCoordinate() {};
|
---|
| 34 |
|
---|
| 35 | double getReferencePixel() {
|
---|
| 36 | return spec_.referencePixel()(0);
|
---|
| 37 | };
|
---|
| 38 |
|
---|
| 39 | double getReferenceValue() {
|
---|
| 40 | return spec_.referenceValue()(0);
|
---|
| 41 | };
|
---|
| 42 |
|
---|
| 43 | double getIncrement() {
|
---|
| 44 | return spec_.increment()(0);
|
---|
| 45 | }
|
---|
| 46 |
|
---|
| 47 | double toFrequency(double pix) {
|
---|
| 48 | casa::Double world;
|
---|
| 49 | spec_.toWorld(world, pix);
|
---|
| 50 | return world;
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | double toVelocity(double pix) {
|
---|
| 54 | casa::Double vel;
|
---|
| 55 | spec_.pixelToVelocity(vel, pix);
|
---|
| 56 | return vel;
|
---|
| 57 | }
|
---|
| 58 |
|
---|
| 59 | double toPixel(double world) {
|
---|
| 60 | casa::Double pix;
|
---|
| 61 | spec_.toPixel(pix, world);
|
---|
| 62 | return pix;
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 | private:
|
---|
| 66 | casa::SpectralCoordinate spec_;
|
---|
| 67 | };
|
---|
| 68 |
|
---|
| 69 | }
|
---|
| 70 |
|
---|
| 71 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.