casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
PKSSDwriter.h
Go to the documentation of this file.
00001 //#---------------------------------------------------------------------------
00002 //# PKSSDwriter.h: Class to write Parkes multibeam data to an SDFITS file.
00003 //#---------------------------------------------------------------------------
00004 //# livedata - processing pipeline for single-dish, multibeam spectral data.
00005 //# Copyright (C) 2000-2009, Australia Telescope National Facility, CSIRO
00006 //#
00007 //# This file is part of livedata.
00008 //#
00009 //# livedata is free software: you can redistribute it and/or modify it under
00010 //# the terms of the GNU General Public License as published by the Free
00011 //# Software Foundation, either version 3 of the License, or (at your option)
00012 //# any later version.
00013 //#
00014 //# livedata is distributed in the hope that it will be useful, but WITHOUT
00015 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00016 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
00017 //# more details.
00018 //#
00019 //# You should have received a copy of the GNU General Public License along
00020 //# with livedata.  If not, see <http://www.gnu.org/licenses/>.
00021 //#
00022 //# Correspondence concerning livedata may be directed to:
00023 //#        Internet email: mcalabre@atnf.csiro.au
00024 //#        Postal address: Dr. Mark Calabretta
00025 //#                        Australia Telescope National Facility, CSIRO
00026 //#                        PO Box 76
00027 //#                        Epping NSW 1710
00028 //#                        AUSTRALIA
00029 //#
00030 //# http://www.atnf.csiro.au/computing/software/livedata.html
00031 //# $Id: PKSSDwriter.h,v 19.17 2009-09-29 07:33:38 cal103 Exp $
00032 //# Original: 2000/07/21, Mark Calabretta, ATNF
00033 //#---------------------------------------------------------------------------
00034 
00035 #ifndef ATNF_PKSSDWRITER_H
00036 #define ATNF_PKSSDWRITER_H
00037 
00038 #include <atnf/PKSIO/PKSwriter.h>
00039 #include <atnf/PKSIO/PKSrecord.h>
00040 #include <atnf/PKSIO/SDFITSwriter.h>
00041 
00042 #include <casa/aips.h>
00043 #include <casa/stdio.h>
00044 #include <casa/Arrays/Vector.h>
00045 #include <casa/Arrays/Matrix.h>
00046 #include <casa/BasicSL/Complex.h>
00047 #include <casa/BasicSL/String.h>
00048 
00049 #include <casa/namespace.h>
00050 
00051 // <summary>
00052 // Class to write Parkes multibeam data to an SDFITS file.
00053 // </summary>
00054 
00055 class PKSSDwriter : public PKSwriter
00056 {
00057   public:
00058     // Default constructor.
00059     PKSSDwriter();
00060 
00061     // Destructor.
00062     virtual ~PKSSDwriter();
00063 
00064     // Create the SDFITS file and write static data.
00065     virtual Int create(
00066         const String sdName,
00067         const String observer,
00068         const String project,
00069         const String antName,
00070         const Vector<Double> antPosition,
00071         const String obsMode,
00072         const String bunit,
00073         const Float  equinox,
00074         const String dopplerFrame,
00075         const Vector<uInt> nChan,
00076         const Vector<uInt> nPol,
00077         const Vector<Bool> haveXPol,
00078         const Bool   haveBase);
00079 
00080     // Write the next data record.
00081     virtual Int write(
00082         const PKSrecord &pksrec);
00083 
00084     // Write a history record.
00085     virtual Int history(const String text);
00086     virtual Int history(const char *text);
00087 
00088     // Close the SDFITS file.
00089     virtual void close();
00090 
00091   private:
00092     // Masks declaration in parent class.
00093     Vector<uInt> cHaveXPol;
00094 
00095     SDFITSwriter cSDwriter;
00096 };
00097 
00098 #endif