casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TsysGainCal.h
Go to the documentation of this file.
1 //# TsysGainCal.h: Declaration of Tsys calibration
2 //# Copyright (C) 1996,1997,2000,2001,2002,2003
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 adressed 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 
28 #ifndef SYNTHESIS_TSYSGAINCAL_H
29 #define SYNTHESIS_TSYSGAINCAL_H
30 
31 #include <casa/aips.h>
32 #include <casa/Containers/Record.h>
33 #include <casa/BasicSL/Complex.h>
37 // not yet:#include <synthesis/MeasurementComponents/CalCorruptor.h>
38 
39 namespace casa { //# NAMESPACE CASA - BEGIN
40 
41 // Forward declarations
42 class VisEquation;
43 //not yet: class TJonesCorruptor;
44 
45 
46 // **********************************************************
47 // Standard Tsys Spectrum from SYSCAL table
48 //
49 
50 class StandardTsys : public BJones {
51 public:
52 
53  // Constructor
54  StandardTsys(VisSet& vs);
58 
59  virtual ~StandardTsys();
60 
61  // Return the type enum (for now, pretend we are B)
62  virtual Type type() { return VisCal::B; };
63 
64  // Return type name as string (ditto)
65  virtual casacore::String typeName() { return "B TSYS"; };
66  virtual casacore::String longTypeName() { return "B TSYS (freq-dep Tsys)"; };
67 
68  // Tsys are casacore::Float parameters
70 
71  // Local setSpecify
72  using BJones::setSpecify;
73  virtual void setSpecify(const casacore::Record& specify);
74 
75  // Specific specify() that reads the SYSCAL subtable
76  virtual void specify(const casacore::Record& specify);
77 
78  // In general, we are freq-dep
79  virtual casacore::Bool freqDepPar() { return freqDepTsys_; };
80 
81  // Specialized to turn on spectral weight calibration
82  virtual void correct2(vi::VisBuffer2& vb, casacore::Bool trial=false,
83  casacore::Bool doWtSp=false, casacore::Bool dosync=true);
84 
85 protected:
86 
87  // The Jones matrix elements are not the parameters
88  // ( j = sqrt(p) )
89  virtual casacore::Bool trivialJonesElem() { return false; };
90 
91  // Specialized calcPar that does some sanity checking
92  virtual void calcPar();
93 
94  // Invert doInv for Tsys corrections
95  virtual void syncJones(const casacore::Bool& doInv) { BJones::syncJones(!doInv); };
96 
97  // Calculate Jones matrix elements from Tsys (j = sqrt(p) )
98  virtual void calcAllJones();
99 
100  // Local version that arrange channelized correction
101  virtual void syncWtScale();
102 
103  // Calculate weight scale
104  virtual void calcWtScale();
105  virtual void calcWtScale2(); // called by local syncWtScale only
106 
107  using BJones::keepNCT;
108  virtual void keepNCT(const casacore::Vector<casacore::Int>& ants);
109 
110 private:
111 
112  // The name of the SYSCAL table
114 
115  // Signal formation of channelized weight calibration
117 
118  // Signal presence of channelized Tsys data
120 
121  // <nothing>
122 
123 
124 };
125 
126 } //# NAMESPACE CASA - END
127 
128 #endif
129 
virtual void calcPar()
Specialized calcPar that does some sanity checking.
virtual casacore::Bool freqDepPar()
In general, we are freq-dep.
Definition: TsysGainCal.h:79
int Int
Definition: aipstype.h:50
virtual void syncWtScale()
Local version that arrange channelized correction.
virtual void syncJones(const casacore::Bool &doInv=false)
Synchronize current Jones matrices.
virtual void setSpecify(const casacore::Record &specify)
Arrange to build a cal table from specified values.
virtual void correct2(vi::VisBuffer2 &vb, casacore::Bool trial=false, casacore::Bool doWtSp=false, casacore::Bool dosync=true)
Specialized to turn on spectral weight calibration.
virtual void calcAllJones()
Calculate Jones matrix elements from Tsys (j = sqrt(p))
casacore::Int & nAnt()
Definition: VisCal.h:237
virtual void calcWtScale2()
virtual casacore::Bool trivialJonesElem()
The Jones matrix elements are not the parameters (j = sqrt(p))
Definition: TsysGainCal.h:89
virtual Type type()
Return the type enum (for now, pretend we are B)
Definition: TsysGainCal.h:62
casacore::Bool freqDepCalWt_
Signal formation of channelized weight calibration.
Definition: TsysGainCal.h:116
Type
Allowed types of VisCal matrices - &#39;correct&#39; order enum Type{UVMOD,Mf,M,K,B,G,D,C,E,P,T,EP,F}; enum Type{Test=0,ANoise,M,KAntPos,K,B,G,J,D,X,C,P,E,T,F,A,ALL};.
Definition: VisCal.h:62
virtual casacore::String typeName()
Return type name as string (ditto)
Definition: TsysGainCal.h:65
virtual ~StandardTsys()
virtual void setSpecify(const casacore::Record &specify)
Arrange to build a cal table from specified values.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
virtual void calcWtScale()
Calculate weight scale.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual void keepNCT()
SVJ-specific write to caltable.
virtual VisCalEnum::VCParType parType()
Tsys are casacore::Float parameters.
Definition: TsysGainCal.h:69
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
const MSMetaInfoForCal & msmc() const
Access to the MSMetaInfoForCal (throws if none)
Definition: VisCal.h:338
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual void specify(const casacore::Record &specify)
Specific specify() that reads the SYSCAL subtable.
casacore::String sysCalTabName_
The name of the SYSCAL table.
Definition: TsysGainCal.h:113
virtual void syncJones(const casacore::Bool &doInv)
Invert doInv for Tsys corrections.
Definition: TsysGainCal.h:95
casacore::Bool freqDepTsys_
Signal presence of channelized Tsys data.
Definition: TsysGainCal.h:119
BJones (freq-dep GJones)
virtual casacore::String longTypeName()
Definition: TsysGainCal.h:66
not yet: class TJonesCorruptor;
Definition: TsysGainCal.h:50
StandardTsys(VisSet &vs)
Constructor.