casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
casa::FlagAgentDisplay Class Reference

#include <FlagAgentDisplay.h>

Inheritance diagram for casa::FlagAgentDisplay:
casa::FlagAgentBase casa::async::Thread

Public Member Functions

 FlagAgentDisplay (FlagDataHandler *dh, casacore::Record config, casacore::Bool writePrivateFlagCube=false)
 
 ~FlagAgentDisplay ()
 
casacore::Bool displayReports (FlagReport &combinedReport)
 Make plots and either display or write to a file. More...
 
FlagReport getReport ()
 Get a report/summary. More...
 
- Public Member Functions inherited from casa::FlagAgentBase
 FlagAgentBase (FlagDataHandler *dh, casacore::Record config, casacore::uShort iterationApproach, casacore::Bool writePrivateFlagCube=false, casacore::Bool flag=true)
 
virtual ~FlagAgentBase ()
 
void start ()
 
void terminate ()
 
void queueProcess ()
 
void chunkSummary ()
 
void tableSummary ()
 
void completeProcess ()
 
void * run ()
 
void setProfiling (bool enable)
 Set function to activate profiling. More...
 
void setCheckMode (bool enable)
 Set function to activate check mode. More...
 
- Public Member Functions inherited from casa::async::Thread
 Thread ()
 
virtual ~Thread ()
 
pthread_t getId () const
 
pid_t gettid () const
 
bool isTerminationRequested () const
 
void * join ()
 
void startThread ()
 

Protected Member Functions

bool computeAntennaPairFlags (const vi::VisBuffer2 &visBuffer, VisMapper &visibilities, FlagMapper &flag, casacore::Int antenna1, casacore::Int antenna2, std::vector< casacore::uInt > &rows)
 Compute flags for a given (time,freq) map. More...
 
