FlagAgentDisplay.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 #ifndef FlagAgentDisplay_H_
00024 #define FlagAgentDisplay_H_
00025
00026 #include <flagging/Flagging/FlagAgentBase.h>
00027
00028 #include <casadbus/viewer/ViewerProxy.h>
00029 #include <casadbus/plotserver/PlotServerProxy.h>
00030 #include <casadbus/utilities/BusAccess.h>
00031 #include <casadbus/session/DBusSession.h>
00032
00033
00034
00035 #include <flagging/Flagging/FlagPlotServerProxy.h>
00036
00037
00038 namespace casa {
00039
00040 class FlagAgentDisplay : public FlagAgentBase {
00041
00042 public:
00043
00044 FlagAgentDisplay(FlagDataHandler *dh, Record config, Bool writePrivateFlagCube = false);
00045 ~FlagAgentDisplay();
00046
00047
00048 Bool displayReports(FlagReport &combinedReport);
00049
00050
00051 FlagReport getReport();
00052
00053 protected:
00054
00055
00056 bool computeAntennaPairFlags(const vi::VisBuffer2 &visBuffer, VisMapper &visibilities,FlagMapper &flag,Int antenna1,Int antenna2,vector<uInt> &rows);
00057
00058 void preProcessBuffer(const vi::VisBuffer2 &visBuffer);
00059
00060
00061 void iterateAntennaPairsInteractive(antennaPairMap *antennaPairMap_ptr);
00062
00063
00064 void setAgentParameters(Record config);
00065
00066 private:
00067
00068 Bool setDataLayout();
00069 Bool setReportLayout();
00070 Bool buildDataPlotWindow();
00071 Bool buildReportPlotWindow();
00072
00073
00074 void getChunkInfo(const vi::VisBuffer2 &visBuffer);
00075 Bool skipBaseline(std::pair<Int,Int> antennaPair);
00076
00077 void getUserInput();
00078 void getReportUserInput();
00079
00080 void DisplayRaster(Int xdim, Int ydim, Vector<Float> &data, uInt frame);
00081 void DisplayLine(Int xdim, Vector<Double> &xdata, Vector<Float> &ydata, String label, String color, Bool hold, uInt frame);
00082 void DisplayScatter(Int xdim, Vector<Double> &xdata, Vector<Float> &ydata, String label, String color, Bool hold, uInt frame);
00083 void DisplayLineScatterError(FlagPlotServerProxy *&plotter, String &plottype, Vector<Float> &xdata, Vector<Float> &ydata, String &errortype, Vector<Float> &error, String label, String color, uInt frame);
00084
00085
00086 FlagPlotServerProxy *dataplotter_p;
00087 FlagPlotServerProxy *reportplotter_p;
00088
00089
00090 String userChoice_p;
00091 String userFixA1_p, userFixA2_p;
00092
00093 Int skipScan_p, skipSpw_p, skipField_p;
00094
00095
00096 Bool pause_p;
00097
00098
00099 Int fieldId_p;
00100 String fieldName_p;
00101 Int scanStart_p;
00102 Int scanEnd_p;
00103 Int spwId_p;
00104 uInt nPolarizations_p;
00105 Vector<Double> freqList_p;
00106 String antenna1_p;
00107 String antenna2_p;
00108
00109 Bool dataDisplay_p, reportDisplay_p;
00110 String reportFormat_p;
00111 Bool stopAndExit_p;
00112 Bool reportReturn_p;
00113 Bool showBandpass_p;
00114
00115 Vector<dbus::variant> panels_p, report_panels_p;
00116 const char *dock_xml_p, *report_dock_xml_p;
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144 Vector<String> plotColours_p;
00145
00146
00147 };
00148
00149
00150 }
00151
00152 #endif
00153