casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DOmirfiller.h
Go to the documentation of this file.
1 //# DOmirfiller.h: a DO for filling MIRIAD uv data into an MS
2 //# Copyright (C) 2000,2001,2002
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: DOmirfiller.h,v 1.2 2009/09/03 23:28:32 pteuben Exp $
28 
29 #ifndef BIMA_DOMIRFILLER_H
30 #define BIMA_DOMIRFILLER_H
31 
34 #include <tasking/Tasking/ApplicationObject.h>
35 #include <casa/Arrays/Vector.h>
36 #include <casa/Containers/Record.h>
37 #include <tasking/Glish/GlishRecord.h>
38 
39 #include <casa/namespace.h>
40 //# Forward Declarations
41 
42 // <summary>
43 // A Distributed Object for filling MIRIAD uv data into an MS
44 // </summary>
45 
46 // <use visibility=export>
47 
48 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
49 // </reviewed>
50 
51 // <prerequisite>
52 // <li> <linkto class="MirFiller">MirFiller</linkto>
53 // <li> the AIPS++ DO/Tasking system
54 // </prerequisite>
55 //
56 // <etymology>
57 // DO means it's a distributed object; mirfiller means its a filler of
58 // miriad data
59 // </etymology>
60 //
61 // <synopsis>
62 // </synopsis>
63 //
64 // <example>
65 // </example>
66 //
67 // <motivation>
68 // </motivation>
69 //
70 // <thrown>
71 // <li>
72 // <li>
73 // </thrown>
74 //
75 // <todo asof="yyyy/mm/dd">
76 // <li>
77 // <li>
78 // <li>
79 // </todo>
80 
81 class mirfiller: public ApplicationObject {
82 private:
83  mirfiller();
84  mirfiller(const mirfiller& other);
85 
87 public:
88  // create the filler, attaching it to a Miriad dataset. <src>mirfile</src>
89  // is the dataset filename
90  mirfiller(const casacore::String& mirfile);
91 
92  // destruct this filler
93  ~mirfiller();
94 
95  // fill the output casacore::MS according to the current selections and options.
96  // msfile is the output name to use; it should not already exist.
97  void fill(const casacore::String& msfile) { filler_p.fill(msfile); }
98 
99  // select spectra from the input Miriad dataset. wideChans is a list of
100  // one-based channel indices. narrowWins is a list of one-based
101  // window indices. The default is to choose all available wide channels
102  // and windows.
104  const casacore::Vector<casacore::Int> &narrowWins)
106  {
107  filler_p.selectSpectra(wideChans, narrowWins);
108  }
109 
110  // select polarization setups from the input Miriad dataset.
112 
113  // return a description of the input Miriad dataset's contents as a Record
114  // object. If scan is true, the dataset will be implicitly scanned in
115  // its entirety to extract all the needed information; otherwise, just the
116  // first timestep will be read.
117  GlishRecord summary(casacore::Bool verbose=true, casacore::Bool scan=true);
118 
119  // set the options for filling. The options are set via a casacore::Record object
120  // for which the following keys are recognized:
121  //
122  void setoptions(const casacore::Record &opts) { filler_p.setOptions(opts); }
123 
124  // get the current filling options
126 
127  virtual casacore::String className() const;
129  virtual MethodResult runMethod(casacore::uInt which,
130  ParameterSet &parameters,
133 };
134 
135 #endif
136 
137 
void setoptions(const casacore::Record &opts)
set the options for filling.
Definition: DOmirfiller.h:122
casacore::Record getOptions()
get the current filling options
casacore::Record getoptions()
get the current filling options
Definition: DOmirfiller.h:125
void fill(const casacore::String &msfile)
fill the output casacore::MS according to the current selections and options.
Definition: DOmirfiller.h:97
an exception indicating that a requested data selection from a Miriad dataset is not available...
Definition: MirExceptions.h:66
void fill(const casacore::String &msfile)
return basic characteristics of the input dataset as a GlishRecord.
Definition: MirFiller.h:276
virtual casacore::Vector< casacore::String > methods() const
GlishRecord summary(casacore::Bool verbose=true, casacore::Bool scan=true)
return a description of the input Miriad dataset&#39;s contents as a Record object.
~mirfiller()
destruct this filler
virtual MethodResult runMethod(casacore::uInt which, ParameterSet &parameters, casacore::Bool runMethod)
void selectSpectra(const casacore::Vector< casacore::Int > &wideChans, const casacore::Vector< casacore::Int > &narrowWins)
select spectral data from the input Miriad dataset.
virtual casacore::Vector< casacore::String > noTraceMethods() const
void selectspectra(const casacore::Vector< casacore::Int > &wideChans, const casacore::Vector< casacore::Int > &narrowWins)
select spectra from the input Miriad dataset.
Definition: DOmirfiller.h:103
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
A Distributed Object for filling MIRIAD uv data into an MS.
Definition: DOmirfiller.h:81
MirFiller filler_p
Definition: DOmirfiller.h:86
BIMA MIRIAD dataset to MeasurementSet2 filler.
Definition: MirFiller.h:229
void selectpols(const casacore::Vector< casacore::Int > pols)
select polarization setups from the input Miriad dataset.
virtual casacore::String className() const
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void setOptions(const casacore::Record &opts)
set the options for filling.
unsigned int uInt
Definition: aipstype.h:51