00001 //# DOmirfiller.h: a DO for filling MIRIAD uv data into an MS 00002 //# Copyright (C) 2000,2001,2002 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 //# $Id: DOmirfiller.h,v 1.2 2009/09/03 23:28:32 pteuben Exp $ 00028 00029 #ifndef BIMA_DOMIRFILLER_H 00030 #define BIMA_DOMIRFILLER_H 00031 00032 #include <miriad/Filling/MirFiller.h> 00033 #include <miriad/Filling/MirExceptions.h> 00034 #include <tasking/Tasking/ApplicationObject.h> 00035 #include <casa/Arrays/Vector.h> 00036 #include <casa/Containers/Record.h> 00037 #include <tasking/Glish/GlishRecord.h> 00038 00039 #include <casa/namespace.h> 00040 //# Forward Declarations 00041 00042 // <summary> 00043 // A Distributed Object for filling MIRIAD uv data into an MS 00044 // </summary> 00045 00046 // <use visibility=export> 00047 00048 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos=""> 00049 // </reviewed> 00050 00051 // <prerequisite> 00052 // <li> <linkto class="MirFiller">MirFiller</linkto> 00053 // <li> the AIPS++ DO/Tasking system 00054 // </prerequisite> 00055 // 00056 // <etymology> 00057 // DO means it's a distributed object; mirfiller means its a filler of 00058 // miriad data 00059 // </etymology> 00060 // 00061 // <synopsis> 00062 // </synopsis> 00063 // 00064 // <example> 00065 // </example> 00066 // 00067 // <motivation> 00068 // </motivation> 00069 // 00070 // <thrown> 00071 // <li> 00072 // <li> 00073 // </thrown> 00074 // 00075 // <todo asof="yyyy/mm/dd"> 00076 // <li> 00077 // <li> 00078 // <li> 00079 // </todo> 00080 00081 class mirfiller: public ApplicationObject { 00082 private: 00083 mirfiller(); 00084 mirfiller(const mirfiller& other); 00085 00086 MirFiller filler_p; 00087 public: 00088 // create the filler, attaching it to a Miriad dataset. <src>mirfile</src> 00089 // is the dataset filename 00090 mirfiller(const String& mirfile); 00091 00092 // destruct this filler 00093 ~mirfiller(); 00094 00095 // fill the output MS according to the current selections and options. 00096 // msfile is the output name to use; it should not already exist. 00097 void fill(const String& msfile) { filler_p.fill(msfile); } 00098 00099 // select spectra from the input Miriad dataset. wideChans is a list of 00100 // one-based channel indices. narrowWins is a list of one-based 00101 // window indices. The default is to choose all available wide channels 00102 // and windows. 00103 void selectspectra(const Vector<Int> &wideChans, 00104 const Vector<Int> &narrowWins) 00105 throw(UnavailableMiriadDataSelectionError) 00106 { 00107 filler_p.selectSpectra(wideChans, narrowWins); 00108 } 00109 00110 // select polarization setups from the input Miriad dataset. 00111 void selectpols(const Vector<Int> pols); 00112 00113 // return a description of the input Miriad dataset's contents as a Record 00114 // object. If scan is True, the dataset will be implicitly scanned in 00115 // its entirety to extract all the needed information; otherwise, just the 00116 // first timestep will be read. 00117 GlishRecord summary(Bool verbose=True, Bool scan=True); 00118 00119 // set the options for filling. The options are set via a Record object 00120 // for which the following keys are recognized: 00121 // 00122 void setoptions(const Record &opts) { filler_p.setOptions(opts); } 00123 00124 // get the current filling options 00125 Record getoptions() { return filler_p.getOptions(); } 00126 00127 virtual String className() const; 00128 virtual Vector<String> methods() const; 00129 virtual MethodResult runMethod(uInt which, 00130 ParameterSet ¶meters, 00131 Bool runMethod); 00132 virtual Vector<String> noTraceMethods() const; 00133 }; 00134 00135 #endif 00136 00137