casa
$Rev:20696$
|
00001 //#--------------------------------------------------------------------------- 00002 //# PKSwriter.h: Class to write out Parkes multibeam data. 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: PKSwriter.h,v 19.17 2009-09-29 07:33:39 cal103 Exp $ 00032 //#--------------------------------------------------------------------------- 00033 00034 #ifndef ATNF_PKSWRITER_H 00035 #define ATNF_PKSWRITER_H 00036 00037 #include <atnf/PKSIO/PKSrecord.h> 00038 00039 #include <casa/aips.h> 00040 #include <casa/Arrays/Matrix.h> 00041 #include <casa/Arrays/Vector.h> 00042 #include <casa/BasicSL/Complex.h> 00043 #include <casa/BasicSL/String.h> 00044 00045 #include <casa/namespace.h> 00046 00047 // <summary> 00048 // Class to write out Parkes multibeam data. 00049 // </summary> 00050 00051 class PKSwriter 00052 { 00053 public: 00054 // Destructor. 00055 virtual ~PKSwriter() {}; 00056 00057 // Create the output file and and write static data. 00058 virtual Int create( 00059 const String outName, 00060 const String observer, 00061 const String project, 00062 const String antName, 00063 const Vector<Double> antPosition, 00064 const String obsMode, 00065 const String bunit, 00066 const Float equinox, 00067 const String dopplerFrame, 00068 const Vector<uInt> nChan, 00069 const Vector<uInt> nPol, 00070 const Vector<Bool> haveXPol, 00071 const Bool havebase) = 0; 00072 00073 // Write the next data record. 00074 virtual Int write ( 00075 const PKSrecord &pksrec) = 0; 00076 00077 // Write a history record. 00078 virtual Int history(const String text) {return 0;}; 00079 virtual Int history(const char *text) {return 0;}; 00080 00081 // Close the output file. 00082 virtual void close() = 0; 00083 00084 protected: 00085 Bool cHaveBase; 00086 uInt cNIF; 00087 Vector<Bool> cHaveXPol; 00088 Vector<uInt> cNChan, cNPol; 00089 }; 00090 00091 #endif