casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotMSPlot.h
Go to the documentation of this file.
1 //# PlotMSPlot.h: High level plot concept across potentially multiple objects.
2 //# Copyright (C) 2009
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id: $
27 #ifndef PLOTMSPLOT_H_
28 #define PLOTMSPLOT_H_
29 #include <vector>
30 
34 #include <plotms/PlotMS/PlotMS.h>
39 
40 namespace casa {
41 
42 //# Forward declarations
43 class PlotMSPages;
44 class PlotMSCacheBase;
45 class PMS_PP_Cache;
46 class PMS_PP_Canvas;
47 class PMS_PP_Axes;
48 class PMS_PP_Iteration;
49 class PMS_PP_MSData;
50 class PMS_PP_Display;
51 
52 // Class for a single "plot" concept. Generally speaking this one
53 // plot handles one data source across potentially many scatter plots and
54 // canvases, separated by whatever criteria the subclasses decide on. The
55 // class PlotMSPlot handles interfacing with the rest of PlotMS and casacore::MS file and
56 // selection, and provides some useful members and methods for subclasses.
58 public:
59  // Static //
60 
61  // Returns a new instance of PlotMSPlotParameters suitable for use with
62  // this class, using the given PlotMS parent.
64 
65  // Updates the given PlotMSPlotParameters to be suitable for use with this
66  // class, using the given PlotMS parent.
67  static void makeParameters(PlotMSPlotParameters& params, PlotMSApp* plotms);
68 
69  void customizeAutoSymbol( const PlotSymbolPtr& baseSymbol, casacore::uInt dataSize );
70  void customizeOverlaySymbol( const PlotSymbolPtr& baseSymbol, casacore::uInt dataSize );
71  // Non-Static //
72 
73  // Constructor which takes the parent PlotMS object. Starts out with
74  // default data parameters.
76 
77  // Destructor.
78  ~PlotMSPlot();
79 
81 
82  // Simple class to hold parameter to resume updating after a threaded
83  // cache loading
84  class TCLParams {
85  public:
86  // Parameters
87  // <group>
93 
94  // </group>
95 
96  // Constructor
98  :
99  releaseWhenDone(false),
100  updateCanvas(false),
101  updateDisplay(false),
102  endCacheLog(false)
103 
104  {}
105  };
106 
107  // Returns a human-readable name for this plot. Does not have to be
108  // unique.
109  casacore::String name() const;
110 
111  // Returns specialization Id for this plot
112  casacore::String spectype() const { return "Unknown";};
113 
114  // Returns the plots assigned to this plot.
115  std::vector<MaskedScatterPlotPtr> plots() const;
116 
117  // Returns the canvases that have been assigned to this plot.
118  std::vector<PlotCanvasPtr> canvases() const;
119 
120  // Attaches/Detaches internal plot objects to their assigned canvases.
121  // <group>
122  void attachToCanvases();
123  void detachFromCanvases();
124  casacore::Int iter() { return iter_; }
125  // </group>
126 
127  //The cache load did not succeed so clear the plot and the cache.
128  void dataMissing();
129 
130  //This method was written because in scripting mode, there was a segfault when
131  //the grid size was changed (for example 2 x 3 to 1x1). It was in a draw thread
132  //that had stale data it was touching after its associated canvas was deleted.
133  //The purpose of the method is to wait for the draw threads to finish and then
134  //keep them from redrawing while the deletion is in progress.
135  void waitForDrawing( bool holdDrawing );
136 
137  // Returns a reference to the plot's parameters.
138  // <group>
139  const PlotMSPlotParameters& parameters() const;
141  // </group>
142 
143  // Returns the visible canvases (accessible via
144  // PlotMSPlotter::currentCanvases()) associated with this plot.
145  std::vector<PlotCanvasPtr> visibleCanvases() const;
146 
147  // Returns all selected regions on all canvases associated with this plot.
148  virtual PlotMSRegions selectedRegions() const;
149 
150  // PlotMSPlotter::currentCanvases()) associated with this plot.
152 
153  // Initializes the plot with the given canvases. Initializes any internal
154  // plot objects via the protected initializePlot() method, then assigns
155  // the plot objects to the canvases via the protected assignCanvases()
156  // method, then calls parametersUpdated() to properly set the plot.
157  // Drawing is held before these operations, and then released afterwards.
158  // Returns true if all operations succeeded; false if at least one failed.
159  bool initializePlot(PlotMSPages& pages);
160 
161  // Gets the plot's data source.
162  // <group>
163  PlotMSCacheBase& cache() { return *itsCache_; };
164  const PlotMSCacheBase& cache() const { return *itsCache_; };
165  // </group>
166 
167  // Gets the plot's parent.
168  PlotMSApp* parent() { return itsParent_; };
169 
170  // Steps the iteration
171  bool firstIter();
172  bool prevIter();
173  bool nextIter();
174  bool lastIter();
175  bool setIter( int index );
176  bool resetIter();
177  void recalculateIteration();
179 
180  // Implements PlotMSParametersWatcher::parametersHaveChanged(). Updates
181  // the data parameters and then calls parametersHaveChanged_().
183  int updateFlag);
184 
185  // Calls the dataChanged() method on the MaskedScatterPlots. This WILL
186  // cause a redraw of the affected canvases.
187  void plotDataChanged();
188 
189  //Returns true if the plot is an iteration plot.
190  bool isIteration() const;
191 
192  // Exports canvases associated with this plot to the given format. Exports
193  // to multiple files if the plot has more than one canvas.
194  bool exportToFormat(const PlotExportFormat& format);
195  void exportToFormatCancel();
196 
197  void cacheLoaded_(bool wasCanceled);
198 
199  // This method should be called when the given canvas (which was owned by
200  // this plot) was disowned.
201  void canvasWasDisowned(PlotCanvasPtr canvas);
202  std::vector<PMS::Axis> getCachedAxes();
203  std::vector<PMS::DataColumn> getCachedData();
204 
205  casacore::Record locateInfo(int plotIterIndex, const casacore::Vector<PlotRegion>& regions,
206  bool showUnflagged, bool showFlagged, bool selectAll ) const ;
207 
208  PlotLogMessage* locateRange( int plotIterIndex, const casacore::Vector<PlotRegion> & regions,
209  bool showUnflagged, bool showFlagged);
210 
211  PlotLogMessage* flagRange( int canvasIndex, casa::PlotMSFlagging& flagging,
212  const casacore::Vector<PlotRegion>& regions, bool showFlagged);
213 
214  // Generates and assigns canvases that this plot will be using, with the
215  // given PlotMSPages object. This is called when the plot is first
216  // created, and can be called by the plot itself if its canvas layout
217  // has changed (in which case this method should check for the canvases
218  // that have already been assigned to it in the page).
219  bool assignCanvases(PlotMSPages& pages);
220  void updateLocation();
221 
222  //Clear the title and axes from all this plots canvases.
223  void clearCanvases();
224 
225  //Whether a thread is currently updating the cache.
226  bool isCacheUpdating() const;
227  void setCacheUpdating( bool updating );
228 
229  void updatePlots();
230  bool updateIndexing();
231 
232  void logPoints();
234 
235  //This was added so that in 'mixed mode', cacheloaded will trigger
236  //a redraw of the plot.
237  void setRelease( bool b );
238 
239  static void cacheLoaded(void *obj, bool wasCanceled){
240  PlotMSPlot *cobj = static_cast<PlotMSPlot*>(obj);
241  if(cobj != NULL){
242  cobj->setCacheUpdating( false );
243  if ( ! cobj->itsParent_->guiShown() ){
244  cobj->cacheLoaded_(wasCanceled);
245  }
246  }
247  }
248 
249 protected:
250 
251 
252  // Initializes any internal plot objects, but does NOT set parameters or
253  // attach to canvases. Will only be called ONCE, before assignCanvases and
254  // parametersUpdated, as long as the public initializePlot method is not
255  // overridden. Returns true for success, false for failure.
256  bool initializePlot();
257 
258  // Updates plot members for parameters specific to the child plot type.
259  // Returns true if the drawing should be released right away; if false is
260  // returned, the child class is expect to release drawing when finished.
262  int updateFlag, bool releaseWhenDone );
263 
264  // Helper method for selectedRegions() and visibleSelectedRegions() that
265  // returns the selected regions for plots in the given canvases.
267  const std::vector<PlotCanvasPtr>& canvases) const;
268 
269  void constructorSetup();
270  void updatePages();
271  bool updateCache( );
272  bool updateCanvas();
273  bool updateDisplay();
274  void setColors();
275 
276  // Force data update by clearing the cache
277  bool updateData();
278 
279  // Returns true if drawing is currently being held on all plot canvases,
280  // false otherwise.
281  bool allDrawingHeld();
282 
283  // Holds drawing on all plot canvases.
284  void holdDrawing();
285 
286  // Releases drawing on all plot canvases, which will also cause a redraw.
287  void releaseDrawing();
288 
289  int getPageIterationCount( const PlotMSPage& page );
290 
291  void waitOnCanvases();
292 
293  // MEMBERS //
294 
295  // PlotMS parent.
297 
298  // Plot factory for generating plot objects as needed.
300 
301  // Parameters.
303 
304  // Cache.
306 
307  //Used to determine if a thread is running to update the cache.
308  volatile bool cacheUpdating;
309 
310 private:
311  void waitOnCanvas( const PlotCanvasPtr& canvas );
312 
313  // Disable copy constructor and operator for now.
314  // <group>
315  PlotMSPlot(const PlotMSPlot& copy);
317  // </group>
318 
319  //Adjust the amount of plot data that this plot is holding.
320  void resizePlots( int rows, int cols );
321 
322  // Clear data when deleting cache to prevent seg fault in other thread
323  void clearPlotData();
324 
325  //Return the dimensions of the plot data that this plot should hold.
326  void getPlotSize( casacore::Int& rows, casacore::Int& cols );
327 
328  //Returns the iteration for the canvas located at row, r, and column, c.
329  int getIterationIndex( int r, int c, const PlotMSPage& page );
330 
331  //Post a plot message to the logger.
332  void logMessage( const QString& msg ) const;
333 
334  void clearCanvasProperties( int row, int col);
335  void setCanvasProperties (PlotCanvasPtr canvas, int numplots,
336  casacore::uInt iteration, PMS_PP_Axes* axesParams,
337  PMS_PP_Cache* cacheParams, PMS_PP_Canvas *canvParams,
338  PMS_PP_Iteration *iterParams, PMS_PP_MSData* dataParams,
339  PMS_PP_Display* displayParams, int gridRow, int gridCol);
340 
341  // Common canvas settings
342  // Share external axes for iterated plots
343  void setCommonAxes(std::vector<PMS_PP_Iteration*>& iterParams, PlotCanvasPtr canvas);
344  // type is MS unless all CalTables
345  int getCommonCacheType(std::vector<PMS_PP_MSData*>& dataParams);
346  // true if all plots have selected this polarization
347  bool getCommonPolnRatio(std::vector<PMS_PP_MSData*>& dataParams);
348 
349  // x-axis, ranges, labels
350  void setXAxisProperties(PMS::Axis& xAxis,
351  PMS::DataColumn& xColumn,
352  PlotCanvasPtr canvas,
353  std::vector<PMS_PP_Axes*>& axesParams,
354  std::vector<PMS_PP_Cache*>& cacheParams,
355  std::vector<PMS_PP_Canvas*>& canvParams,
356  std::vector<PMS_PP_MSData*>& dataParams,
357  std::vector<PMS_PP_Display*>& displayParams,
358  std::vector<PlotMSPlot*>& plots,
359  int commonCacheType,
360  bool commonPolnRatio,
361  int iteration,
362  int defaultLabelFont);
363  void setXAxis(PMS::Axis& xAxis,
364  PMS::DataColumn& xColumn,
365  PlotAxis& xPlotaxis,
366  std::vector<PMS_PP_Axes*>& axesParams,
367  std::vector<PMS_PP_Cache*>& cacheParams,
368  std::vector<PMS_PP_MSData*>& dataParams,
369  std::vector<PlotMSPlot*>& plots,
370  int commonCacheType);
371  void setXAxisRange(PMS::Axis xAxis,
372  PlotAxis xPlotAxis,
373  PlotCanvasPtr canvas,
374  std::vector<PMS_PP_Axes*>& axesParams,
375  std::vector<PMS_PP_Cache*>& cacheParams,
376  std::vector<PMS_PP_Display*>& displayParams,
377  std::vector<PlotMSPlot*>& plots,
378  int iteration);
379  void setXAxisLabel(PlotCanvasPtr canvas,
380  PMS::Axis xAxis, PMS::DataColumn xColumn, PlotAxis xPlotAxis,
381  std::vector<PMS_PP_Cache*> cacheParams,
382  std::vector<PMS_PP_Canvas*> canvasParams,
383  std::vector<PMS_PP_MSData*> dataParams,
384  std::vector<PlotMSPlot*>& plots,
385  int defaultFontSize, int commonCacheType, bool commonPolnRatio);
386 
387  // y-axis, ranges, labels
388  void setYAxesProperties(std::vector<PMS::Axis>& yAxes,
389  std::vector<PMS::DataColumn>& yColumns,
390  PlotCanvasPtr canvas,
391  std::vector<PMS_PP_Axes*>& axesParams,
392  std::vector<PMS_PP_Cache*>& cacheParams,
393  std::vector<PMS_PP_Canvas*>& canvParams,
394  std::vector<PMS_PP_MSData*>& dataParams,
395  std::vector<PMS_PP_Display*>& displayParams,
396  std::vector<PlotMSPlot*>& plots,
397  int iteration,
398  int defaultLabelFont);
399  void setYAxes(std::vector<PMS::Axis>& yaxes,
400  std::vector<PMS::DataColumn>& ycolumns,
401  std::vector<PMS_PP_Cache*>& cacheParams,
402  std::vector<PMS_PP_MSData*>& dataParams,
403  std::vector<PlotMSPlot*>& plots);
404  void setYAxesRanges(PlotCanvasPtr canvas,
405  std::vector<PMS_PP_Axes*>& axesParams,
406  std::vector<PMS_PP_Cache*>& cacheParams,
407  std::vector<PMS_PP_Display*>& displayParams,
408  std::vector<PlotMSPlot*>& plots,
409  int iteration);
410  void setYAxesLabels(PlotCanvasPtr canvas,
411  std::vector<PMS::Axis>& yAxes,
412  std::vector<PMS::DataColumn>& yColumns,
413  std::vector<PMS_PP_Axes*>& axesParams,
414  std::vector<PMS_PP_Cache*>& cacheParams,
415  std::vector<PMS_PP_Canvas*>& canvasParams,
416  std::vector<PMS_PP_MSData*>& dataParams,
417  std::vector<PlotMSPlot*>& plots,
418  int defaultFontSize);
419 
420  // title
422  std::vector<PMS_PP_Canvas*>& canvasParams,
423  std::vector<PMS_PP_Iteration*>& iterParams,
424  std::vector<PlotMSPlot*>& plots,
425  int defaultTitleFont, int iteration);
426 
427  // axis ranges for square plots
428  void setSquareAxesRange(PlotCanvasPtr canvas);
429  // specify axis ranges for certain axes
430  void getAxisBoundsForTime(double& min, double& max);
431  void getAxisBoundsForUV(double& min, double& max);
432  void getAxisBoundsForOverlay(double& min, double& max);
433 
434  // Validate or handle axes for MS/Cal
435  PMS::Axis getDefaultXAxis(int cachetype, casacore::String caltype);
436  PMS::Axis getGsplineAxis(const casacore::String filename);
437  PMS::Axis msDataAxisToCal(PMS::Axis inputAxis, casacore::String calType);
438  PMS::Axis calDataAxisToMS(PMS::Axis inputAxis);
439  void checkColoraxis(casacore::String caltype, PMS_PP_Display* display);
441 
442  // For axis labels and title
443  bool axisIsAveraged(PMS::Axis axis, PlotMSAveraging averaging);
444  void addAxisDescription(casacore::String& label, PMS::Axis axis,
445  int commonCacheType, bool averaged);
446 
447  //Note: First index for a plot is the dataCount,
448  //second index is the number of iteration.
449  std::vector<std::vector<MaskedScatterPlotPtr> > itsPlots_;
450 
451  //Note: First index for a canvas is the number of rows,
452  //second index is the column within a grid for iterated plots.
453  std::vector<std::vector<PlotCanvasPtr> > itsCanvases_;
454 
455  std::vector<std::vector</*QPScatterPlot**/ColoredPlotPtr> > itsColoredPlots_;
457  int gridRow;
458  int gridCol;
459 
462 
467 };
468 
469 }
470 
471 #endif /* PLOTMSPLOT_H_ */
bool isIteration() const
Returns true if the plot is an iteration plot.
void recalculateIteration()
PlotMSCacheBase * itsCache_
Cache.
Definition: PlotMSPlot.h:305
void setXAxisRange(PMS::Axis xAxis, PlotAxis xPlotAxis, PlotCanvasPtr canvas, std::vector< PMS_PP_Axes * > &axesParams, std::vector< PMS_PP_Cache * > &cacheParams, std::vector< PMS_PP_Display * > &displayParams, std::vector< PlotMSPlot * > &plots, int iteration)
~PlotMSPlot()
Destructor.
A 1-D Specialization of the Array class.
void logIter(casacore::Int iter, casacore::Int nIter)
Specifies averaging parameters for an MS.
int Int
Definition: aipstype.h:50
Represents a single page of PlotCanvases, arranged in a grid.
Definition: PlotMSPage.h:43
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
casacore::Record locateInfo(int plotIterIndex, const casacore::Vector< PlotRegion > &regions, bool showUnflagged, bool showFlagged, bool selectAll) const
void parametersHaveChanged(const PlotMSWatchedParameters &params, int updateFlag)
Implements PlotMSParametersWatcher::parametersHaveChanged().
#define max(a, b)
Definition: hio.h:44
Simple class to hold parameter to resume updating after a threaded cache loading. ...
Definition: PlotMSPlot.h:84
const PlotMSPlotParameters & parameters() const
Returns a reference to the plot&#39;s parameters.
void setXAxisProperties(PMS::Axis &xAxis, PMS::DataColumn &xColumn, PlotCanvasPtr canvas, std::vector< PMS_PP_Axes * > &axesParams, std::vector< PMS_PP_Cache * > &cacheParams, std::vector< PMS_PP_Canvas * > &canvParams, std::vector< PMS_PP_MSData * > &dataParams, std::vector< PMS_PP_Display * > &displayParams, std::vector< PlotMSPlot * > &plots, int commonCacheType, bool commonPolnRatio, int iteration, int defaultLabelFont)
x-axis, ranges, labels
bool updateData()
Force data update by clearing the cache.
#define min(a, b)
Definition: hio.h:45
void logMessage(const QString &msg) const
Post a plot message to the logger.
virtual bool guiShown() const
See PlotMSPlotter::guiShown().
casacore::Int iterStep_
Definition: PlotMSPlot.h:461
Subclass of PlotMSPlotParameters::Group to handle display parameters.
void setXAxis(PMS::Axis &xAxis, PMS::DataColumn &xColumn, PlotAxis &xPlotaxis, std::vector< PMS_PP_Axes * > &axesParams, std::vector< PMS_PP_Cache * > &cacheParams, std::vector< PMS_PP_MSData * > &dataParams, std::vector< PlotMSPlot * > &plots, int commonCacheType)
PMS::Axis msDataAxisToCal(PMS::Axis inputAxis, casacore::String calType)
static const casacore::uInt PIXEL_THRESHOLD
Definition: PlotMSPlot.h:463
bool setIter(int index)
Parameters for a PlotMSPlot.
int getPageIterationCount(const PlotMSPage &page)
int getIterationIndex(int r, int c, const PlotMSPage &page)
Returns the iteration for the canvas located at row, r, and column, c.
bool parametersHaveChanged_(const PlotMSWatchedParameters &params, int updateFlag, bool releaseWhenDone)
Updates plot members for parameters specific to the child plot type.
void constructorSetup()
Subclass of PlotMSPlotParameters::Group to handle canvas parameters.
void clearPlotData()
Clear data when deleting cache to prevent seg fault in other thread.
void setXAxisLabel(PlotCanvasPtr canvas, PMS::Axis xAxis, PMS::DataColumn xColumn, PlotAxis xPlotAxis, std::vector< PMS_PP_Cache * > cacheParams, std::vector< PMS_PP_Canvas * > canvasParams, std::vector< PMS_PP_MSData * > dataParams, std::vector< PlotMSPlot * > &plots, int defaultFontSize, int commonCacheType, bool commonPolnRatio)
void getAxisBoundsForUV(double &min, double &max)
PlotMSRegions visibleSelectedRegions() const
PlotMSPlotter::currentCanvases()) associated with this plot.
PlotMSApp * parent()
Gets the plot&#39;s parent.
Definition: PlotMSPlot.h:168
PlotMSCacheBase & cache()
Gets the plot&#39;s data source.
Definition: PlotMSPlot.h:163
static void cacheLoaded(void *obj, bool wasCanceled)
Definition: PlotMSPlot.h:239
Abstract class for parameters that may be watched by one or more interested classes.
void attachToCanvases()
Attaches/Detaches internal plot objects to their assigned canvases.
void getAxisBoundsForTime(double &min, double &max)
specify axis ranges for certain axes
PlotMSRegions is a class that holds information about selected regions for a single PlotMSPlot...
void getAxisBoundsForOverlay(double &min, double &max)
Controller class for plotms.
Definition: PlotMS.h:55
bool firstIter()
Steps the iteration.
void setYAxesProperties(std::vector< PMS::Axis > &yAxes, std::vector< PMS::DataColumn > &yColumns, PlotCanvasPtr canvas, std::vector< PMS_PP_Axes * > &axesParams, std::vector< PMS_PP_Cache * > &cacheParams, std::vector< PMS_PP_Canvas * > &canvParams, std::vector< PMS_PP_MSData * > &dataParams, std::vector< PMS_PP_Display * > &displayParams, std::vector< PlotMSPlot * > &plots, int iteration, int defaultLabelFont)
y-axis, ranges, labels
PlotMSApp * itsParent_
MEMBERS //.
Definition: PlotMSPlot.h:296
bool isCacheUpdating() const
Whether a thread is currently updating the cache.
bool initializePlot()
Initializes any internal plot objects, but does NOT set parameters or attach to canvases.
int getCommonCacheType(std::vector< PMS_PP_MSData * > &dataParams)
type is MS unless all CalTables
void setCanvasProperties(PlotCanvasPtr canvas, int numplots, casacore::uInt iteration, PMS_PP_Axes *axesParams, PMS_PP_Cache *cacheParams, PMS_PP_Canvas *canvParams, PMS_PP_Iteration *iterParams, PMS_PP_MSData *dataParams, PMS_PP_Display *displayParams, int gridRow, int gridCol)
void customizeOverlaySymbol(const PlotSymbolPtr &baseSymbol, casacore::uInt dataSize)
const PlotMSCacheBase & cache() const
Definition: PlotMSPlot.h:164
bool allDrawingHeld()
Returns true if drawing is currently being held on all plot canvases, false otherwise.
void setCacheUpdating(bool updating)
void setCommonAxes(std::vector< PMS_PP_Iteration * > &iterParams, PlotCanvasPtr canvas)
Common canvas settings Share external axes for iterated plots.
Subclass of PlotMSPlotParameters::Group to handle subparameters for casacore::MS data.
void clearCanvases()
Clear the title and axes from all this plots canvases.
PMS::Axis getDefaultXAxis(int cachetype, casacore::String caltype)
Validate or handle axes for MS/Cal.
Specifies flagging parameters (including possibly flag extension) for an MS.
Subclass of PlotMSPlotParameters::Group to handle axes parameters.
void addAxisDescription(casacore::String &label, PMS::Axis axis, int commonCacheType, bool averaged)
std::vector< PlotCanvasPtr > canvases() const
Returns the canvases that have been assigned to this plot.
Class for a single &quot;plot&quot; concept.
Definition: PlotMSPlot.h:57
static const casacore::uInt MEDIUM_THRESHOLD
Definition: PlotMSPlot.h:464
void cacheLoaded_(bool wasCanceled)
PMS::Axis getGsplineAxis(const casacore::String filename)
void waitOnCanvas(const PlotCanvasPtr &canvas)
casacore::Int nIter()
void getPlotSize(casacore::Int &rows, casacore::Int &cols)
Return the dimensions of the plot data that this plot should hold.
std::vector< PMS::Axis > getCachedAxes()
PlotAxis
Enum for the four plot axes.
Definition: PlotOptions.h:62
void checkIteraxis(casacore::String caltype, PMS_PP_Iteration *iter)
virtual PlotMSRegions selectedRegions() const
Returns all selected regions on all canvases associated with this plot.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
void customizeAutoSymbol(const PlotSymbolPtr &baseSymbol, casacore::uInt dataSize)
void holdDrawing()
Holds drawing on all plot canvases.
PlotExportFormat contains parameters for exporting a canvas to a file.
Definition: PlotOptions.h:817
casacore::Int iter()
Definition: PlotMSPlot.h:124
bool getCommonPolnRatio(std::vector< PMS_PP_MSData * > &dataParams)
true if all plots have selected this polarization
void checkColoraxis(casacore::String caltype, PMS_PP_Display *display)
void resize(PlotMSPages &, casacore::uInt rows, casacore::uInt cols)
void resizePlots(int rows, int cols)
Adjust the amount of plot data that this plot is holding.
bool assignCanvases(PlotMSPages &pages)
Generates and assigns canvases that this plot will be using, with the given PlotMSPages object...
casacore::Int iter_
Definition: PlotMSPlot.h:460
std::vector< MaskedScatterPlotPtr > plots() const
Returns the plots assigned to this plot.
TCLParams itsTCLParams_
Definition: PlotMSPlot.h:456
void setYAxesLabels(PlotCanvasPtr canvas, std::vector< PMS::Axis > &yAxes, std::vector< PMS::DataColumn > &yColumns, std::vector< PMS_PP_Axes * > &axesParams, std::vector< PMS_PP_Cache * > &cacheParams, std::vector< PMS_PP_Canvas * > &canvasParams, std::vector< PMS_PP_MSData * > &dataParams, std::vector< PlotMSPlot * > &plots, int defaultFontSize)
void setSquareAxesRange(PlotCanvasPtr canvas)
axis ranges for square plots
void setRelease(bool b)
This was added so that in &#39;mixed mode&#39;, cacheloaded will trigger a redraw of the plot.
bool exportToFormat(const PlotExportFormat &format)
Exports canvases associated with this plot to the given format.
Subclass of PlotMSPlotParameters::Group to handle cache parameters.
bool axisIsAveraged(PMS::Axis axis, PlotMSAveraging averaging)
For axis labels and title.
static PlotMSPlotParameters makeParameters(PlotMSApp *plotms)
Static //.
void detachFromCanvases()
volatile bool cacheUpdating
Used to determine if a thread is running to update the cache.
Definition: PlotMSPlot.h:308
std::vector< std::vector< PlotCanvasPtr > > itsCanvases_
Note: First index for a canvas is the number of rows, second index is the column within a grid for it...
Definition: PlotMSPlot.h:453
PlotMSPlot(PlotMSApp *parent)
Non-Static //.
Interface for classes that wish to be notified when PlotMSWatchedParameters have changed.
void plotDataChanged()
Calls the dataChanged() method on the MaskedScatterPlots.
PMS::Axis calDataAxisToMS(PMS::Axis inputAxis)
const Double c
Fundamental physical constants (SI units):
PlotMSPlotParameters itsParams_
Parameters.
Definition: PlotMSPlot.h:302
void exportToFormatCancel()
void releaseDrawing()
Releases drawing on all plot canvases, which will also cause a redraw.
PlotLogMessage * locateRange(int plotIterIndex, const casacore::Vector< PlotRegion > &regions, bool showUnflagged, bool showFlagged)
static const casacore::uInt LARGE_THRESHOLD
Definition: PlotMSPlot.h:465
TCLParams()
Constructor.
Definition: PlotMSPlot.h:97
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void setYAxes(std::vector< PMS::Axis > &yaxes, std::vector< PMS::DataColumn > &ycolumns, std::vector< PMS_PP_Cache * > &cacheParams, std::vector< PMS_PP_MSData * > &dataParams, std::vector< PlotMSPlot * > &plots)
Subclass of PlotMSPlotParameters::Group to handle iteration parameters.
casacore::String spectype() const
Returns specialization Id for this plot.
Definition: PlotMSPlot.h:112
std::vector< std::vector< MaskedScatterPlotPtr > > itsPlots_
Note: First index for a plot is the dataCount, second index is the number of iteration.
Definition: PlotMSPlot.h:449
Superclass for all messages going through the PlotLogger.
Definition: PlotLogger.h:48
std::vector< PlotCanvasPtr > visibleCanvases() const
Returns the visible canvases (accessible via PlotMSPlotter::currentCanvases()) associated with this p...
static const casacore::uInt XLARGE_THRESHOLD
Definition: PlotMSPlot.h:466
void canvasWasDisowned(PlotCanvasPtr canvas)
This method should be called when the given canvas (which was owned by this plot) was disowned...
std::vector< PMS::DataColumn > getCachedData()
void setTitleProperties(casacore::String &title, PlotCanvasPtr canvas, std::vector< PMS_PP_Canvas * > &canvasParams, std::vector< PMS_PP_Iteration * > &iterParams, std::vector< PlotMSPlot * > &plots, int defaultTitleFont, int iteration)
title
PlotMSPlot & operator=(const PlotMSPlot &copy)
PlotItemPtr ColoredPlotPtr
Definition: Plot.h:602
std::vector< std::vector< ColoredPlotPtr > > itsColoredPlots_
Definition: PlotMSPlot.h:455
Represents (potentially) multiple pages for PlotMS, with one being current (visible) at a time...
Definition: PlotMSPages.h:39
void waitForDrawing(bool holdDrawing)
This method was written because in scripting mode, there was a segfault when the grid size was change...
casacore::String name() const
Returns a human-readable name for this plot.
void clearCanvasProperties(int row, int col)
void setYAxesRanges(PlotCanvasPtr canvas, std::vector< PMS_PP_Axes * > &axesParams, std::vector< PMS_PP_Cache * > &cacheParams, std::vector< PMS_PP_Display * > &displayParams, std::vector< PlotMSPlot * > &plots, int iteration)
unsigned int uInt
Definition: aipstype.h:51
bool releaseWhenDone
Parameters.
Definition: PlotMSPlot.h:88
PlotLogMessage * flagRange(int canvasIndex, casa::PlotMSFlagging &flagging, const casacore::Vector< PlotRegion > &regions, bool showFlagged)
PlotFactoryPtr itsFactory_
Plot factory for generating plot objects as needed.
Definition: PlotMSPlot.h:299
void dataMissing()
The cache load did not succeed so clear the plot and the cache.