|
Last change
on this file since 3146 was 3106, checked in by Takeshi Nakazato, 9 years ago |
|
New Development: No
JIRA Issue: No
Ready for Test: Yes/No
Interface Changes: Yes/No
What Interface Changed: Please list interface changes
Test Programs: List test programs
Put in Release Notes: Yes/No
Module(s): Module Names change impacts.
Description: Describe your changes here...
Check-in asap modifications from Jim regarding casacore namespace conversion.
|
|
File size:
1.3 KB
|
| Rev | Line | |
|---|
| [1599] | 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() {};
|
|---|
| [1600] | 27 |
|
|---|
| 28 | STCoordinate(const STCoordinate& other) : spec_(other.spec_) {};
|
|---|
| 29 |
|
|---|
| [3106] | 30 | STCoordinate(const casacore::SpectralCoordinate& spec) :
|
|---|
| [1599] | 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) {
|
|---|
| [3106] | 48 | casacore::Double world;
|
|---|
| [1599] | 49 | spec_.toWorld(world, pix);
|
|---|
| 50 | return world;
|
|---|
| 51 | }
|
|---|
| 52 |
|
|---|
| 53 | double toVelocity(double pix) {
|
|---|
| [3106] | 54 | casacore::Double vel;
|
|---|
| [1599] | 55 | spec_.pixelToVelocity(vel, pix);
|
|---|
| 56 | return vel;
|
|---|
| 57 | }
|
|---|
| 58 |
|
|---|
| 59 | double toPixel(double world) {
|
|---|
| [3106] | 60 | casacore::Double pix;
|
|---|
| [1599] | 61 | spec_.toPixel(pix, world);
|
|---|
| 62 | return pix;
|
|---|
| 63 | }
|
|---|
| 64 |
|
|---|
| 65 | private:
|
|---|
| [3106] | 66 | casacore::SpectralCoordinate spec_;
|
|---|
| [1599] | 67 | };
|
|---|
| 68 |
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.