void preProcessBuffer (const vi::VisBuffer2 &visBuffer)
 Common functionality for each visBuffer (don't repeat at the row level) More...
 
void iterateAntennaPairsInteractive (antennaPairMap *antennaPairMap_ptr)
 Choose how to step through the baselines in the current chunk. More...
 
void setAgentParameters (casacore::Record config)
 Parse configuration parameters. More...
 
- Protected Member Functions inherited from casa::FlagAgentBase
void initialize ()
 
void runCore ()
 Convenience function to be shared by parallel/non-parallel mode. More...
 
void setDataSelection (casacore::Record config)
 
casacore::String sanitizeCorrExpression (casacore::String corrExpression, std::vector< casacore::String > *corrProducts)
 Method to sanitize correlation expression and keep going. More...
 
void generateAllIndex ()
 
void generateRowsIndex (casacore::uInt nRows)
 
void generateChannelIndex (casacore::uInt nChannels)
 
void generatePolarizationIndex (casacore::uInt nPolarizations)
 
std::vector< casacore::uInt > * generateAntennaPairRowsIndex (casacore::Int antenna1, casacore::Int antenna2)
 
void indigen (std::vector< casacore::uInt > &index, casacore::uInt size)
 Generate index for all rows. More...
 
bool find (const casacore::Vector< casacore::Int > &validRange, casacore::Int element)
 For checking ids. More...
 
bool find (const casacore::Matrix< casacore::Double > &validRange, casacore::Double element)
 For checking ranges. More...
 
bool find (const casacore::Matrix< casacore::Int > &validPairs, casacore::Int element1, casacore::Int element2)
 For checking pairs. More...
 
bool find (const casacore::Block< int > &columns, int col)
 For checking columns. More...
 
bool isNaN (casacore::Double number)
 Check if a given number is nan (for visibilities,gains and Tsys primarily) More...
 
bool isNaN (casacore::Float number)
 
bool isZero (casacore::Double number)
 
bool isZero (casacore::Float number)
 
bool isNaNOrZero (casacore::Float number)
 
bool isNaNOrZero (casacore::Double number)
 
bool checkIfProcessBuffer ()
 Check if buffer has to be processed. More...
 
void iterateRows ()
 Iterate trough list of rows. More...
 
void iterateInRows ()
 Iterate trough visibilities mapper. More...
 
void iterateAntennaPairs ()
 Iterate trough list of antenna pairs. More...
 
void iterateAntennaPairsFlags ()
 Iterate trough list of antenna pairs w/o loading visibilities. More...
 
void processAntennaPair (casacore::Int antenna1, casacore::Int antenna2)
 Methods to interactively iterate trough list of antenna pairs. More...
 
virtual void passIntermediate (const vi::VisBuffer2 &visBuffer)
 Iter-passes method. More...
 
virtual void passFinal (const vi::VisBuffer2 &visBuffer)
 
void setVisibilitiesMap (std::vector< casacore::uInt > *rows, VisMapper *visMap)
 Mapping functions (abs, real, imag, etc.) as requested by Urvashi. More...
 
void setFlagsMap (std::vector< casacore::uInt > *rows, FlagMapper *flagMap)
 
casacore::Bool checkVisExpression (polarizationMap *polMap)
 
virtual bool computeRowFlags (const vi::VisBuffer2 &visBuffer, FlagMapper &flags, casacore::uInt row)
 Compute flags for a given visibilities point. More...
 
virtual bool computeInRowFlags (const vi::VisBuffer2 &visBuffer, VisMapper &visibilities, FlagMapper &flags, casacore::uInt row)
 Compute flags for a given visibilities point. More...
 
virtual bool computeAntennaPairFlags (const vi::VisBuffer2 &visBuffer, FlagMapper &flags, casacore::Int antenna1, casacore::Int antenna2, std::vector< casacore::uInt > &rows)
 Compute flags for a given (time,freq) antenna pair map w/o using visibilities. More...
 
- Protected Member Functions inherited from casa::async::Thread
bool isStarted () const
 

Private Member Functions

casacore::Bool setDataLayout ()
 
casacore::Bool setReportLayout ()
 
casacore::Bool buildDataPlotWindow ()
 
casacore::Bool buildReportPlotWindow ()
 
void getChunkInfo (const vi::VisBuffer2 &visBuffer)
 
casacore::Bool skipBaseline (std::pair< casacore::Int, casacore::Int > antennaPair)
 
void getUserInput ()
 
void getReportUserInput ()
 
void DisplayRaster (casacore::Int xdim, casacore::Int ydim, casacore::Vector< casacore::Float > &data, casacore::uInt frame)
 
void DisplayLine (casacore::Int xdim, casacore::Vector< casacore::Double > &xdata, casacore::Vector< casacore::Float > &ydata, casacore::String label, casacore::String color, casacore::Bool hold, casacore::uInt frame)
 
void DisplayScatter (casacore::Int xdim, casacore::Vector< casacore::Double > &xdata, casacore::Vector< casacore::Float > &ydata, casacore::String label, casacore::String color, casacore::Bool hold, casacore::uInt frame)
 
void DisplayLineScatterError (FlagPlotServerProxy *&plotter, casacore::String &plottype, casacore::Vector< casacore::Float > &xdata, casacore::Vector< casacore::Float > &ydata, casacore::String &errortype, casacore::Vector< casacore::Float > &error, casacore::String label, casacore::String color, casacore::uInt frame)
 

Private Attributes

FlagPlotServerProxydataplotter_p
 Plotter members. More...
 
FlagPlotServerProxyreportplotter_p
 
casacore::String userChoice_p
 GUI parameters. More...
 
casacore::String userFixA1_p
 
casacore::String userFixA2_p
 
casacore::Int skipScan_p
 
casacore::Int skipSpw_p
 
casacore::Int skipField_p
 
casacore::Bool pause_p
 Control parameters. More...
 
casacore::Int fieldId_p
 visBuffer state variables More...
 
casacore::String fieldName_p
 
casacore::Int scanStart_p
 
casacore::Int scanEnd_p
 
casacore::Int spwId_p
 
casacore::uInt nPolarizations_p
 
casacore::Vector
< casacore::Double
freqList_p
 
casacore::String antenna1_p
 
casacore::String antenna2_p
 
casacore::Bool dataDisplay_p
 
casacore::Bool reportDisplay_p
 
casacore::String reportFormat_p
 
casacore::Bool stopAndExit_p
 
casacore::Bool showBandpass_p
 casacore::Bool reportReturn_p; More...
 
casacore::Vector< dbus::variantpanels_p
 
casacore::Vector< dbus::variantreport_panels_p
 
const char * dock_xml_p
 
const char * report_dock_xml_p
 
casacore::Vector
< casacore::String
plotColours_p
 casacore::Bool showBandpass_p; More...
 

Additional Inherited Members

- Public Types inherited from casa::FlagAgentBase
enum  datacolumn {
  DATA,
  CORRECTED,
  MODEL,
  RESIDUAL,
  RESIDUAL_DATA,
  FPARAM,
  CPARAM,
  PARAMERR,
  SNR,
  WEIGHT_SPECTRUM,
  FLOAT_DATA
}
 
enum  iteration {
  ROWS,
  ROWS_PREPROCESS_BUFFER,
  IN_ROWS,
  IN_ROWS_PREPROCESS_BUFFER,
  ANTENNA_PAIRS,
  ANTENNA_PAIRS_FLAGS,
  ANTENNA_PAIRS_INTERACTIVE,
  ANTENNA_PAIRS_PREPROCESS_BUFFER
}
 
- Public Types inherited from casa::async::Thread
typedef void *(* ThreadFunction )(void *)
 
- Static Public Member Functions inherited from casa::FlagAgentBase
static FlagAgentBasecreate (FlagDataHandler *dh, casacore::Record config)
 
- Public Attributes inherited from casa::FlagAgentBase
casacore::Bool backgroundMode_p
 Externally visible configuration. More...
 
casacore::LogIO::Command logLevel_p
 
casacore::Bool apply_p
 
casacore::Bool flag_p
 
- Static Protected Member Functions inherited from casa::async::Thread
static void * threadFunction (void *)
 
- Protected Attributes inherited from casa::FlagAgentBase
FlagDataHandlerflagDataHandler_p
 Common used members that must be accessible to derived classes. More...
 
std::unique_ptr< casacore::LogIOlogger_p
 
casacore::String agentName_p
 
casacore::String summaryName_p
 
casacore::String mode_p
 
casacore::uInt64 chunkFlags_p
 Flag counters. More...
 
casacore::uInt64 chunkNaNs_p
 
casacore::uInt64 tableFlags_p
 
casacore::uInt64 tableNaNs_p
 
casacore::uInt64 visBufferFlags_p
 
bool flagRow_p
 
casacore::Bool multiThreading_p
 Multithreading configuration and agent id. More...
 
casacore::Int nThreads_p
 
casacore::Int threadId_p
 
casacore::Bool prepass_p
 Running configuration. More...
 
std::vector< casacore::uIntrowsIndex_p
 Lists of elements to process jagonzal (CAS-4312): We need channelIndex_p available for the Rflag agent, in order to take into account channel selection for the frequency mapping. More...
 
std::vector< casacore::uIntchannelIndex_p
 
std::vector< casacore::uIntpolarizationIndex_p
 
casacore::String dataColumn_p
 Needed to be protected for timeavg in clip. More...
 
casacore::Bool timeavg_p
 Pre-averaging parameters. More...
 
casacore::Double timebin_p
 
casacore::Bool channelavg_p
 
casacore::Vector< casacore::Intchanbin_p
 

Detailed Description

Definition at line 39 of file FlagAgentDisplay.h.

Constructor & Destructor Documentation

casa::FlagAgentDisplay::FlagAgentDisplay ( FlagDataHandler dh,
casacore::Record  config,
casacore::Bool  writePrivateFlagCube = false 
)
casa::FlagAgentDisplay::~FlagAgentDisplay ( )

Member Function Documentation

casacore::Bool casa::FlagAgentDisplay::buildDataPlotWindow ( )
private
casacore::Bool casa::FlagAgentDisplay::buildReportPlotWindow ( )
private
bool casa::FlagAgentDisplay::computeAntennaPairFlags ( const vi::VisBuffer2 visBuffer,
VisMapper visibilities,
FlagMapper flag,
casacore::Int  antenna1,
casacore::Int  antenna2,
std::vector< casacore::uInt > &  rows 
)
protectedvirtual

Compute flags for a given (time,freq) map.

Reimplemented from casa::FlagAgentBase.

void casa::FlagAgentDisplay::DisplayLine ( casacore::Int  xdim,
casacore::Vector< casacore::Double > &  xdata,
casacore::Vector< casacore::Float > &  ydata,
casacore::String  label,
casacore::String  color,
casacore::Bool  hold,
casacore::uInt  frame 
)
private
void casa::FlagAgentDisplay::DisplayLineScatterError ( FlagPlotServerProxy *&  plotter,
casacore::String plottype,
casacore::Vector< casacore::Float > &  xdata,
casacore::Vector< casacore::Float > &  ydata,
casacore::String errortype,
casacore::Vector< casacore::Float > &  error,
casacore::String  label,
casacore::String  color,
casacore::uInt  frame 
)
private
void casa::FlagAgentDisplay::DisplayRaster ( casacore::Int  xdim,
casacore::Int  ydim,
casacore::Vector< casacore::Float > &  data,
casacore::uInt  frame 
)
private
casacore::Bool casa::FlagAgentDisplay::displayReports ( FlagReport combinedReport)

Make plots and either display or write to a file.

void casa::FlagAgentDisplay::DisplayScatter ( casacore::Int  xdim,
casacore::Vector< casacore::Double > &  xdata,
casacore::Vector< casacore::Float > &  ydata,
casacore::String  label,
casacore::String  color,
casacore::Bool  hold,
casacore::uInt  frame 
)
private
void casa::FlagAgentDisplay::getChunkInfo ( const vi::VisBuffer2 visBuffer)
private
FlagReport casa::FlagAgentDisplay::getReport ( )
virtual

Get a report/summary.

Reimplemented from casa::FlagAgentBase.

void casa::FlagAgentDisplay::getReportUserInput ( )
private
void casa::FlagAgentDisplay::getUserInput ( )
private
void casa::FlagAgentDisplay::iterateAntennaPairsInteractive ( antennaPairMap antennaPairMap_ptr)
protectedvirtual

Choose how to step through the baselines in the current chunk.

Reimplemented from casa::FlagAgentBase.

void casa::FlagAgentDisplay::preProcessBuffer ( const vi::VisBuffer2 visBuffer)
protectedvirtual

Common functionality for each visBuffer (don't repeat at the row level)

Reimplemented from casa::FlagAgentBase.

void casa::FlagAgentDisplay::setAgentParameters ( casacore::Record  config)
protectedvirtual

Parse configuration parameters.

Reimplemented from casa::FlagAgentBase.

casacore::Bool casa::FlagAgentDisplay::setDataLayout ( )
private
casacore::Bool casa::FlagAgentDisplay::setReportLayout ( )
private
casacore::Bool casa::FlagAgentDisplay::skipBaseline ( std::pair< casacore::Int, casacore::Int antennaPair)
private

Member Data Documentation

casacore::String casa::FlagAgentDisplay::antenna1_p
private

Definition at line 105 of file FlagAgentDisplay.h.

casacore::String casa::FlagAgentDisplay::antenna2_p
private

Definition at line 106 of file FlagAgentDisplay.h.

casacore::Bool casa::FlagAgentDisplay::dataDisplay_p
private

Definition at line 108 of file FlagAgentDisplay.h.

FlagPlotServerProxy* casa::FlagAgentDisplay::dataplotter_p
private

Plotter members.

Definition at line 85 of file FlagAgentDisplay.h.

const char* casa::FlagAgentDisplay::dock_xml_p
private

Definition at line 115 of file FlagAgentDisplay.h.

casacore::Int casa::FlagAgentDisplay::fieldId_p
private

visBuffer state variables

Definition at line 98 of file FlagAgentDisplay.h.

casacore::String casa::FlagAgentDisplay::fieldName_p
private

Definition at line 99 of file FlagAgentDisplay.h.

casacore::Vector<casacore::Double> casa::FlagAgentDisplay::freqList_p
private

Definition at line 104 of file FlagAgentDisplay.h.

casacore::uInt casa::FlagAgentDisplay::nPolarizations_p
private

Definition at line 103 of file FlagAgentDisplay.h.

casacore::Vector<dbus::variant> casa::FlagAgentDisplay::panels_p
private

Definition at line 114 of file FlagAgentDisplay.h.

casacore::Bool casa::FlagAgentDisplay::pause_p
private

Control parameters.

Definition at line 95 of file FlagAgentDisplay.h.

casacore::Vector<casacore::String> casa::FlagAgentDisplay::plotColours_p
private

casacore::Bool showBandpass_p;

Control parameters casacore::Bool stopAndExit_p; casacore::Bool pause_p; casacore::Bool dataDisplay_p, reportDisplay_p; // show per chunk plots and/or end-of-casacore::MS plots casacore::Bool reportReturn_p; casacore::String reportFormat_p;

visBuffer state variables casacore::Int fieldId_p; casacore::String fieldName_p; casacore::Int scanStart_p; casacore::Int scanEnd_p; casacore::Int spwId_p; casacore::String antenna1_p; casacore::String antenna2_p;

casacore::uInt nPolarizations_p; casacore::Vector<casacore::Double> freqList_p;

GUI parameters casacore::String userChoice_p; casacore::String userFixA1_p, userFixA2_p;

casacore::Int skipScan_p, skipSpw_p, skipField_p;

Definition at line 143 of file FlagAgentDisplay.h.

const char * casa::FlagAgentDisplay::report_dock_xml_p
private

Definition at line 115 of file FlagAgentDisplay.h.

casacore::Vector<dbus::variant> casa::FlagAgentDisplay::report_panels_p
private

Definition at line 114 of file FlagAgentDisplay.h.

casacore::Bool casa::FlagAgentDisplay::reportDisplay_p
private

Definition at line 108 of file FlagAgentDisplay.h.

casacore::String casa::FlagAgentDisplay::reportFormat_p
private

Definition at line 109 of file FlagAgentDisplay.h.

FlagPlotServerProxy* casa::FlagAgentDisplay::reportplotter_p
private

Definition at line 86 of file FlagAgentDisplay.h.

casacore::Int casa::FlagAgentDisplay::scanEnd_p
private

Definition at line 101 of file FlagAgentDisplay.h.

casacore::Int casa::FlagAgentDisplay::scanStart_p
private

Definition at line 100 of file FlagAgentDisplay.h.

casacore::Bool casa::FlagAgentDisplay::showBandpass_p
private

casacore::Bool reportReturn_p;

Definition at line 112 of file FlagAgentDisplay.h.

casacore::Int casa::FlagAgentDisplay::skipField_p
private

Definition at line 92 of file FlagAgentDisplay.h.

casacore::Int casa::FlagAgentDisplay::skipScan_p
private

Definition at line 92 of file FlagAgentDisplay.h.

casacore::Int casa::FlagAgentDisplay::skipSpw_p
private

Definition at line 92 of file FlagAgentDisplay.h.

casacore::Int casa::FlagAgentDisplay::spwId_p
private

Definition at line 102 of file FlagAgentDisplay.h.

casacore::Bool casa::FlagAgentDisplay::stopAndExit_p
private

Definition at line 110 of file FlagAgentDisplay.h.

casacore::String casa::FlagAgentDisplay::userChoice_p
private

GUI parameters.

Definition at line 89 of file FlagAgentDisplay.h.

casacore::String casa::FlagAgentDisplay::userFixA1_p
private

Definition at line 90 of file FlagAgentDisplay.h.

casacore::String casa::FlagAgentDisplay::userFixA2_p
private

Definition at line 90 of file FlagAgentDisplay.h.


The documentation for this class was generated from the following file: