Last change
on this file since 1213 was
1123,
checked in by MatthewWhiting, 12 years ago
|
Moving the code that reads from and writes to FITS files containing reconstructed, momentmap, mask etc arrays to the FitsIO directory, away from Cubes. Updating all include statements as well.
|
File size:
989 bytes
|
Rev | Line | |
---|
[1115] | 1 | #ifndef DUCHAMP_WRITE_ARRAY_HH_ |
---|
| 2 | #define DUCHAMP_WRITE_ARRAY_HH_ |
---|
| 3 | |
---|
| 4 | #include <duchamp/duchamp.hh> |
---|
| 5 | #include <duchamp/Cubes/cubes.hh> |
---|
| 6 | #include <fitsio.h> |
---|
| 7 | |
---|
| 8 | namespace duchamp { |
---|
| 9 | |
---|
| 10 | class WriteArray |
---|
| 11 | { |
---|
| 12 | public: |
---|
| 13 | WriteArray(); |
---|
| 14 | WriteArray(Cube *cube); |
---|
| 15 | WriteArray(Cube *cube, int bitpix); |
---|
| 16 | WriteArray(const WriteArray& other); |
---|
| 17 | WriteArray& operator= (const WriteArray& other); |
---|
| 18 | virtual ~WriteArray(){}; |
---|
| 19 | |
---|
| 20 | void setCube(Cube *cube){itsCube=cube;}; |
---|
| 21 | void setBitpix(int bitpix){itsBitpix = bitpix;}; |
---|
| 22 | void setFilename(std::string filename){itsFilename=filename;}; |
---|
| 23 | void setFITSptr(fitsfile *fptr){itsFptr=fptr;}; |
---|
| 24 | void set2D(bool b){itsFlag2D=b;}; |
---|
| 25 | |
---|
| 26 | OUTCOME openFile(); |
---|
| 27 | OUTCOME writeBasicHeader(); |
---|
| 28 | virtual OUTCOME writeHeader() = 0; |
---|
| 29 | virtual OUTCOME writeData() = 0; |
---|
| 30 | OUTCOME closeFile(); |
---|
| 31 | |
---|
[1120] | 32 | OUTCOME write(); |
---|
| 33 | |
---|
[1115] | 34 | protected: |
---|
| 35 | Cube *itsCube; |
---|
| 36 | std::string itsFilename; |
---|
| 37 | int itsBitpix; |
---|
| 38 | bool itsFlag2D; |
---|
[1121] | 39 | fitsfile *itsFptr; |
---|
[1115] | 40 | }; |
---|
| 41 | |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.