[1443] | 1 | //#---------------------------------------------------------------------------
|
---|
| 2 | //# STFITSImageWriter.h: ASAP class to write out single dish spectra as image FITS
|
---|
| 3 | //#---------------------------------------------------------------------------
|
---|
| 4 | //# Copyright (C) 2008
|
---|
| 5 | //# ATNF
|
---|
| 6 | //#
|
---|
| 7 | //# This program is free software; you can redistribute it and/or modify it
|
---|
| 8 | //# under the terms of the GNU General Public License as published by the Free
|
---|
| 9 | //# Software Foundation; either version 2 of the License, or (at your option)
|
---|
| 10 | //# any later version.
|
---|
| 11 | //#
|
---|
| 12 | //# This program is distributed in the hope that it will be useful, but
|
---|
| 13 | //# WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 14 | //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
---|
| 15 | //# Public License for more details.
|
---|
| 16 | //#
|
---|
| 17 | //# You should have received a copy of the GNU General Public License along
|
---|
| 18 | //# with this program; if not, write to the Free Software Foundation, Inc.,
|
---|
| 19 | //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
|
---|
| 20 | //#
|
---|
| 21 | //# Correspondence concerning this software should be addressed as follows:
|
---|
| 22 | //# Internet email: Malte.Marquarding@csiro.au
|
---|
| 23 | //# Postal address: Malte Marquarding,
|
---|
| 24 | //# Australia Telescope National Facility,
|
---|
| 25 | //# P.O. Box 76,
|
---|
| 26 | //# Epping, NSW, 2121,
|
---|
| 27 | //# AUSTRALIA
|
---|
| 28 | //#
|
---|
| 29 | //# $Id: STFITSImageWriter.h 1106 2006-08-03 00:28:39Z mar637 $
|
---|
| 30 | //#---------------------------------------------------------------------------
|
---|
| 31 | #ifndef STFITSIMAGEWRITER_H
|
---|
| 32 | #define STFITSIMAGEWRITER_H
|
---|
| 33 |
|
---|
| 34 | #include <casa/aips.h>
|
---|
| 35 | #include <casa/BasicSL/String.h>
|
---|
| 36 | #include <casa/ostream.h>
|
---|
| 37 |
|
---|
| 38 | #include <coordinates/Coordinates/DirectionCoordinate.h>
|
---|
| 39 | #include "Scantable.h"
|
---|
| 40 | #include "Logger.h"
|
---|
| 41 |
|
---|
| 42 | namespace asap {
|
---|
| 43 | /**
|
---|
| 44 | * A class to export a Scantable to FITS file(s)
|
---|
| 45 | */
|
---|
| 46 | class STFITSImageWriter : public Logger {
|
---|
| 47 | public:
|
---|
| 48 | // Constructor
|
---|
| 49 | STFITSImageWriter();
|
---|
| 50 |
|
---|
| 51 | // Destructor
|
---|
| 52 | virtual ~STFITSImageWriter();
|
---|
| 53 |
|
---|
| 54 | // Write out ascii table
|
---|
| 55 | casa::Bool write(const Scantable& table, const casa::String& name);
|
---|
| 56 |
|
---|
| 57 | void setClass(casa::Bool flag) { isClass_ = flag; }
|
---|
| 58 |
|
---|
| 59 | private:
|
---|
| 60 | casa::DirectionCoordinate getDirectionCoordinate(const casa::String& reff,
|
---|
| 61 | casa::Double lon,
|
---|
| 62 | casa::Double lat);
|
---|
[1444] | 63 | // Apply hacks to fits file so it can be read by class
|
---|
| 64 | // modifications are
|
---|
| 65 | // CTYPE1 : FREQ-XYZ -> FREQ
|
---|
| 66 | // CRVAL1 : -> CRVAL1-RESTFREQ
|
---|
[1443] | 67 | void classHackHeader(const casa::String& filename);
|
---|
| 68 |
|
---|
| 69 | casa::Bool isClass_;
|
---|
| 70 | };
|
---|
| 71 |
|
---|
| 72 | }// namespace
|
---|
| 73 | #endif
|
---|