casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSContinuumSubtractor.h
Go to the documentation of this file.
1 //# MSContinuumSubtractor.h: Fit & subtract continuum from spectral line data
2 //# Copyright (C) 2004
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 //# $Id$
27 //#
28 #ifndef MS_MSCONTINUUMSUBTRACTOR_H
29 #define MS_MSCONTINUUMSUBTRACTOR_H
30 
31 #include <casa/aips.h>
32 #include <casa/BasicSL/String.h>
34 namespace casacore{
35 
36 class MeasurementSet;
37 class LogIO;
38 }
39 
40 namespace casa { //# NAMESPACE CASA - BEGIN
41 
42 
43 // <summary>Fits and subtracts or models the continuum in spectra</summary>
44 // <use visibility=export>
45 //
46 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
47 // </reviewed>
48 //
49 // <prerequisite>
50 // <li> <linkto class=casacore::MeasurementSet>MeasurementSet</linkto>
51 // </prerequisite>
52 //
53 // <etymology>
54 // This class's main aim is to subtract the continuum from spectral line data.
55 // </etymology>
56 //
57 // <synopsis>
58 // Spectral line observations often contain continuum emission which is
59 // present in all channels (often with small slope across band). This
60 // class fits this continuum and subtracts it, replacing either the
61 // corrected data or the model data column.
62 // </synopsis>
63 //
64 // <example>
65 // <srcBlock>
66 // casacore::MS inMS(fileName);
67 // MSContinuumSubtractor mssub(inMS);
68 // mssub.setDataDescriptionIds(ddIds);
69 // mssub.setFields(fieldIds);
70 // mssub.setSolutionInterval(10.0);
71 // mssub.setMode("subtract");
72 // mssub.subtract();
73 // </srcBlock>
74 // A <src>MSContinuumSubtractor</src> object is constructed
75 // and the continuum is subtracted with a 10.0s averaging time for the fit.
76 // </example>
77 //
78 // <motivation>
79 // This class replaces existing functionality at the glish level, in an
80 // attempt to speed up the continuum subtraction process.
81 // </motivation>
82 //
83 // <todo asof="">
84 // </todo>
85 
86 
88 {
89 public:
90 // Constructor
92 
93 // Assignment (only copies reference to casacore::MS, need to reset selection etc)
95 
96 // Destructor
98 
99 // Set the required field Ids
100  void setField(const casacore::String& field);
101  void setFields(const casacore::Vector<casacore::Int>& fieldIds);
102 
103 // Set the channels to use in the fit
104  void setFitSpw(const casacore::String& fitspw);
105  void setSubSpw(const casacore::String& subspw);
106 // Set the required spws (ddids)
108 
109 // Set the solution interval in seconds, the value zero implies scan averaging
111 
112 // Set the solution interval in seconds, the value zero implies scan averaging
114 
115 // Set the order of the fit (1=linear)
116  void setOrder(casacore::Int order);
117 
118 // Set the processing mode: subtract, model or replace
119  void setMode(const casacore::String& mode);
120 
121 // Do the subtraction (or save the model)
122  void subtract();
123  void subtract2();
124 
125 private:
126 // Pointer to MS
128 // DataDescription Ids to process
130 // Field Ids to process
132 // Channels to use in fit
134 // Channels to subtract from
136 // Solution interval for fit
138 // Order of the fit
140 // Processing mode
142 // Number of spws
144 
145 
146 };
147 
148 
149 } //# NAMESPACE CASA - END
150 
151 #endif
int Int
Definition: aipstype.h:50
casacore::String itsMode
Processing mode.
casacore::MeasurementSet * ms_p
Pointer to MS.
void setOrder(casacore::Int order)
Set the order of the fit (1=linear)
void setFitSpw(const casacore::String &fitspw)
Set the channels to use in the fit.
casacore::Int nSpw_
Number of spws.
void setFields(const casacore::Vector< casacore::Int > &fieldIds)
void setDataDescriptionIds(const casacore::Vector< casacore::Int > &ddIds)
Set the required spws (ddids)
void setSubSpw(const casacore::String &subspw)
Fits and subtracts or models the continuum in spectra.
MSContinuumSubtractor & operator=(MSContinuumSubtractor &other)
Assignment (only copies reference to casacore::MS, need to reset selection etc)
void setField(const casacore::String &field)
Set the required field Ids.
MSContinuumSubtractor(casacore::MeasurementSet &ms)
Constructor.
casacore::Matrix< casacore::Int > itsFitChans
Channels to use in fit.
~MSContinuumSubtractor()
Destructor.
casacore::Matrix< casacore::Int > itsSubChans
Channels to subtract from.
float Float
Definition: aipstype.h:54
casacore::Vector< casacore::Int > itsFieldIds
Field Ids to process.
casacore::Vector< casacore::Int > itsDDIds
DataDescription Ids to process.
void subtract()
Do the subtraction (or save the model)
A Table intended to hold astronomical data (a set of Measurements).
casacore::Int itsOrder
Order of the fit.
casacore::Float itsSolInt
Solution interval for fit.
void setSolutionInterval(casacore::Float solInt)
Set the solution interval in seconds, the value zero implies scan averaging.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void setMode(const casacore::String &mode)
Set the processing mode: subtract, model or replace.
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42