[1325] | 1 | //#--------------------------------------------------------------------------- |
---|
| 2 | //# SDFITSwriter.h: ATNF CFITSIO interface class for SDFITS output. |
---|
| 3 | //#--------------------------------------------------------------------------- |
---|
[1452] | 4 | //# Copyright (C) 2000-2008 |
---|
[1325] | 5 | //# Mark Calabretta, ATNF |
---|
| 6 | //# |
---|
| 7 | //# This library is free software; you can redistribute it and/or modify it |
---|
| 8 | //# under the terms of the GNU Library General Public License as published by |
---|
| 9 | //# the Free Software Foundation; either version 2 of the License, or (at your |
---|
| 10 | //# option) any later version. |
---|
| 11 | //# |
---|
| 12 | //# This library is distributed in the hope that it will be useful, but WITHOUT |
---|
| 13 | //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
| 14 | //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public |
---|
| 15 | //# License for more details. |
---|
| 16 | //# |
---|
| 17 | //# You should have received a copy of the GNU Library General Public License |
---|
| 18 | //# along with this library; if not, write to the Free Software Foundation, |
---|
| 19 | //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. |
---|
| 20 | //# |
---|
| 21 | //# Correspondence concerning this software should be addressed as follows: |
---|
| 22 | //# Internet email: mcalabre@atnf.csiro.au. |
---|
| 23 | //# Postal address: Dr. Mark Calabretta, |
---|
| 24 | //# Australia Telescope National Facility, |
---|
| 25 | //# P.O. Box 76, |
---|
| 26 | //# Epping, NSW, 2121, |
---|
| 27 | //# AUSTRALIA |
---|
| 28 | //# |
---|
[1452] | 29 | //# $Id: SDFITSwriter.h,v 19.9 2008-11-17 06:48:32 cal103 Exp $ |
---|
[1325] | 30 | //#--------------------------------------------------------------------------- |
---|
| 31 | //# Original: 2000/07/24, Mark Calabretta, ATNF |
---|
| 32 | //#--------------------------------------------------------------------------- |
---|
| 33 | |
---|
| 34 | #ifndef ATNF_SDFITSWRITER_H |
---|
| 35 | #define ATNF_SDFITSWRITER_H |
---|
| 36 | |
---|
[1452] | 37 | #include <atnf/PKSIO/MBrecord.h> |
---|
| 38 | #include <atnf/PKSIO/PKSmsg.h> |
---|
[1325] | 39 | |
---|
| 40 | #include <fitsio.h> |
---|
| 41 | |
---|
[1452] | 42 | using namespace std; |
---|
| 43 | |
---|
[1325] | 44 | // <summary> |
---|
| 45 | // ATNF CFITSIO interface class for SDFITS output. |
---|
| 46 | // </summary> |
---|
| 47 | |
---|
[1452] | 48 | class SDFITSwriter : public PKSmsg |
---|
[1325] | 49 | { |
---|
| 50 | public: |
---|
| 51 | // Default constructor. |
---|
| 52 | SDFITSwriter(); |
---|
| 53 | |
---|
| 54 | // Destructor. |
---|
[1452] | 55 | virtual ~SDFITSwriter(); |
---|
[1325] | 56 | |
---|
| 57 | // Create a new SDFITSwriter and store static data. |
---|
| 58 | int create( |
---|
| 59 | char* sdname, |
---|
| 60 | char* observer, |
---|
| 61 | char* project, |
---|
| 62 | char* telescope, |
---|
| 63 | double antPos[3], |
---|
| 64 | char* obsMode, |
---|
[1399] | 65 | char* bunit, |
---|
[1325] | 66 | float equinox, |
---|
| 67 | char* dopplerFrame, |
---|
| 68 | int nIF, |
---|
| 69 | int* nChan, |
---|
| 70 | int* nPol, |
---|
| 71 | int* haveXPol, |
---|
| 72 | int haveBase, |
---|
| 73 | int extraSysCal); |
---|
| 74 | |
---|
| 75 | // Store time-variable data. |
---|
[1452] | 76 | int write(MBrecord &record); |
---|
[1325] | 77 | |
---|
[1399] | 78 | // Write a history record. |
---|
| 79 | int history(char* text); |
---|
| 80 | |
---|
[1325] | 81 | // Close the SDFITS file. |
---|
| 82 | void close(); |
---|
| 83 | |
---|
| 84 | // Close and delete the SDFITS file. |
---|
| 85 | void deleteFile(); |
---|
| 86 | |
---|
| 87 | private: |
---|
| 88 | fitsfile *cSDptr; |
---|
| 89 | int cDoTDIM, cDoXPol, cExtraSysCal, cHaveBase, *cHaveXPol, cIsMX, |
---|
| 90 | *cNChan, cNIF, *cNPol, cStatus; |
---|
| 91 | long cRow; |
---|
[1452] | 92 | |
---|
| 93 | // Message handling. |
---|
| 94 | char cMsg[256]; |
---|
| 95 | virtual void logMsg(const char *msg = 0x0); |
---|
[1325] | 96 | }; |
---|
| 97 | |
---|
| 98 | #endif |
---|