23 #ifndef FlagAgentRFlag_H_
24 #define FlagAgentRFlag_H_
134 map< std::pair<casacore::Int,casacore::Int>,std::vector<casacore::Double> > &dataSquared,
135 map< std::pair<casacore::Int,casacore::Int>,std::vector<casacore::Double> > &counts,
142 void generateThresholds( map< std::pair<casacore::Int,casacore::Int>,std::vector<casacore::Double> > &
data,
143 map< std::pair<casacore::Int,casacore::Int>,std::vector<casacore::Double> > &dataSquared,
144 map< std::pair<casacore::Int,casacore::Int>,std::vector<casacore::Double> > &counts,
165 void (
casa::FlagAgentRFlag::*
spectralAnalysis_p)(
casacore::uInt,
casacore::uInt,
casacore::uInt,
casacore::Double&,
casacore::Double&,
casacore::Double&,
casacore::Double&,
casacore::Double&,
casacore::Double&,
VisMapper&,
FlagMapper&);
map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > field_spw_scutoff_histogram_sum_squares_p
map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > field_spw_frequency_p
Store frequency to be used in Reports.
A top level class defining the data handling interface for the flagging module.
casacore::Double noiseScale_p
flagdata task param timedevscale
map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > field_spw_noise_histogram_counts_p
void simpleMedian(casacore::uInt timestep_i, casacore::uInt pol_k, casacore::uInt nChannels, casacore::Double &AverageReal, casacore::Double &AverageImag, casacore::Double &StdReal, casacore::Double &StdImag, casacore::Double &SumWeightReal, casacore::Double &SumWeightImag, VisMapper &visibilities, FlagMapper &flags)
casacore::Double computeThreshold(std::vector< casacore::Double > &data, std::vector< casacore::Double > &dataSquared, std::vector< casacore::Double > &counts)
Convenience function to get simple averages.
map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > field_spw_scutoff_histogram_sum_p
Everything going into the FlagReport is by value Everything going out of it is by reference...
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
map< std::pair< casacore::Int, casacore::Int >, casacore::Double > field_spw_frequencies_p
casacore::Double spectralmin_p
FlagReport getReportCore(map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > &data, map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > &dataSquared, map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > &counts, map< std::pair< casacore::Int, casacore::Int >, casacore::Double > &threshold, FlagReport &totalReport, string label, casacore::Double scale)
casacore::Function to return histograms
casacore::Double spectralmax_p
casacore::Double mean(std::vector< casacore::Double > &data, std::vector< casacore::Double > &counts)
Convenience function to get simple averages.
casacore::uInt nTimeSteps_p
A top level class defining the interface for flagging agents.
std::vector< casacore::Double > thresholdRobust_p
map< std::pair< casacore::Int, casacore::Int >, casacore::Double > field_spw_scutoff_map_p
holds the freqdev thresholds for every field-SPW pair
void passFinal(const vi::VisBuffer2 &visBuffer)
Remove automatically computed thresholds for the following scans.
map< std::pair< casacore::Int, casacore::Int >, casacore::Bool > user_field_spw_scutoff_map_p
void setAgentParameters(casacore::Record config)
Parse configuration parameters.
void noiseVsRef(std::vector< casacore::Double > &data, casacore::Double ref)
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
map< std::pair< casacore::Int, casacore::Int >, casacore::Bool > user_field_spw_noise_map_p
void(casa::FlagAgentRFlag::* spectralAnalysis_p)(casacore::uInt, casacore::uInt, casacore::uInt, casacore::Double &, casacore::Double &, casacore::Double &, casacore::Double &, casacore::Double &, casacore::Double &, VisMapper &, FlagMapper &)
map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > field_spw_noise_histogram_sum_squares_p
map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > field_spw_scutoff_histogram_counts_p
casacore::Double median(std::vector< casacore::Double > &data)
Convenience function to compute median.
casacore::Double noise_p
casacore::Time-direction analysis
VisBuffer2s encapsulate one chunk of visibility data for processing.
casacore::Double scutoffScale_p
flagdata task param freqdevscale
map< std::pair< casacore::Int, casacore::Int >, casacore::Double > field_spw_noise_map_p
holds the timedev thresholds for every field-SPW pair
FlagAgentRFlag(FlagDataHandler *dh, casacore::Record config, casacore::Bool writePrivateFlagCube=false, casacore::Bool flag=true)
void computeAntennaPairFlagsCore(std::pair< casacore::Int, casacore::Int > spw_field, casacore::Double noise, casacore::Double scutoff, casacore::uInt timeStart, casacore::uInt timeStop, casacore::uInt centralTime, VisMapper &visibilities, FlagMapper &flags)
casacore::Function to be called for each timestep/channel
FlagReport getReport()
casacore::Function to return histograms
A flag agent that implements the 'rflag' flagdata mode.
void generateThresholds(map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > &data, map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > &dataSquared, map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > &counts, map< std::pair< casacore::Int, casacore::Int >, casacore::Double > &threshold, string label)
Dedicated method to generate threshold values.
void robustMean(casacore::uInt timestep_i, casacore::uInt pol_k, casacore::uInt nChannels, casacore::Double &AverageReal, casacore::Double &AverageImag, casacore::Double &StdReal, casacore::Double &StdImag, casacore::Double &SumWeightReal, casacore::Double &SumWeightImag, VisMapper &visibilities, FlagMapper &flags)
void passIntermediate(const vi::VisBuffer2 &visBuffer)
Extract automatically computed thresholds to use them in the next pass.
casacore::uInt nIterationsRobust_p
Spectral Robust fit.
bool computeAntennaPairFlags(const vi::VisBuffer2 &visBuffer, VisMapper &visibilities, FlagMapper &flags, casacore::Int antenna1, casacore::Int antenna2, std::vector< casacore::uInt > &rows)
Compute flags for a given (time,freq) map.
casacore::Bool doflag_p
General parameters.
map< std::pair< casacore::Int, casacore::Int >, std::vector< casacore::Double > > field_spw_noise_histogram_sum_p
casacore::Double scutoff_p
Spectral analysis.