casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VLAContinuumRecord.h
Go to the documentation of this file.
1 //# VLAContinuumRecord.h:
2 //# Copyright (C) 1999
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id$
28 
29 #ifndef NRAO_VLACONTINUUMRECORD_H
30 #define NRAO_VLACONTINUUMRECORD_H
31 
32 #include <casa/aips.h>
34 #include <casa/IO/ByteSource.h>
35 //# The following should be a forward declaration. But our casacore::Complex & DComplex
36 //# classes are a typedef hence this does not work. Replace the following with
37 //# forward declarations when casacore::Complex and casacore::DComplex are no longer typedefs.
38 #include <casa/BasicSL/Complex.h>
39 
40 #include <casa/namespace.h>
41 namespace casacore{
42 
43 template <class T> class Vector;
44 }
45 
46 namespace casa { //# NAMESPACE CASA - BEGIN
47 } //# NAMESPACE CASA - END
48 
49 
50 // <summary></summary>
51 
52 // <use visibility=export>
53 
54 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
55 // </reviewed>
56 
57 // <prerequisite>
58 // <li> SomeClass
59 // <li> SomeOtherClass
60 // <li> some concept
61 // </prerequisite>
62 //
63 // <etymology>
64 // </etymology>
65 //
66 // <synopsis>
67 // </synopsis>
68 //
69 // <example>
70 // </example>
71 //
72 // <motivation>
73 // </motivation>
74 //
75 // <templating arg=T>
76 // <li>
77 // <li>
78 // </templating>
79 //
80 // <thrown>
81 // <li>
82 // <li>
83 // </thrown>
84 //
85 // <todo asof="yyyy/mm/dd">
86 // <li> add this feature
87 // <li> fix this bug
88 // <li> start discussion of this possible extension
89 // </todo>
90 
92 {
93 public:
94  // The default constructor creates a unusable object. Use the attach function
95  // to turn an object constructed this way into a usable object.
97 
98  // Initialise this ContinuumRecord from the given record with the
99  // specified offset.
101 
102  // The destructor is trivial
103  virtual ~VLAContinuumRecord();
104 
105  // Initialise this VLAContinuumRecord from the given BytesSource (which
106  // must contain a VLA logical record), and must be readable & seekable. The
107  // offset specifies where the record starts.
108  void attach(casacore::ByteSource& record, casacore::uInt offset);
109 
110  // returns the correlations for this baseline. This will be a casacore::Vector with
111  // four elements containing the AA, CC, AC & CA (or BB, DD, BD, DB)
112  // correlations (ie all four polarisations). The returned casacore::Vector has been
113  // scaled.
115 
116  // Returns the correlations for this baseline in the supplied Array. The
117  // supplied casacore::Array may have any number of dimensions, but all except one must
118  // have a length on 1. The axis that is not of length one must be the right
119  // length to hold all the data contained in the record. Alternatively the
120  // casacore::Array may contain no elements in which case it will be resized to a Vector
121  // of the correct length. The returned values have been scaled.
122 
123  // The returned casacore::Array has four elements containing the AA, CC, AC & CA (or
124  // BB, DD, BD, DB) correlations (ie all four polarisations).
125  virtual void data(casacore::Array<casacore::Complex>& values) const;
126 
127  // returns the flags for the correlations for this baseline. The returned
128  // casacore::Vector will always have a length of four.
129  virtual casacore::Vector<casacore::Bool> flags() const;
130 
131  // returns the variance of the correlations for this baseline. The returned
132  // casacore::Vector will always have a length of four.
134 
135  // returns the scaling factor used to convert the internal data to the actual
136  // values.
137  virtual casacore::uInt scale() const;
138 
139  // returns the antenna 1 index for this baseline.
140  virtual casacore::uInt ant1() const;
141 
142  // returns the antenna 2 index for this baseline.
143  virtual casacore::uInt ant2() const;
144 
145  // Return the type of this record (ie., CONTINUUM).
146  virtual VLABaselineRecord::Type type() const;
147 
148 private:
149  //# The copy constructor is private and undefined.
151 
152  //# The assignment constructor is private and undefined
154 
155 };
156 #endif
A 1-D Specialization of the Array class.
void attach(casacore::ByteSource &record, casacore::uInt offset)
Initialise this VLAContinuumRecord from the given BytesSource (which must contain a VLA logical recor...
Class for read-only access to data in a given format.
Definition: ByteSource.h:91
virtual VLABaselineRecord::Type type() const
Return the type of this record (ie., CONTINUUM).
virtual casacore::Vector< casacore::Bool > flags() const
returns the flags for the correlations for this baseline.
virtual ~VLAContinuumRecord()
The destructor is trivial.
virtual casacore::uInt ant2() const
returns the antenna 2 index for this baseline.
VLAContinuumRecord()
The default constructor creates a unusable object.
VLAContinuumRecord & operator=(const VLAContinuumRecord &other)
virtual casacore::uInt ant1() const
returns the antenna 1 index for this baseline.
casacore::Vector< casacore::Float > variance() const
returns the variance of the correlations for this baseline.
Type
The shapes of all the components.
virtual casacore::uInt scale() const
returns the scaling factor used to convert the internal data to the actual values.
virtual casacore::Vector< casacore::Complex > data() const
returns the correlations for this baseline.
unsigned int uInt
Definition: aipstype.h:51
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42