RFASelector.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef FLAGGING_RFASELECTOR_H
00029 #define FLAGGING_RFASELECTOR_H
00030
00031 #include <flagging/Flagging/RFAFlagCubeBase.h>
00032 #include <flagging/Flagging/RFDataMapper.h>
00033 #include <ms/MeasurementSets/MSColumns.h>
00034 #include <casa/Arrays/LogiVector.h>
00035
00036 namespace casa {
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 class RFASelector : public RFAFlagCubeBase
00069 {
00070 public:
00071
00072 RFASelector ( RFChunkStats &ch,const RecordInterface &parm );
00073 virtual ~RFASelector ();
00074
00075 virtual uInt estimateMemoryUse () { return RFAFlagCubeBase::estimateMemoryUse()+2; }
00076 virtual Bool newChunk ( Int &maxmem );
00077 virtual IterMode iterTime ( uInt it );
00078 virtual void endRows(uInt itime);
00079 virtual IterMode iterRow ( uInt ir );
00080 virtual void iterFlag(uInt itime);
00081 virtual void startData(bool verbose);
00082
00083 virtual String getDesc ();
00084 static const RecordInterface & getDefaults ();
00085
00086 Bool fortestingonly_parseMinMax( Float &vmin,Float &vmax,const RecordInterface &spec,uInt f0 );
00087 void fortestingonly_parseClipField( const RecordInterface &spec,Bool clip );
00088
00089 protected:
00090 typedef struct ClipInfo {
00091 RFDataMapper *mapper;
00092 Float vmin, vmax;
00093 Bool channel_average;
00094 Bool clip;
00095 Float offset;
00096 } ClipInfo;
00097
00098
00099 template<class T> Bool reformRange( Matrix<T> &rng,const Array<T> &arr );
00100 template<class T> Bool parseRange( Matrix<T> &rng,const RecordInterface &parm,const String &id );
00101 template<class T> Bool find( uInt &index,const T &obj,const Vector<T> &arr );
00102
00103 Bool parseTimes ( Array<Double> ×,const RecordInterface &parm,const String &id,Bool secs=False );
00104 void addString ( String &str,const String &s1,const char *sep=" " );
00105 virtual void processRow ( uInt ifr,uInt it );
00106 Bool parseMinMax ( Float &vmin,Float &vmax,const RecordInterface &spec,uInt f0 );
00107 void addClipInfo ( const Vector<String> &expr,Float vmin,Float vmax,Bool clip, Bool channel_average );
00108 void parseClipField ( const RecordInterface &spec,Bool clip );
00109 void addClipInfoDesc ( const Block<ClipInfo> &clip );
00110
00111
00112 Double diameter;
00113
00114
00115 Vector< Double > diameters;
00116 ROMSAntennaColumns *ac;
00117
00118
00119 double lowerlimit;
00120 double upperlimit;
00121
00122
00123 String desc_str;
00124
00125 Matrix<Double> sel_freq,sel_time,sel_timerng,sel_uvrange;
00126 Matrix<Int> sel_chan;
00127 Vector<Int> sel_corr,sel_spwid,sel_fieldid, sel_stateid;
00128 Vector<String> sel_fieldnames;
00129 LogicalVector sel_ifr,flagchan,sel_feed;
00130 Bool sel_autocorr,unflag;
00131 Block<ClipInfo> sel_clip,sel_clip_row;
00132 LogicalVector sel_clip_active;
00133 Bool sum_sel_clip_active;
00134 Double quack_si, quack_dt;
00135 String quack_mode;
00136 Bool quack_increment;
00137 Vector<Int> sel_scannumber,sel_arrayid,sel_observation;
00138 String sel_column;
00139
00140 Bool select_fullrow,flag_everything, shadow, elevation;
00141
00142 };
00143
00144
00145
00146
00147 }
00148
00149 #ifndef AIPS_NO_TEMPLATE_SRC
00150 #include <flagging/Flagging/RFASelector.tcc>
00151 #endif //# AIPS_NO_TEMPLATE_SRC
00152 #endif