//cout << "Chunk=" << chunk.nchunk() << ", Field=" << chunk.visIter().fieldName() << ", FieldID=" << chunk.visIter().fieldId() << ", Spw=" << chunk.visIter().spectralWindow() << ", nTime=" << num(TIME) << " (" << NumT << " at a time), nBaseline=" << num(IFR) << ", nChan=" << num(CHAN) << ", nCorrs=" << num(POLZN) << " [" << chunk.getCorrString() << "]" << endl; // ". Flagging on " << Expr << endl; //" -> correlations : " << corrlist << endl;
//# RFATimeFreqCrop.cc: this defines RFATimeFreqCrop
//# Copyright (C) 2000,2001,2002
//# Associated Universities, Inc. Washington DC, USA.
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# Charlottesville, VA 22903-2475 USA
#include <flagging/Flagging/RFATimeFreqCrop.h>
namespace casa { //# NAMESPACE CASA - BEGIN
//#define baselinecnt ( (NumAnt)*((NumAnt)+1)/2 - ((NumAnt)-ant1[bs])*((NumAnt)-ant1[bs]+1)/2 + (ant2[bs] - ant1[bs]) )
#define SELF(ant) ( (NumAnt)*((NumAnt)+1)/2 - ((NumAnt)-ant)*((NumAnt)-ant+1)/2 )
#define MIN(a,b) ((a)<=(b) ? (a) : (b))
//#define PLOT // to activate the mean and clean bandpass plots
//#define UPLOT // to activate bandpass plots of each fit iteration
//#define DOPLOT // to activate ds9 and bandpass-fit plots
/* Constructor for 'RFATimeFreqCrop' */
RFATimeFreqCrop :: RFATimeFreqCrop( RFChunkStats &ch,const casacore::RecordInterface &parm ):
RFAFlagCubeBase(ch,parm) ,
RFDataMapper(parm.asArrayString(RF_EXPR),parm.asString(RF_COLUMN)),
ANT_TOL = parm.asDouble("ant_cutoff");
BASELN_TOL = parm.asDouble("baseline_cutoff");
T_TOL = parm.asDouble("time_amp_cutoff");
F_TOL = parm.asDouble("freq_amp_cutoff");
FlagLevel = parm.asInt("flag_level");
CorrChoice = parm.asInt("auto_cross");
NumTime = parm.asInt("num_time");
ShowPlots = parm.asBool("showplots");
FreqLineFit = parm.asBool("freqlinefit");
MaxNPieces = parm.asInt("maxnpieces");
DryRun = parm.asBool("dryrun");
Expr = parm.asArrayString(RF_EXPR);
Column = parm.asString(RF_COLUMN);
IgnorePreflags = parm.asBool(RF_FIGNORE);
// cout << "Flagging on " << parm.asArrayString(RF_EXPR) << " for column : " << parm.asString(RF_COLUMN) << endl;