1 | //#--------------------------------------------------------------------------- |
---|
2 | //# PKSSDwriter.h: Class to write Parkes multibeam data to an SDFITS file. |
---|
3 | //#--------------------------------------------------------------------------- |
---|
4 | //# livedata - processing pipeline for single-dish, multibeam spectral data. |
---|
5 | //# Copyright (C) 2000-2009, Australia Telescope National Facility, CSIRO |
---|
6 | //# |
---|
7 | //# This file is part of livedata. |
---|
8 | //# |
---|
9 | //# livedata is free software: you can redistribute it and/or modify it under |
---|
10 | //# the terms of the GNU General Public License as published by the Free |
---|
11 | //# Software Foundation, either version 3 of the License, or (at your option) |
---|
12 | //# any later version. |
---|
13 | //# |
---|
14 | //# livedata is distributed in the hope that it will be useful, but WITHOUT |
---|
15 | //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
16 | //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
17 | //# more details. |
---|
18 | //# |
---|
19 | //# You should have received a copy of the GNU General Public License along |
---|
20 | //# with livedata. If not, see <http://www.gnu.org/licenses/>. |
---|
21 | //# |
---|
22 | //# Correspondence concerning livedata may be directed to: |
---|
23 | //# Internet email: mcalabre@atnf.csiro.au |
---|
24 | //# Postal address: Dr. Mark Calabretta |
---|
25 | //# Australia Telescope National Facility, CSIRO |
---|
26 | //# PO Box 76 |
---|
27 | //# Epping NSW 1710 |
---|
28 | //# AUSTRALIA |
---|
29 | //# |
---|
30 | //# http://www.atnf.csiro.au/computing/software/livedata.html |
---|
31 | //# $Id: PKSSDwriter.h,v 19.17 2009-09-29 07:33:38 cal103 Exp $ |
---|
32 | //# Original: 2000/07/21, Mark Calabretta, ATNF |
---|
33 | //#--------------------------------------------------------------------------- |
---|
34 | |
---|
35 | #ifndef ATNF_PKSSDWRITER_H |
---|
36 | #define ATNF_PKSSDWRITER_H |
---|
37 | |
---|
38 | #include <atnf/PKSIO/PKSwriter.h> |
---|
39 | #include <atnf/PKSIO/PKSrecord.h> |
---|
40 | #include <atnf/PKSIO/SDFITSwriter.h> |
---|
41 | |
---|
42 | #include <casa/aips.h> |
---|
43 | #include <casa/stdio.h> |
---|
44 | #include <casa/Arrays/Vector.h> |
---|
45 | #include <casa/Arrays/Matrix.h> |
---|
46 | #include <casa/BasicSL/Complex.h> |
---|
47 | #include <casa/BasicSL/String.h> |
---|
48 | |
---|
49 | #include <casa/namespace.h> |
---|
50 | |
---|
51 | // <summary> |
---|
52 | // Class to write Parkes multibeam data to an SDFITS file. |
---|
53 | // </summary> |
---|
54 | |
---|
55 | class PKSSDwriter : public PKSwriter |
---|
56 | { |
---|
57 | public: |
---|
58 | // Default constructor. |
---|
59 | PKSSDwriter(); |
---|
60 | |
---|
61 | // Destructor. |
---|
62 | virtual ~PKSSDwriter(); |
---|
63 | |
---|
64 | // Set message disposition. |
---|
65 | virtual Int setMsg( |
---|
66 | FILE *fd = 0x0); |
---|
67 | |
---|
68 | // Create the SDFITS file and write static data. |
---|
69 | virtual Int create( |
---|
70 | const String sdName, |
---|
71 | const String observer, |
---|
72 | const String project, |
---|
73 | const String antName, |
---|
74 | const Vector<Double> antPosition, |
---|
75 | const String obsMode, |
---|
76 | const String bunit, |
---|
77 | const Float equinox, |
---|
78 | const String dopplerFrame, |
---|
79 | const Vector<uInt> nChan, |
---|
80 | const Vector<uInt> nPol, |
---|
81 | const Vector<Bool> haveXPol, |
---|
82 | const Bool haveBase); |
---|
83 | |
---|
84 | // Write the next data record. |
---|
85 | virtual Int write( |
---|
86 | const PKSrecord &pksrec); |
---|
87 | |
---|
88 | // Write a history record. |
---|
89 | virtual Int history(const String text); |
---|
90 | virtual Int history(const char *text); |
---|
91 | |
---|
92 | // Close the SDFITS file. |
---|
93 | virtual void close(); |
---|
94 | |
---|
95 | private: |
---|
96 | // Masks declaration in parent class. |
---|
97 | Vector<uInt> cHaveXPol; |
---|
98 | |
---|
99 | SDFITSwriter cSDwriter; |
---|
100 | }; |
---|
101 | |
---|
102 | #endif |
---|