Last change
on this file since 913 was
898,
checked in by MatthewWhiting, 12 years ago
|
Adding the pixel scale to the DuchampBeam? object. This way we get the right value for the BMAJ,BMIN keywords when we write to the FITS file.
|
File size:
1.2 KB
|
Rev | Line | |
---|
[788] | 1 | #ifndef DUCHAMP_DUCHAMPBEAM_HH |
---|
| 2 | #define DUCHAMP_DUCHAMPBEAM_HH |
---|
| 3 | #include <duchamp/duchamp.hh> |
---|
| 4 | #include <duchamp/FitsIO/Beam.hh> |
---|
| 5 | |
---|
| 6 | #include <fitsio.h> |
---|
| 7 | |
---|
| 8 | namespace duchamp |
---|
| 9 | { |
---|
| 10 | |
---|
| 11 | enum BEAM_ORIGIN { EMPTY,HEADER, PARAM }; |
---|
| 12 | class Param; |
---|
| 13 | |
---|
| 14 | class DuchampBeam : public Beam |
---|
| 15 | { |
---|
| 16 | public: |
---|
| 17 | DuchampBeam(); |
---|
| 18 | DuchampBeam(float maj, float min, float pa); |
---|
| 19 | virtual ~DuchampBeam(){}; |
---|
| 20 | DuchampBeam(const Beam &b); |
---|
| 21 | DuchampBeam(const DuchampBeam &b); |
---|
| 22 | DuchampBeam& operator=(const DuchampBeam &b); |
---|
| 23 | |
---|
| 24 | void empty(); |
---|
| 25 | void define(float maj, float min, float pa, BEAM_ORIGIN origin); |
---|
| 26 | void setFWHM(float fwhm, BEAM_ORIGIN origin); |
---|
| 27 | void setArea(float area, BEAM_ORIGIN origin); |
---|
| 28 | |
---|
| 29 | BEAM_ORIGIN origin(){return itsOrigin;}; |
---|
[795] | 30 | std::string originString(); |
---|
[788] | 31 | bool isDefined(){return (itsOrigin != EMPTY);}; |
---|
| 32 | |
---|
| 33 | void define(Param &par,bool warn=true); // do we need this? How to define directly? |
---|
| 34 | |
---|
| 35 | void readFromFITS(fitsfile *fptr, Param &par, float pixelScale); // read from file a la headerIO.cc |
---|
| 36 | void writeToFITS(fitsfile *fptr); // write to file, but only if itsOrigin==HEADER. Use cfitsio commands directly. |
---|
| 37 | |
---|
| 38 | protected: |
---|
| 39 | BEAM_ORIGIN itsOrigin; |
---|
[898] | 40 | float itsPixelScale; |
---|
[788] | 41 | |
---|
| 42 | }; |
---|
| 43 | |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.