27 #ifndef PLOTMSCONSTANTS_H_
28 #define PLOTMSCONSTANTS_H_
54 #define PMS_ENUM1(NAME,ALLMETHOD,ALLSTRMETHOD,CONVMETHOD,...) \
59 static const std::vector< NAME >& ALLMETHOD () { \
60 static const NAME arr[] = { \
63 static const int count = sizeof(arr) / sizeof(arr[0]); \
64 static const std::vector< NAME > v(arr, &arr[count]); \
68 static unsigned int n##ALLMETHOD () { \
69 static unsigned int n = ALLMETHOD ().size(); \
73 #define PMS_ENUM2(NAME,ALLMETHOD,ALLSTRMETHOD,CONVMETHOD,...) \
74 static const std::vector<casacore::String>& ALLSTRMETHOD () { \
75 static const casacore::String arr[] = { \
78 static const int count = sizeof(arr) / sizeof(arr[0]); \
79 static const std::vector<casacore::String> v(arr, &arr[count]); \
83 static const casacore::String& CONVMETHOD ( NAME v) { \
84 return ALLSTRMETHOD ()[v]; } \
86 static const NAME & CONVMETHOD (const casacore::String& v, bool* ok = NULL) { \
87 const std::vector<casacore::String>& strs = ALLSTRMETHOD (); \
88 const std::vector< NAME >& enms = ALLMETHOD (); \
89 for(unsigned int i = 0; i < strs.size(); i++) { \
90 if(PMS::strEq(v, strs[i], true)) { \
91 if(ok != NULL) *ok = true; \
95 if(ok != NULL) *ok = false; \
111 SCAN,FIELD,TIME,TIME_INTERVAL,
113 ANTENNA1,ANTENNA2,BASELINE,ROW,
114 OBSERVATION,INTENT,FEED1,FEED2,
116 AMP,PHASE,REAL,IMAG,WT,WTxAMP,WTSP,
120 UVDIST,UVDIST_L,
U,
V,
W,UWAVE,VWAVE,WWAVE,
123 ANTENNA,AZIMUTH,ELEVATION,RA,DEC,
126 GAMP,GPHASE,GREAL,GIMAG,
127 DELAY,SWP,TSYS,OPAC,
SNR,
TEC, ANTPOS,
129 RADIAL_VELOCITY, RHO,
148 "
Antenna","Ant-Azimuth","Ant-Elevation","Ant-
Ra","Ant-
Dec","Ant-ParAngle",
150 "Gain Amp","Gain Phase","Gain Real","Gain Imag",
154 "Radial Velocity", "
Distance (rho)",
168 DATA, CORRECTED, MODEL, FLOAT_DATA, CORRMODEL_V, CORRMODEL_S,
169 DATAMODEL_V, DATAMODEL_S, CORR_DIV_MODEL_V, CORR_DIV_MODEL_S,
170 DATA_DIV_MODEL_V, DATA_DIV_MODEL_S)
171 PMS_ENUM2(DataColumn, dataColumns, dataColumnStrings, dataColumn,
174 "data-model_vector", "data-model_scalar",
175 "corrected/model_vector", "corrected/model_scalar",
176 "data/model_vector", "data/model_scalar")
184 PMS_ENUM2(CoordSystem, coordSystems, coordSystemStrings, coordSystem,
185 "AZELGEO", "ICRS", "J2000", "B1950", "
GALACTIC")
202 NEAREST, CUBIC_SPLINE)
229 TBOOL, TINT, TFLOAT, TDOUBLE, TTIME)
230 PMS_ENUM2(AxisType, axesTypes, axesTypeStrings, axisType,
235 static AxisType axisType(Axis axis);
241 UNONE, UDATETIME, GHERTZ, METERS_PER_SECOND, KILOMETERS_PER_SECOND,
242 KILOMETERS, METERS, HOURS, WAVELENGTHS,
DEGREES, NANOSECONDS, KELVIN,
243 NEPERS, SECONDS, PERCENT);
244 PMS_ENUM2(AxisUnit, axesUnits, axesUnitStrings, axisUnit,
245 "", "hh:mm:ss", "GHz", "m/s", "km/s", "km", "m", "hours",
246 "<html>λ</html>", "degrees", "ns", "K", "neper", "s",
252 static AxisUnit axisUnit(Axis axis);
258 unsigned int day,
unsigned int hour,
unsigned int min,
260 static
void dateDouble(
double value,
unsigned int& year,
unsigned int& mon,
261 unsigned int& day,
unsigned int& hour,
unsigned int& min,
271 bool ignoreCase = false);
282 for(
unsigned int i = 0; i < v.size(); i++) v2[i] = (
int)v[i];
288 std::vector<T> v2(v.
size());
289 for(
unsigned int i = 0; i < v.
size(); i++) v2[i] = (T)v[i];
298 S_ALL, S_WHERE, S_WHAT, S_HOW, S_MAIN, S_TABLES, S_ANTENNA,
299 S_FEED, S_FIELD, S_OBSERVATION, S_HISTORY, S_POLARIZATION,
300 S_SOURCE, S_SPW, S_SPW_POL,
306 "
Source", "Spectral
Window", "Spectral Window and Polarization",
313 S_ALL_CT, S_WHERE_CT, S_WHAT_CT, S_HOW_CT, S_MAIN_CT, S_TABLES_CT,
314 S_ANTENNA_CT, S_FIELD_CT, S_OBSERVATION_CT, S_HISTORY_CT, S_SPW_CT)
316 PMS_ENUM2(CTSummaryType, CTsummaryTypes, CTsummaryTypeStrings, CTsummaryType,
317 "All", "Where", "What", "How", "Main", "Tables", "Antenna",
318 "Field", "Observation", "History", "Spectral Window")
323 PMS_ENUM1(ExportRange, exportRanges, exportRangeStrings, exportRange, PAGE_CURRENT, PAGE_ALL)
324 PMS_ENUM2(ExportRange, exportRanges, exportRangeStrings, exportRange, "Current Page", "All Pages")
static const bool DEFAULT_FONTSET
static casacore::uInt axisScaleBase(Axis axis)
PMS_ENUM2(AxisUnit, axesUnits, axesUnitStrings, axisUnit,"","hh:mm:ss","GHz","m/s","km/s","km","m","hours","<html>λ</html>","degrees","ns","K","neper","s","%")
static const PlotCanvas::LegendPosition DEFAULT_LEGENDPOSITION
A 1-D Specialization of the Array class.
static bool axisIsCalData(Axis axis)
static const casacore::String LOG_ORIGIN_SUMMARY
static const Axis DEFAULT_COLOR_AXIS
static const PlotAxis DEFAULT_CANVAS_YAXIS
Spectral Spectral Window and Weather Spectral static Window const std::vector< casacore::String > & COLORS_LIST()
Enum for export range.
static bool axisIsUVWave(Axis axis)
static double dateDouble(unsigned int year, unsigned int mon, unsigned int day, unsigned int hour, unsigned int min, double sec, PlotAxisScale scale=DATE_MJ_SEC)
Convert to/from dates and doubles, using the given scale (must be either DATE_MJ_SEC or DATE_MJ_DAY)...
static const bool DEFAULT_SHOW_GRID
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain SNR
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain Antenna Radial Atm Image Sideband
static const int DEFAULT_LOG_EVENTS
static std::vector< T > fromIntVector(const casacore::Vector< int > &v)
static bool recEq(const casacore::Record &rec1, const casacore::Record &rec2)
Returns true if the given Records are equals, false otherwise.
corrected corrected data data corrected corrected data data model_scalar ICRS
static const int LOG_EVENT_DBUS
Log event flags.
static const casacore::String LOG_ORIGIN_FLAG
Spectral Spectral Window and Weather CTsummaryType
static const int LOG_EVENT_SUMMARY
static const casacore::String LOG_ORIGIN_LOAD_CACHE
static const int DEFAULT_GRID_ROWS
static const casacore::String LOG_ORIGIN_UNFLAG
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain Antenna Radial Distance(rho)"
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
static const casacore::String LOG_ORIGIN
Logging Constants //.
static const casacore::LogMessage::Priority DEFAULT_LOG_PRIORITY
corrected corrected model_scalar
static const bool DEFAULT_SHOWAXISLABEL
TableExprNode year(const TableExprNode &node)
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain Antenna Radial Atm Tsky
static const int DEFAULT_FONT
static const casacore::String LOG_ORIGIN_RELEASE_CACHE
corrected corrected data data corrected corrected data data model_scalar coordSystem
corrected corrected data data corrected corrected data data model_scalar coordSystems
static PlotSymbolPtr NO_FLAGGED_SYMBOL(PlotFactoryPtr factory)
static const casacore::String LOG_ORIGIN_LOCATE
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain SwPower
casacore::uInt Antenna
The interface to the casacore::MeasurementSet for synthesis processing.
static const DataColumn DEFAULT_DATACOLUMN_WT
static const Axis DEFAULT_YAXIS
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain Antenna Radial Atm Image static None PlotAxisScale axisScale(Axis axis)
Returns the axes scale for the given axis.
static const PlotAxis DEFAULT_CANVAS_XAXIS
Default values for PMS_PP_Canvas.
static std::map< PlotSymbol::Symbol, int > SYMBOL_MINIMUM_SIZES()
Returns the minimum visible sizes for plot symbol types.
static const int LOG_EVENT_UNFLAG
static bool axisIsRaDec(Axis axis)
right ascension or declination
static bool strEq(const casacore::String &str1, const casacore::String &str2, bool ignoreCase=false)
Returns true if the given Strings are equals, false otherwise.
static AngleFormat angleFormat(Axis axis, CoordSystem ref)
static PlotLinePtr DEFAULT_ANNOTATION_TEXT_OUTLINE(PlotFactoryPtr factory)
static const Axis DEFAULT_XAXIS
Default values for PMS_PP_Cache.
Functor to apply complex function imag.
static const Axis DEFAULT_CAL_YAXIS
static bool axisNeedsCalSlice(Axis axis)
Cal table axes which need validation/slicing for poln selection.
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain Delay
static const int LOG_EVENT_DBUSWARN
static const casacore::String DEFAULT_LOG_FILENAME
Default Parameter Values //.
static const bool DEFAULT_SHOWLEGEND
static const CoordSystem DEFAULT_COORDSYSTEM
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain Antenna Positions
date and time enquiry functions, with some operations.
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain TEC
static bool axisIsOverlay(Axis axis)
for adjusting axis ranges
PlotAxis
Enum for the four plot axes.
A hierarchical collection of named fields of various types.
static bool axisIsUV(Axis axis)
for loading conjugates and setting axis ranges
static const bool DEFAULT_CLEAR_SELECTIONS
corrected corrected data data corrected corrected data data model_scalar AZELGEO
corrected corrected data data corrected corrected data data model_scalar J2000
Abstract class for a symbol.
static PlotSymbolPtr DEFAULT_FLAGGED_SYMBOL(PlotFactoryPtr factory)
static const casacore::String & latitudeName(CoordSystem r)
static const int LOG_EVENT_PARAMS_CHANGED
Spectral Spectral Window and Weather CTsummaryTypeStrings
Functor to apply complex function real.
static const casacore::String LOG_ORIGIN_PLOT
Wt UVdist
Observational geometry.
static bool isDirectionComponent(Axis axis, DirectionComponent &dc)
static bool axisIsWeight(Axis axis)
Need datacolumn for averaging weight axes.
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain Antenna Radial Atm Image Poln
Container class for useful constants/methods.
Spectral Spectral Window and SysCal
static const DataColumn DEFAULT_DATACOLUMN
static const int LOG_EVENT_PLOT
Cubic static Spline bool axisIsData(Axis axis)
Returns whether or not the given axis needs the second data parameter to indicate which data column t...
static PlotLinePtr DEFAULT_ANNOTATION_RECT_LINE(PlotFactoryPtr factory)
Default rectangle annotation properties.
static const casacore::String LOG_ORIGIN_DBUSWARN
static const int DEFAULT_CACHED_IMAGE_HEIGHT
PlotCanvas is an area for different PlotItems to be attached and drawn.
static const casacore::String DEFAULT_TITLE_FORMAT
static PlotAreaFillPtr DEFAULT_ANNOTATION_TEXT_BACKGROUND(PlotFactoryPtr factory)
AngleFormat
Enum for angle formats.
corrected corrected data data corrected corrected data data model_scalar static GALACTIC const casacore::String & longitudeName(CoordSystem r)
static const ExportRange DEFAULT_EXPORT_RANGE
Default values for export range;.
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain Antenna Radial Atm Transmission
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain Opac
Amp
Visibilities and flags.
String: the storage and methods of handling collections of characters.
Spectral Spectral Window and Weather CTsummaryTypes
static const casacore::String DEFAULT_CANVAS_AXIS_LABEL_FORMAT
static const int LOG_EVENT_RELEASE_CACHE
Defines a frequency value with units.
static const int LOG_EVENT_LOCATE
static const InterpMethod DEFAULT_INTERPMETHOD
static PlotLinePtr DEFAULT_GRID_LINE(PlotFactoryPtr factory)
Wt Ant Ant Ant Ant Ant Gain Gain Gain Gain Tsys
static PlotAreaFillPtr DEFAULT_ANNOTATION_RECT_FILL(PlotFactoryPtr f)
static const int LOG_EVENT_FLAG
static const int DEFAULT_CACHED_IMAGE_WIDTH
PlotAxisScale
Enum for possible axis scales.
static PlotFontPtr DEFAULT_ANNOTATION_TEXT_FONT(PlotFactoryPtr factory)
Default text annotation properties.
static casacore::Vector< int > toIntVector(const std::vector< T > &v)
Converts the given templated std::vector to/from an int std::vector.
corrected corrected data data corrected corrected data data model_scalar B1950
Informational log messages with with time, priority, and origin.
PMS_ENUM1(Axis, axes, axesStrings, axis, SCAN, FIELD, TIME, TIME_INTERVAL, SPW, CHANNEL, FREQUENCY, VELOCITY, CORR, ANTENNA1, ANTENNA2, BASELINE, ROW, OBSERVATION, INTENT, FEED1, FEED2, AMP, PHASE, REAL, IMAG, WT, WTxAMP, WTSP, SIGMA, SIGMASP, FLAG, FLAG_ROW, UVDIST, UVDIST_L, U, V, W, UWAVE, VWAVE, WWAVE, AZ0, EL0, HA0, PA0, ANTENNA, AZIMUTH, ELEVATION, RA, DEC, PARANG, GAMP, GPHASE, GREAL, GIMAG, DELAY, SWP, TSYS, OPAC, SNR, TEC, ANTPOS, RADIAL_VELOCITY, RHO, ATM, TSKY, IMAGESB, POLN, NONE) PMS_ENUM2(Axis
Enum for the axis choices that are available to be plotted.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static const casacore::String LOG_ORIGIN_DBUS
Log event origin names.
static AxisUnit axisUnit(Axis axis)
Returns the unit for the given axis.
static PlotSymbolPtr DEFAULT_UNFLAGGED_SYMBOL(PlotFactoryPtr factory)
Default values for PMS_PP_Display.
static const int DEFAULT_GRID_COLS
static const int LOG_EVENT_LOAD_CACHE
static const casacore::String LOG_ORIGIN_PARAMS_CHANGED
corrected corrected data data corrected corrected data data model_scalar coordSystemStrings
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.