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

Class for displaying data within an casacore::MS as a raster (gridded) image. More...

#include <MSAsRaster.h>

Inheritance diagram for casa::MSAsRaster:
casa::ActiveCaching2dDD casa::CachingDisplayData casa::DisplayData casa::DisplayOptions casa::DisplayEH casa::DlTarget

Classes

struct  FlagEdit_
 
struct  MSpos_
 

Public Types

typedef casacore::Int Axis
 
- Public Types inherited from casa::DisplayData
enum  DisplayState {
  DISPLAYED,
  UNDISPLAYED,
  LIMBO
}
 

Public Member Functions

 MSAsRaster (const casacore::String msname, const viewer::DisplayDataOptions &ddo)
 constructor from the filename of an MS More...
 
virtual ~MSAsRaster ()
 Destructor. More...
 
virtual casacore::Bool setOptions (casacore::Record &rec, casacore::Record &recOut)
 Apply option values stored in rec to the DisplayData. More...
 
virtual casacore::Record getOptions (bool scrub=false) const
 Retrieve the current options. More...
 
virtual void setDefaultOptions ()
 set all options to default values (unused so far; incomplete support in base classes...incomplete here as well). More...
 
virtual AttributeBuffer optionsAsAttributes ()
 Return the current options of this DisplayData as a 'restrictions' AttributeBuffer (only options that affect the way the image would be drawn are returned). More...
 
virtual casacore::Bool conformsToCS (const WorldCanvas &wc)
 Determine whether DD is compatible with the WC[H]'s current world coordinates. More...
 
virtual casacore::String showValue (const casacore::Vector< casacore::Double > &world)
 casacore::Format the data value at the given world position. More...
 
virtual casacore::String showPosition (const casacore::Vector< casacore::Double > &world, const casacore::Bool &displayAxesOnly=false)
 casacore::Format the position of the cursor. More...
 
bool showPosition (viewer::RegionInfo::stats_t &stat_list, const casacore::Vector< casacore::Double > &world, const casacore::Bool &displayAxesOnly=false)
 
virtual const casacore::Unit dataUnit () const
 get the casacore::Unit for displayed data values (visibilities) More...
 
const casacore::IPosition dataShape () const
 
casacore::uInt dataDim () const
 
std::vector< int > displayAxes () const
 
virtual Display::DisplayDataType classType ()
 Return the type of this DisplayData. More...
 
casacore::String dataType () const
 Pure virtual function from DisplayData... More...
 
virtual casacore::uInt nelements () const
 return the size of the animation axis. More...
 
virtual casacore::uInt nelements (const WorldCanvasHolder &) const
 Return the number of display elements (ie. More...
 
virtual casacore::Bool labelAxes (const WCRefreshEvent &ev)
 Handle axis labelling. More...
 
virtual casacore::Bool canLabelAxes () const
 
virtual void notifyRegister (WorldCanvasHolder *wch)
 Needed to enable or destroy drawlists and colormaps on corresp. More...
 
virtual void notifyUnregister (WorldCanvasHolder &wch, casacore::Bool ignoreRefresh=false)
 ignoreRefresh tells the DD not to refresh just to clean up DMs More...
 
virtual void handleEvent (DisplayEvent &ev)
 handle flagging region selection events, via new-style (1/02) interface. More...
 
virtual casacore::Bool zIndexHint (casacore::Int &preferredZIndex) const
 Return the animator position setting preferred if this DD about to be registered on a new DisplayPanel. More...
 
virtual void purgeCache ()
 Empty cache completely. More...
 
virtual void purgeCache (const WorldCanvasHolder &wch)
 Empty cache of all DMs for a given WCH. More...
 
virtual void setUIBase (casacore::Int uibase)
 DD 'Absolute Pixel Coordinates', e.g. More...
 
virtual const casacore::Stringname () const
 In case it helps; the method should probably be called only before we've had a chance to cache anything though.... More...
 
bool flag (WorldCanvas *wc, double blc_x, double blc_y, double trc_x, double trc_y)
 added to allow flagging control from mouse tools... More...
 
std::string errorMessage () const
 
- Public Member Functions inherited from casa::ActiveCaching2dDD
 ActiveCaching2dDD (const DisplayCoordinateSystem &coordsys, const casacore::Vector< casacore::Double > &pixblc, const casacore::Vector< casacore::Double > &pixtrc)
 Constructor. More...
 
virtual ~ActiveCaching2dDD ()
 Destructor. More...
 
virtual casacore::Bool linToWorld (casacore::Vector< casacore::Double > &world, const casacore::Vector< casacore::Double > &lin)
 casacore::Coordinate transformation handlers, called by WorldCanvasHolder. More...
 
virtual casacore::Bool worldToLin (casacore::Vector< casacore::Double > &lin, const casacore::Vector< casacore::Double > &world)
 
virtual casacore::Vector
< casacore::String
worldAxisNames () const
 World axis information suppliers. More...
 
virtual casacore::Vector
< casacore::String
worldAxisUnits () const
 
virtual casacore::Bool sizeControl (WorldCanvasHolder &wcHolder, AttributeBuffer &holderBuf)
 Negotiatiate WorldCanvas linear coordinate system when asked to do so by the WorldCanvasHolder. More...
 
virtual void cleanup ()
 Tidy up the elements of this DisplayData. More...
 
- Public Member Functions inherited from casa::CachingDisplayData
 CachingDisplayData ()
 Constructor. More...
 
virtual ~CachingDisplayData ()
 Destructor. More...
 
virtual void refreshEH (const WCRefreshEvent &ev)
 Refresh event handler which is called indirectly by the WorldCanvas, via the WorldCanvasHolder. More...
 
virtual void setColormap (Colormap *cmap, casacore::Float weight)
 Purges cache, to avoid reusing images with the wrong colormap, then calls base class version. More...
 
- Public Member Functions inherited from casa::DisplayData
 DisplayData ()
 (Required) default constructor. More...
 
virtual ~DisplayData ()
 required destructor More...
 
virtual void setDisplayState (DisplayState s)
 
virtual DisplayState getDisplayState () const
 
virtual bool isDisplayable () const
 
virtual void addRestrictions (AttributeBuffer &otherBuf)
 Add general restrictions or a restriction for item itemNum of this DisplayData. More...
 
virtual void addRestriction (Attribute &newRestriction, casacore::Bool permanent)
 
virtual void addElementRestrictions (const casacore::uInt itemNum, AttributeBuffer &other)
 
virtual void addElementRestriction (const casacore::uInt itemNum, Attribute &newRestriction, casacore::Bool permanent)
 
virtual void setRestrictions (AttributeBuffer &otherBuf)
 Set general restrictions or a restriction for item itemNum of this DisplayData. More...
 
virtual void setRestriction (Attribute &newRestriction)
 
virtual void setElementRestrictions (const casacore::uInt itemNum, AttributeBuffer &other)
 
virtual void setElementRestriction (const casacore::uInt itemNum, Attribute &newRestriction)
 
virtual void removeRestriction (const casacore::String &name)
 Remove a general restriction or a restriction from item itemNum More...
 
virtual void removeElementRestriction (const casacore::uInt itemNum, const casacore::String &name)
 
virtual void clearRestrictions ()
 Clear all general restrictions or all restrictions of item itemNum (except the ones that are permanent of course...) More...
 
virtual void clearElementRestrictions (const casacore::uInt itemNum)
 
virtual casacore::Bool existRestriction (const casacore::String &name)
 Check if a general restriction or a restriction for item itemNum with name name exists. More...
 
virtual casacore::Bool existElementRestriction (const casacore::uInt itemNum, const casacore::String &name)
 
virtual AttributeBufferrestrictionBuffer ()
 Get a handle to the buffer of general restrictions or of the buffer of restrictions for item itemNum More...
 
virtual AttributeBufferelementRestrictionBuffer (const casacore::uInt itemNum)
 
virtual casacore::Bool conformsTo (const WorldCanvas *wCanvas)
 Check whether the DD is is compatible with all WC[H] state, including its coordinate state, restrictions, and zIndex (if any). More...
 
virtual casacore::Bool conformsTo (const WorldCanvas &wc)
 
virtual casacore::Bool conformsToRstrs (const WorldCanvas &wc)
 Determine whether DD restrictions are in conformance with restrictions on the given WCH. More...
 
virtual casacore::Bool conformsToZIndex (const WorldCanvas &wc)
 Determine whether DD is compatible with the current canvas animation (zIndex) position. More...
 
virtual casacore::Int activeZIndex (const WorldCanvas *wc=0)
 Retrieve 'Active' zIndex. More...
 
virtual casacore::Bool getFirstZIndex (int &firstZIndex, casacore::Int axZrng=-1) const
 Set firstZIndex to minimum zIndex setting from all canvases where this DD is registered. More...
 
virtual void addPositionEventHandler (WCPositionEH *positionHandler)
 Add event handlers on the DisplayData. More...
 
virtual void addMotionEventHandler (WCMotionEH *motionHandler)
 
virtual void addRefreshEventHandler (WCRefreshEH *refreshHandler)
 
virtual void addDisplayEventHandler (DisplayEH *displayHandler)
 
virtual void removePositionEventHandler (WCPositionEH &positionHandler)
 Remove eventhandlers. More...
 
virtual void removeMotionEventHandler (WCMotionEH &motionHandler)
 
virtual void removeRefreshEventHandler (WCRefreshEH &refreshHandler)
 
virtual void removeDisplayEventHandler (DisplayEH &displayHandler)
 
virtual void removeColormap ()
 
virtual Colormapcolormap () const
 
void setAttribute (Attribute &at)
 set an Attribute or Attributes More...
 
void setAttributes (AttributeBuffer &at)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::uInt &newValue)
 User interface to get value from the attribute buffer. More...
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::Int &newValue)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::Float &newValue)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::Double &newValue)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::Bool &newValue)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::String &newValue)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::Vector< casacore::uInt > &newValue)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Int > &newValue)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Float > &newValue)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Double > &newValue)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Bool > &newValue)
 
casacore::Bool getAttributeValue (const casacore::String &name, casacore::Vector< casacore::String > &newValue)
 
casacore::Bool existsAttribute (casacore::String &name)
 Check if a certain Attribute exists. More...
 
void removeAttribute (casacore::String &name)
 Remove an Attribute. More...
 
AttValue::ValueType attributeType (casacore::String &name)
 Get the type of the Attribute. More...
 
void setAttributeOnPrimaryWCHs (Attribute &at)
 Set an attribute on any WorldCanvas for which this DD is CS master. More...
 
virtual void removeFromAllWCHs ()
 remove this DD everywhere–will stop any more refresh handling by the DD. More...
 
virtual void refresh (casacore::Bool clean=false)
 an explicit refresh: should be called if the DisplayData is changed such that drawing is required. More...
 
virtual casacore::String className () const
 Return the class name of this DisplayData; useful mostly for debugging purposes, and perhaps future use in the glish widget interface. More...
 
virtual casacore::String description () const
 
virtual ImageAnalysis * imageanalysis () const
 Get image analyis about images... More...
 
virtual std::shared_ptr
< casacore::ImageInterface
< casacore::Float > > 
imageinterface ()
 Returns a pointer that should not be deleted... More...
 
virtual void setSubstituteTitleText (const casacore::String)
 
const WorldCanvasHolderfindHolder (const WorldCanvas *wCanvas) const
 Identify the WorldCanvasHolder for the given WorldCanvas. More...
 
WorldCanvasHolderfindHolder (const WorldCanvas *wCanvas)
 
virtual casacore::Block
< casacore::Int
allZIndices (casacore::Int axZrng=-1) const
 Return a sorted casacore::Block of all animation frame numbers currently set onto all WCHs where this DD is registered. More...
 
virtual casacore::Bool isCSmaster (const WorldCanvasHolder *wch=0) const
 Is this DD the CS master of the passed WCH? Defaulting wch to 0 asks whether this DD is CS master of some WCH on which it is registered. More...
 
virtual casacore::Int uiBase () const
 DD 'Absolute Pixel Coordinates', e.g. More...
 
virtual casacore::Bool getDelTmpData ()
 Get and set method for the flag. More...
 
virtual void setDelTmpData (casacore::Bool delTmpData)
 
virtual void setDisplayDataRed (DisplayData *)
 
virtual void setDisplayDataBlue (DisplayData *)
 
virtual void setDisplayDataGreen (DisplayData *)
 
- Public Member Functions inherited from casa::DisplayOptions
 DisplayOptions ()
 Constructor. More...
 
virtual ~DisplayOptions ()
 Destructor. More...
 
template<class T >
casacore::Bool readOptionRecord (casacore::Vector< T > &target, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const
 Find the field fieldname in casacore::Record rec, containing the requested type (casacore::Bool, casacore::String, casacore::Float, casacore::Int) in itself or its "value" sub-field, and return the value in target. More...
 
template<class T >
casacore::Bool readOptionRecord (T &target, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const
 
virtual casacore::Bool readOptionRecord (casacore::String &target, casacore::Bool &unsetTarget, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const
 Find the field fieldname in casacore::Record rec, containing the requested type (casacore::String) in itself or its "value" sub-field, and return the value in target. More...
 
casacore::Record unset () const
 Return a casacore::Record which is an "unset" casacore::Record, ie. More...
 
casacore::Bool isUnset (const casacore::Record &rec) const
 Return true or false indicating if the provided casacore::Record is equal to an "unset" Record. More...
 
- Public Member Functions inherited from casa::DisplayEH
virtual ~DisplayEH ()
 
- Public Member Functions inherited from casa::DlTarget
 DlTarget ()
 
 DlTarget (const DlTarget &)
 
virtual ~DlTarget ()
 
void reg (DlHandleBase *p)
 
void unreg (DlHandleBase *p)
 

Protected Member Functions

virtual casacore::Bool setActiveZIndex_ (casacore::Int zindex)
 This routine is called to inform the DD of the current canvas's animator index. More...
 
void constructParameters_ ()
 Construct and destroy the user option DisplayParameters. More...
 
void deleteParameters_ ()
 
virtual CachingDisplayMethodnewDisplayMethod (WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd)
 return a new MSAsRasterDM for the given WorldCanvas. More...
 
- Protected Member Functions inherited from casa::ActiveCaching2dDD
 ActiveCaching2dDD ()
 (Required) default constructor. More...
 
 ActiveCaching2dDD (const ActiveCaching2dDD &other)
 (Required) copy constructor. More...
 
void operator= (const ActiveCaching2dDD &other)
 (Required) copy assignment. More...
 
void setCoordinateSystem (const DisplayCoordinateSystem &coordsys, const casacore::Vector< casacore::Double > &pixblc, const casacore::Vector< casacore::Double > &pixtrc)
 Install a DisplayCoordinateSystem and limits. More...
 
void identifyWorldAxis (casacore::Coordinate::Type &type, casacore::Int &coordinate, casacore::Int &axisincoord, const casacore::uInt worldaxisnum)
 Identify a specified world axis by its casacore::Coordinate type, number, and axis in that coordinate. More...
 
casacore::String codeWorldAxis (const casacore::uInt worldaxisnum)
 Generate a casacore::String code for the specified world axis, describing the coordinate type, number and axis in that coordinate. More...
 
casacore::Vector
< casacore::Double
worldAxisIncrements () const
 Return the world axis increments. More...
 
virtual casacore::Bool worldCoordTracking () const
 Return whether tracking is currently world (T) or pixel (F) coordinates. More...
 
- Protected Member Functions inherited from casa::CachingDisplayData
virtual void setCaching (const casacore::Bool caching)
 Return any additional Attributes to consider when searching the cache. More...
 
 CachingDisplayData (const CachingDisplayData &other)
 (Required) copy constructor. More...
 
void operator= (const CachingDisplayData &other)
 (Required) copy assignment. More...
 
- Protected Member Functions inherited from casa::DisplayData
casacore::Bool conformed ()
 Returns result of last call to conformsTo(WCH&). More...
 
casacore::Bool isCsAndZIndexConformed ()
 Added so that when two images are loaded with no velocity alignment, they can still show their position coordinates without having to be rstrsConformed. More...
 
virtual void delTmpData (casacore::String &tmpData)
 Delete temporary data. More...
 
virtual const std::list
< WCPositionEH * > * 
positionEventHandlerList ()
 Retrieve position, motion, refresh and display event handler lists. More...
 
virtual const std::list
< WCMotionEH * > * 
motionEventHandlerList ()
 
virtual const std::list
< WCRefreshEH * > * 
refreshEventHandlerList ()
 
virtual const std::list
< DisplayEH * > * 
displayEventHandlerList ()
 
virtual void positionEH (const WCPositionEvent &ev)
 Position, motion and refresh event handlers that will generally be called by a WorldCanvasHolder. More...
 
virtual void motionEH (const WCMotionEvent &ev)
 
 DisplayData (const DisplayData &other)
 (Required) copy constructor. More...
 
void operator= (const DisplayData &other)
 (Required) copy assignment. More...
 
- Protected Member Functions inherited from casa::DisplayOptions
 DisplayOptions (const DisplayOptions &other)
 (Required) copy constructor. More...
 
void operator= (const DisplayOptions &other)
 (Required) copy assignment. More...
 

Static Protected Member Functions

static casacore::Float real (const casacore::Complex &val)
 Helper functions. More...
 
static casacore::Float imag (const casacore::Complex &val)
 

Private Types

typedef casacore::Int AxisLoc
 Each axis can placed on the canvas display (X or Y), the animator (Z), or on one of 2 auxiliary slider controls (SL0, SL1) More...
 
typedef casacore::Int VisType
 
typedef casacore::Int VisComp
 
typedef casacore::Int VisDev
 

Private Member Functions

casacore::String avgPos (const casacore::String &dim, int v)
 
Constructs position information for non-deviation display

state averaging... More...

 
 MSAsRaster ()
 Default and copy constructors, and the assignment operator, are non-functional and should not be used. More...
 
 MSAsRaster (const MSAsRaster &other)
 
MSAsRasteroperator= (const MSAsRaster &)
 
void initMSAR_ (const viewer::DisplayDataOptions &ddo)
 Initialization common to all useful constructors. More...
 
void setDefaultMSAROptions_ ()
 set/restore default option values on this level only. More...
 
void selectVS_ (const viewer::DisplayDataOptions &ddo=viewer::DisplayDataOptions())
 prepare the selection casacore::MS and its VisSet. More...
 
void findRanges_ ()
 find the ranges of the casacore::MS selection (VisSet) for the 5 hypercube axes More...
 
DisplayCoordinateSystem setCS_ ()
 update/set the (2d–canvas) coordinate system from the current MS selection and display axes. More...
 
void extract_ ()
 Extract the hypercube buffer of visibilities for the requested casacore::MS selection and axis settings (the most time-consuming operation). More...
 
void createDisplaySlice_ ()
 retrieve (2D) slice data casacore::Matrix, and corresponding mask/flag matrices, to send to the display canvas. More...
 
casacore::Bool draw_ (Display::RefreshReason reason, WorldCanvasHolder &wch, WorldCanvas &wc)
 Actually do the drawing. More...
 
void computeBaselineSorts_ ()
 Called from findRanges_(), computes translation matrices between antenna1,antenna2 and baseline index (a1A_, a2A_, a1L_, a2L_, bslA_, bslL_). More...
 
void setBslSort_ ()
 Set the baseline index translation Arrays a1_, a2_ and bsl_ by copying as appropriate according to the current sort. More...
 
void reSortVis_ ()
 Shuffle vis_ into new baseline order, per user request for sort change. More...
 
casacore::Int bsln_ (casacore::Int a1, casacore::Int a2) const
 Return baseline index (for the ant1-ant2 sort only) from antenna numbers. More...
 
void a1a2_ (casacore::Double &a1, casacore::Double &a2, casacore::Double bsl, casacore::Int abase=0) const
 A corresponding inverse, this handles non-integer 'baseline indices'. More...
 
casacore::Double a1a2_ (casacore::Double bsl, casacore::Int abase=0)
 
casacore::Double a1mult_ ()
 Subsidiary routine for above, determines (in effect) how many decimal places are needed for an antenna number (including one leading zero). More...
 
casacore::String visMbLabel_ ()
 A small routine to return the label for the "Visibility Memory" slider widget. More...
 
void resetFreq_ ()
 Reset casacore::Block of relevant Spectral window IDs, and return correponding Vectors of channel frequencies. More...
 
casacore::Int spw_ (casacore::Int spwid)
 Translate actual spectral window ID into the 'spw' index (zero-based pixel coordinate) along the spectral window axis. More...
 
void computeVisShape_ (casacore::Block< casacore::Int > &visShp, casacore::Block< casacore::Int > &visShpA)
 Compute vis_ array dimensions which fit into allowed memory. More...
 
casacore::Int nframes_ (const casacore::Block< casacore::Int > &frames, casacore::Int strtfrm, casacore::Int nfrms, casacore::Int &margin)
 Return how many of the given (sorted) animation frames can be displayed from a given window (strtfrm, nfrms) on that axis. More...
 
casacore::Int maxframes_ (const casacore::Block< casacore::Int > &frames, casacore::Int &strtfrm, casacore::Int nfrms)
 Return the maximum number of the given (sorted) animation frames that can be displayed from a window or interval of a given size (nfrms). More...
 
void resetMinMax_ ()
 Reset data scaling DParameters to newly-computed data ranges. More...
 
bool freqAxis (Axis) const
 represent channels with their frequency? More...
 
casacore::Bool flag_ (casacore::IPosition &slot)
 Return or set a flag within the bitmapped flags_ vector, as if it were a 5-axis casacore::Array<casacore::Bool> corresponding in dimensions to vis_. More...
 
void setFlag_ (casacore::IPosition &slot, casacore::Bool flag)
 
void addEdit_ (WorldCanvas *wc, casacore::Int xStart, casacore::Int xShape, casacore::Int yStart, casacore::Int yShape)
 Add the edit request that just came in (from the mouse, via handleEvent) to the flagEdits_ casacore::List, then cause the display to be updated. More...
 
void postEditsToDisp_ ()
 Assure that the display matrices are up-to-date with the flagging edits list, to provide visual feedback of the edits. More...
 
casacore::Bool undoEdits_ (casacore::String extent="all", casacore::Bool feedback=false)
 Undo unsaved edits. More...
 
casacore::Bool saveEdits_ ()
 Save all edits permanently to the MS. More...
 
void computeTimeBoxcars_ ()
 compute the lsTime_ and leTime_ vectors, which define the 'local neighborhoods' around each given time slot, for computing running averages. More...
 
casacore::Float v_ (casacore::Int t)
 Return a single visibility point from vis_ or disp_, as a function of time slot only. More...
 
casacore::Float vAlt_ (casacore::Float v)
 Phase deviations are calculated both for the original phases (in [-180,180]), and for the phases 180 degrees opposite (also expressed within [-180,180]); the minimum result is displayed. More...
 
casacore::Float dev_ (casacore::Int t)
 Return the visibility deviation for the time slot t. More...
 
void computeDevRange_ ()
 Calculate deviations throughout range of vis_. More...
 
void createDevSlice_ ()
 Create dispDev_ casacore::Matrix for displaying deviations. More...
 
Axis axisNum_ (const casacore::String &axisName) const
 ...applied to 3 of the 'enums' used internally. More...
 
VisType visTypeNum_ (const casacore::String &visTypeName) const
 
VisComp visCompNum_ (const casacore::String &visCompName) const
 
bool adjustAvgRange (VisDev newstate, casacore::Record &outrec, bool force=false)
 

Static Private Member Functions

static casacore::Int ind_ (const casacore::String &name, const casacore::Vector< casacore::String > &names)
 Generic string-to-index converter... More...
 

Private Attributes

casacore::Vector
< casacore::String
axisName_
 --—more constants and statics -------------------------------------— More...
 
casacore::Vector
< casacore::String
visTypeName_
 
casacore::Vector
< casacore::String
visCompName_
 
casacore::String msName_
 --—primary user input data----------------------------------------— More...
 
DParameterRange< casacore::Int > * itsVisMb
 User option DisplayParameters specific to MSAsRaster. More...
 
DParameterChoiceitsXAxis
 Which axes will be on X, Y, Animator. More...
 
DParameterChoiceitsYAxis
 
DParameterChoiceitsZAxis
 
DParameterRange< casacore::Int > * itsSL0Pos
 Which slice to display, for the other two axes. More...
 
DParameterRange< casacore::Int > * itsSL1Pos
 
DParameterChoiceitsBslnSort
 Baseline sort (antenna1-antenna2 vs. More...
 
DParameterRange
< casacore::Float > * 
itsDataMin
 Sent to scale handler for scaling data to color within these limits. More...
 
DParameterRange
< casacore::Float > * 
itsDataMax
 
DParameterChoiceitsAxisLabelling
 Axis Labelling? (Yes/No). More...
 
DParameterChoiceitsParamSpectralUnit
 Units of display for Channels. More...
 
DParameterChoiceitsVisType
 changes to these options require data extraction: More...
 
DParameterChoiceitsVisComp
 Which real visibiliy component to display: Real, Imag, Amp, Phase. More...
 
DParameterRange< casacore::Int > * itsNAvg
 how many values to use (ideally) in moving averages. More...
 
casacore::Vector< casacore::IntaxisOn_
 -—derived from above: what is now requested--------------------— More...
 
casacore::Block< casacore::Intpos_
 permutation of (TIME, BASELN, CHAN, POL, SP_W), corresponding to the axis to display or control on X, Y, Z, SL0, and SL1, in that order. More...
 
VisType visType_
 Zero-based (although the user sees 1-based values). More...
 
VisComp visComp_
 
VisDev visDev_
 
casacore::Int nDAvg_
 visComp_ and visDev_. More...
 
casacore::Int nPAvg_
 
casacore::Vector< casacore::IntfieldIds_
 
casacore::Vector< casacore::IntspwIds_
 
casacore::MeasurementSetitsMS
 -—current state of main internal data: what is already computed-— More...
 
VisibilityIteratorvs_
 
casacore::Bool msValid_
 
casacore::ROMSColumnsmsCols_
 (should be set true (permanently) during construction, or this object will be useless, and do nothing). More...
 
casacore::Int nFieldIds_
 
casacore::Int nSpwIds_
 
casacore::Vector< casacore::IntnChan_
 
casacore::Matrix
< casacore::Double
chanFreq_
 
casacore::Bool dish_
 
casacore::MSmssel_
 which will then be used instead of the DATA column). More...
 
VisibilityIteratorwvi_p
 
casacore::Bool msselValid_
 
casacore::Int nAnt_
 not draw until this is set true (in selectVS_). More...
 
casacore::Block< casacore::IntmsShape_
 of the set of antennas appearing in mssel_ main data rows. More...
 
casacore::Block< casacore::IntmsShapeA_
 = {nTime, nBsln, nChan, nPol, nSpw}. More...
 
casacore::Bool antSort_
 axis when baselines are sorted by length (antSort==false). More...
 
casacore::Matrix
< casacore::Double
bLen_
 sorted by antenna1-antenna2. More...
 
casacore::Vector< casacore::Inta1_
 numbers (symmetric, 0 along diagonal). More...
 
casacore::Vector< casacore::Inta2_
 
casacore::Vector< casacore::Inta1A_
 
casacore::Vector< casacore::Inta2A_
 
casacore::Vector< casacore::Inta1L_
 
casacore::Vector< casacore::Inta2L_
 
casacore::Vector< casacore::Intlen2ant_
 
casacore::Vector< casacore::Intant2len_
 
casacore::Matrix< casacore::Intbsl_
 
casacore::Matrix< casacore::IntbslA_
 
casacore::Matrix< casacore::IntbslL_
 
casacore::Int nbsl_
 
casacore::Int nbslA_
 
casacore::Int nbslL_
 
casacore::Vector
< casacore::Double
time_
 The A and L versions are for antenna and length sorts, respectively; they are copied into a1_, a2_, and bsl_ in accordance with the current sort. More...
 
casacore::Vector< casacore::Intfield_
 only first msShape_TIME) are valid. More...
 
casacore::Vector< casacore::Intscan_
 indexed as time_ is, above. More...
 
casacore::Vector
< casacore::String
fieldName_
 
casacore::Block< casacore::IntspwId_
 
casacore::Block< void * > freq_
 The user can select the spectral windows to view. More...
 
casacore::Int nPolIds_
 (*freq_[spw])[chan] holds the CHAN_FREQ for the given spw index and channel (in Hz). More...
 
casacore::Vector< casacore::IntnPolsIn_
 (and the size of the next two vectors). More...
 
casacore::Vector< casacore::IntpidBase_
 
casacore::Vector< casacore::IntpolId_
 within msShape_[POL] and its index within the casacore::MS table's visibility data cell, for given polId (or -1, if the polID is not in the selected data). More...
 
casacore::Vector
< casacore::String
polName_
 
casacore::Array< casacore::Floatvis_
 The visibility hypercube. More...
 
casacore::Bool visValid_
 gridded casacore::MS visibilities (for t, bsl, chan, pol, spw, in that order). More...
 
casacore::Block< casacore::IntvisShape_
 
casacore::Block< casacore::IntvisStart_
 
casacore::Block< casacore::IntvisShapeA_
 
VisType curVisType_
 BASELN axis, and then only when computeVisShape_() determines that the entire msShapeA_[BASELN] will fit into memory, and the length sort is also in effect. More...
 
VisComp curVisComp_
 
casacore::Float dataRngMin_
 
casacore::Float dataRngMax_
 
casacore::Float devRngMin_
 Used (only) for scaling data values to colors; they are too expensive to compute except during extract_(). More...
 
casacore::Float devRngMax_
 
casacore::Matrix< casacore::Floatdisp_
 visibility deviations are being displayed. More...
 
Axis dispX_
 display canvas. More...
 
Axis dispY_
 
casacore::Block< casacore::IntdispPos_
 
casacore::Bool dispValid_
 represents, by Axis. More...
 
casacore::Bool dispNotLoaded_
 called? More...
 
casacore::Matrix< casacore::FloatdispDev_
 NOT_LOADED value? More...
 
casacore::Bool dispDevValid_
 data displays. More...
 
VisDev dispDevType_
 (if necessary) the state of flag edits? More...
 
casacore::Int dispDevNAvg_
 represents. More...
 
casacore::Bool visDataChg_
 in effect when dispDev_ was last computed. More...
 
casacore::Bool postDataRng_
 do not reflect current state of vis_. More...
 
MSpos_ mspos_
 
DParameterChoiceitsFlagColor
 position being viewed as much as possible when casacore::MS selection is changed–e.g., to remain on the same time (if it is still in the selected casacore::MS), even though its time-slot index (slice position) may have changed. More...
 
casacore::Bool flagsInClr_
 
DParameterChoiceitsUnflag
 
casacore::Bool unflag_
 
casacore::Block< casacore::BoolflagAll_
 
DParameterChoiceitsEntireAnt
 no checkbox-type DParameter yet). More...
 
casacore::Bool entireAnt_
 choice box for applying edits to entire antenna. More...
 
DParameterButtonitsUndoOne
 
DParameterButtonitsUndoAll
 defines the button for undoing one edit. More...
 
DParameterChoiceitsEditEntireMS
 defines the button for undoing all edits. More...
 
DParameterButtonitsSaveEdits
 choice box for using entire casacore::MS (vs. More...
 
casacore::Vector< casacore::uIntflags_
 defines the button for saving all edits. More...
 
casacore::Matrix< casacore::BooldispMask_
 from the casacore::MS (only); not for new, unsaved flags. More...
 
casacore::Matrix< casacore::FloatdispFlags_
 good data from flagged/missing data. More...
 
casacore::Bool dispFlagsInClr_
 will overlay the main data array to show flags in color. More...
 
casacore::uInt dispNEdits_
 draw flags in color? More...
 
std::list< void * > flagEdits_
 
casacore::Vector< casacore::IntlsTime_
 (<void*> rather than <FlagEdit_*> just to avoid the extra templates) More...
 
casacore::Vector< casacore::IntleTime_
 
casacore::Vector< casacore::IntlsvTime_
 
casacore::Vector< casacore::IntlevTime_
 
casacore::Bool useVis_
 Beginning and (1 beyond) ending time index defining the 'boxcar' or local neighborhood over which averages are computed, for given time slot. More...
 
casacore::IPosition dPos_
 
AxisLoc axlTm_
 
casacore::Bool flgdDev_
 
casacore::Bool goodData_
 Initializing input to dev_(t) and its subsidiary routine v_(t). More...
 
casacore::Int sT_
 This really should be a return value from v_(); placed here for 'efficiency'. More...
 
casacore::Int eT_
 
casacore::Double sumv_
 
casacore::Double sumv2_
 
casacore::Double sumva_
 
casacore::Double sumv2a_
 
casacore::Int nValid_
 
casacore::Float d_
 
WCPowerScaleHandler itsPowerScaleHandler
 Saved state from the last call to dev_(). More...
 
WorldAxesDD itsAxisLabeller
 This labels the axes. More...
 
Colormap flagCM_
 A private internal colormap for showing colors for various conditions (flagged, no data, data not loaded). More...
 

Static Private Attributes

static const casacore::Int INVALID
 =================== casacore::Data ======================= (mostly) ======== More...
 
static const Axis TIME
 The visibility hypercube (vis_) has 5 axes, in this order. More...
 
static const Axis BASELN
 
static const Axis CHAN
 
static const Axis POL
 
static const Axis SP_W
 
static const Axis NAXES
 
static const Axis INVALID_AXIS
 
static const AxisLoc X
 
static const AxisLoc Y
 
static const AxisLoc Z
 
static const AxisLoc SL0
 
static const AxisLoc SL1
 
static const AxisLoc NLOCS
 
static const VisType OBSERVED
 
static const VisType CORRECTED
 
static const VisType MODEL
 
static const VisType RESIDUAL
 
static const VisType NTYPES
 
static const VisType INVALID_VT
 
static const VisComp AMPLITUDE
 
static const VisComp PHASE
 
static const VisComp REAL
 
static const VisComp IMAGINARY
 
static const VisComp NCOMPS
 
static const VisComp AMPDIFF
 
static const VisComp AMPRMS
 
static const VisComp PHDIFF
 
static const VisComp PHRMS
 
static const VisComp NCOMPNAMES
 
static const VisComp INVALID_VC
 GUI choice box (itsVisComp). More...
 
static const VisDev NORMAL
 
static const VisDev DIFF
 
static const VisDev RMS
 
static const VisDev INVALID_VD
 
static const casacore::Float NO_DATA
 
static const casacore::Float NOT_LOADED
 to stand for 'no data in the selected casacore::MS at this position in the visibility cube'. More...
 
static const casacore::Float INSUF_DATA
 Very similar, but used only in the disp_ array, for data which is not loaded into memory (vis_) at present. More...
 
static const casacore::Float NOTLOADED
 Also similar. More...
 
static const casacore::Float NODATA
 
static const casacore::Float OLDFLAG
 
static const casacore::Float NEWFLAG
 
static const casacore::Int NCOLORS
 

Friends

class MSAsRasterDM
 The (multiple) DMs which this DD creates just hold drawlist handles. More...
 
struct MSpos_
 
struct FlagEdit_
 

Additional Inherited Members

- Static Public Attributes inherited from casa::DisplayData
static const casacore::String DATA_MIN
 
static const casacore::String DATA_MAX
 
- Protected Attributes inherited from casa::ActiveCaching2dDD
DisplayCoordinateSystem itsCoordinateSystem
 Store the 2d DisplayCoordinateSystem here. More...
 
casacore::Vector
< casacore::Double
itsPixelBlc
 Store the 2d pixel corners here. More...
 
casacore::Vector
< casacore::Double
itsPixelTrc
 
- Protected Attributes inherited from casa::CachingDisplayData
casacore::Bool restorePCColormap_
 The default is false. More...
 
- Protected Attributes inherited from casa::DisplayData
AttributeBuffer restrictions
 The Book says that we should not put data members in class that is supposed to only define an interface, but by putting these here, we can implement some of the restriction & eventhandling stuff so that people do not have to repeat it. More...
 
AttributeBuffer attributes
 buffer for storing Attributes More...
 
casacore::PtrBlock< void * > DDelement
 list of DisplayDataElements, which are of type DisplayMethod or derived More...
 
casacore::Int activeZIndex_
 Indicates the 'current' animation frame, i.e. More...
 
casacore::Bool delTmpData_
 Flag indicating that temporary data should be removed when deleting the object. More...
 
casacore::Bool rstrsConformed_
 Somewhat limited-use state, saved here for 'efficiency'. More...
 
casacore::Bool csConformed_
 
casacore::Bool zIndexConformed_
 

Detailed Description

Class for displaying data within an casacore::MS as a raster (gridded) image.

Prerequisite

Etymology

"MSAsRaster" is a implementation of a ActiveCaching2dDD which provides for the display of Measurement Set data (visibilities) as a raster image.

Synopsis

MSAsRaster displays Measurement Set data which can be presented as a regular grid, on a WorldCanvas (data which is sparse and irregular on its display axes would typically be plotted using MSAsXY instead). Display or iteration axes include time, baseline, channels and polarizations. Visibilities of the selected slice are drawn as a Raster image.

Unlike many DDs, MSAsRaster has two levels of underlying data: the source casacore::MS, and a hypercube of visibility data, which is extracted from the casacore::MS and gridded onto 5 main axes: time, baseline, spectral window, frequency and polarization. Extracting the data is a more time-consuming operation than display of various portions of gridded data, and is triggered only through the extract_() method. casacore::Data selection options do not take effect until triggered in this way. In contrast, many options affecting display of the extracted data (such as zooms, and colormapping) affect the display immediately, as with most DDs. Setting new display axes will trigger extract_() if the current extracted hypercube does not fill them.

Example

MSAsRaster *mar = new MSAsRaster("filename_of.ms");
wcHolder->addDisplayData(mar);

Motivation

To move compute-intensive tasks of data handling for Measurement Set display out of glish into C++

Definition at line 128 of file MSAsRaster.h.

Member Typedef Documentation

Definition at line 132 of file MSAsRaster.h.

Each axis can placed on the canvas display (X or Y), the animator (Z), or on one of 2 auxiliary slider controls (SL0, SL1)

Definition at line 605 of file MSAsRaster.h.

Definition at line 615 of file MSAsRaster.h.

Definition at line 625 of file MSAsRaster.h.

Definition at line 608 of file MSAsRaster.h.

Constructor & Destructor Documentation

casa::MSAsRaster::MSAsRaster ( const casacore::String  msname,
const viewer::DisplayDataOptions ddo 
)

constructor from the filename of an MS

virtual casa::MSAsRaster::~MSAsRaster ( )
virtual

Destructor.

casa::MSAsRaster::MSAsRaster ( )
inlineprivate

Default and copy constructors, and the assignment operator, are non-functional and should not be used.

Do not make copies of DisplayData objects, or pass them by value; use references or pointers instead.

Definition at line 357 of file MSAsRaster.h.

casa::MSAsRaster::MSAsRaster ( const MSAsRaster other)
inlineprivate

Definition at line 358 of file MSAsRaster.h.

Member Function Documentation

void casa::MSAsRaster::a1a2_ ( casacore::Double a1,
casacore::Double a2,
casacore::Double  bsl,
casacore::Int  abase = 0 
) const
private

A corresponding inverse, this handles non-integer 'baseline indices'.

Set abase to 1 to number ant1 and ant2 from 1. (The baseline index bsl is always numbered from 0, internally). The version with the casacore::Double return value returns a1 + a2/a1mult_() (for labelling – example: for baseline index corresp. to 13-24, returns 13.024).

casacore::Double casa::MSAsRaster::a1a2_ ( casacore::Double  bsl,
casacore::Int  abase = 0 
)
private
casacore::Double casa::MSAsRaster::a1mult_ ( )
inlineprivate

Subsidiary routine for above, determines (in effect) how many decimal places are needed for an antenna number (including one leading zero).

Returns 1000 for 10-99 antennas, 10000 for 100-999 antennas, etc.

Definition at line 452 of file MSAsRaster.h.

References nAnt_, and casa::DisplayData::uiBase().

void casa::MSAsRaster::addEdit_ ( WorldCanvas wc,
casacore::Int  xStart,
casacore::Int  xShape,
casacore::Int  yStart,
casacore::Int  yShape 
)
private

Add the edit request that just came in (from the mouse, via handleEvent) to the flagEdits_ casacore::List, then cause the display to be updated.

bool casa::MSAsRaster::adjustAvgRange ( VisDev  newstate,
casacore::Record outrec,
bool  force = false 
)
private
casacore::String casa::MSAsRaster::avgPos ( const casacore::String dim,
int  v 
)
private

Constructs position information for non-deviation display

state averaging...

Axis casa::MSAsRaster::axisNum_ ( const casacore::String axisName) const
inlineprivate

...applied to 3 of the 'enums' used internally.

Definition at line 636 of file MSAsRaster.h.

References axisName_, and ind_().

casacore::Int casa::MSAsRaster::bsln_ ( casacore::Int  a1,
casacore::Int  a2 
) const
inlineprivate

Return baseline index (for the ant1-ant2 sort only) from antenna numbers.

casacore::Input must have 0 <= a1 <= a2 < nAnt_. Mapping leaves room for autocorrelations plus a 1-pixel gap between successive antenna1 groups.

Definition at line 435 of file MSAsRaster.h.

References nAnt_.

virtual casacore::Bool casa::MSAsRaster::canLabelAxes ( ) const
virtual

Reimplemented from casa::DisplayData.

virtual Display::DisplayDataType casa::MSAsRaster::classType ( )
inlinevirtual

Return the type of this DisplayData.

Implements casa::DisplayData.

Definition at line 212 of file MSAsRaster.h.

References casa::Display::Raster.

void casa::MSAsRaster::computeBaselineSorts_ ( )
private

Called from findRanges_(), computes translation matrices between antenna1,antenna2 and baseline index (a1A_, a2A_, a1L_, a2L_, bslA_, bslL_).

void casa::MSAsRaster::computeDevRange_ ( )
private

Calculate deviations throughout range of vis_.

Used to set data scaling sliders when visibility deviations are to be displayed.

void casa::MSAsRaster::computeTimeBoxcars_ ( )
private

compute the lsTime_ and leTime_ vectors, which define the 'local neighborhoods' around each given time slot, for computing running averages.

void casa::MSAsRaster::computeVisShape_ ( casacore::Block< casacore::Int > &  visShp,
casacore::Block< casacore::Int > &  visShpA 
)
private

Compute vis_ array dimensions which fit into allowed memory.

visShpA is the actual shape to be allocated to vis_; visShp is the portion which will actually be used at present; it may be smaller on the BASELN axis if baselines are currently sorted by length (no 'gaps').

virtual casacore::Bool casa::MSAsRaster::conformsToCS ( const WorldCanvas wc)
inlinevirtual

Determine whether DD is compatible with the WC[H]'s current world coordinates.

MSAsRaster DDs must be in charge (the CS master), Otherwise they will not respond. Multiple MSARs on one canvas (blinking, etc.) is not supported, because of possible confusion about which one(s) should respond to flagging edits.

Reimplemented from casa::ActiveCaching2dDD.

Definition at line 181 of file MSAsRaster.h.

References casa::DisplayData::csConformed_, and casa::WorldCanvas::isCSmaster().

void casa::MSAsRaster::constructParameters_ ( )
protected

Construct and destroy the user option DisplayParameters.

To be used by constructors/destructor only.

void casa::MSAsRaster::createDevSlice_ ( )
private

Create dispDev_ casacore::Matrix for displaying deviations.

Both this routine and the one above initialize and use dev_() to calculate individual deviations.

void casa::MSAsRaster::createDisplaySlice_ ( )
private

retrieve (2D) slice data casacore::Matrix, and corresponding mask/flag matrices, to send to the display canvas.

casacore::uInt casa::MSAsRaster::dataDim ( ) const
inlinevirtual

Implements casa::DisplayData.

Definition at line 203 of file MSAsRaster.h.

const casacore::IPosition casa::MSAsRaster::dataShape ( ) const
inlinevirtual

Implements casa::DisplayData.

Definition at line 200 of file MSAsRaster.h.

casacore::String casa::MSAsRaster::dataType ( ) const
inlinevirtual

Pure virtual function from DisplayData...

Implements casa::DisplayData.

Definition at line 216 of file MSAsRaster.h.

virtual const casacore::Unit casa::MSAsRaster::dataUnit ( ) const
virtual

get the casacore::Unit for displayed data values (visibilities)

Implements casa::DisplayData.

void casa::MSAsRaster::deleteParameters_ ( )
protected
casacore::Float casa::MSAsRaster::dev_ ( casacore::Int  t)
private

Return the visibility deviation for the time slot t.

visDev_ determines whether this is an RMS deviation or absolute difference from the running mean. Maintains state from the prior calculation to speed things up in some cases. Must be initialized as for v_() above, and sT_ set to -1, at the beginning of a new row of times.

std::vector<int> casa::MSAsRaster::displayAxes ( ) const
inlinevirtual

Implements casa::DisplayData.

Definition at line 206 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::draw_ ( Display::RefreshReason  reason,
WorldCanvasHolder wch,
WorldCanvas wc 
)
private

Actually do the drawing.

The return value indicates whether the DD was able to draw.

Referenced by casa::MSAsRasterDM::drawIntoList().

std::string casa::MSAsRaster::errorMessage ( ) const
inlinevirtual

Implements casa::DisplayData.

Definition at line 299 of file MSAsRaster.h.

void casa::MSAsRaster::extract_ ( )
private

Extract the hypercube buffer of visibilities for the requested casacore::MS selection and axis settings (the most time-consuming operation).

void casa::MSAsRaster::findRanges_ ( )
private

find the ranges of the casacore::MS selection (VisSet) for the 5 hypercube axes

bool casa::MSAsRaster::flag ( WorldCanvas wc,
double  blc_x,
double  blc_y,
double  trc_x,
double  trc_y 
)

added to allow flagging control from mouse tools...

<drs>

casacore::Bool casa::MSAsRaster::flag_ ( casacore::IPosition slot)
private

Return or set a flag within the bitmapped flags_ vector, as if it were a 5-axis casacore::Array<casacore::Bool> corresponding in dimensions to vis_.

(Note: flags_ is an internal array corresponding to the current state of flags in the casacore::MS, but these routines in themselves do not read or write any flags to disk).

bool casa::MSAsRaster::freqAxis ( Axis  ) const
private

represent channels with their frequency?

virtual casacore::Record casa::MSAsRaster::getOptions ( bool  scrub = false) const
virtual

Retrieve the current options.

In addition to the values themselves, the returned record contains meta-information (prompts, help text, choices, defaults, etc.) useful in constructing gui elements to control the DD settings. Note: If the user interface is to be zero-based, you should call setUIBase(0) before using this routine – see setUIBase().

Reimplemented from casa::ActiveCaching2dDD.

virtual void casa::MSAsRaster::handleEvent ( DisplayEvent ev)
virtual

handle flagging region selection events, via new-style (1/02) interface.

Reimplemented from casa::DisplayData.

static casacore::Float casa::MSAsRaster::imag ( const casacore::Complex &  val)
inlinestaticprotected

Definition at line 335 of file MSAsRaster.h.

static casacore::Int casa::MSAsRaster::ind_ ( const casacore::String name,
const casacore::Vector< casacore::String > &  names 
)
inlinestaticprivate

Generic string-to-index converter...

Definition at line 629 of file MSAsRaster.h.

References name(), and casacore::ArrayBase::nelements().

Referenced by axisNum_(), visCompNum_(), and visTypeNum_().

void casa::MSAsRaster::initMSAR_ ( const viewer::DisplayDataOptions ddo)
private

Initialization common to all useful constructors.

virtual casacore::Bool casa::MSAsRaster::labelAxes ( const WCRefreshEvent ev)
virtual

Handle axis labelling.

Reimplemented from casa::DisplayData.

casacore::Int casa::MSAsRaster::maxframes_ ( const casacore::Block< casacore::Int > &  frames,
casacore::Int strtfrm,
casacore::Int  nfrms 
)
private

Return the maximum number of the given (sorted) animation frames that can be displayed from a window or interval of a given size (nfrms).

also returns where that interval should start (strtfrm).

virtual const casacore::String& casa::MSAsRaster::name ( ) const
inlinevirtual

In case it helps; the method should probably be called only before we've had a chance to cache anything though....

Definition at line 292 of file MSAsRaster.h.

References msName_.

Referenced by ind_().

virtual casacore::uInt casa::MSAsRaster::nelements ( ) const
inlinevirtual

return the size of the animation axis.

Reimplemented from casa::ActiveCaching2dDD.

Definition at line 223 of file MSAsRaster.h.

References axisOn_, msShape_, and Z.

Referenced by setActiveZIndex_().

virtual casacore::uInt casa::MSAsRaster::nelements ( const WorldCanvasHolder ) const
inlinevirtual

Return the number of display elements (ie.

drawable images) in this DisplayData. Both return 1 because this is defined to be a two-dimensional DisplayData, and can only have one view. That is, there is no third axis to iterate over for multiple views.

Reimplemented from casa::ActiveCaching2dDD.

Definition at line 226 of file MSAsRaster.h.

References axisOn_, msShape_, and Z.

virtual CachingDisplayMethod* casa::MSAsRaster::newDisplayMethod ( WorldCanvas worldCanvas,
AttributeBuffer wchAttributes,
AttributeBuffer ddAttributes,
CachingDisplayData dd 
)
protectedvirtual

return a new MSAsRasterDM for the given WorldCanvas.

Implements casa::CachingDisplayData.

casacore::Int casa::MSAsRaster::nframes_ ( const casacore::Block< casacore::Int > &  frames,
casacore::Int  strtfrm,
casacore::Int  nfrms,
casacore::Int margin 
)
private

Return how many of the given (sorted) animation frames can be displayed from a given window (strtfrm, nfrms) on that axis.

In cases where nframes>0, margin will be the minimum padding on either side, from the edges of the interval to the frames of interest.

virtual void casa::MSAsRaster::notifyRegister ( WorldCanvasHolder wch)
virtual

Needed to enable or destroy drawlists and colormaps on corresp.

canvas. (Only to be called by the relevant WCH).

Reimplemented from casa::CachingDisplayData.

virtual void casa::MSAsRaster::notifyUnregister ( WorldCanvasHolder wcHolder,
casacore::Bool  ignoreRefresh = false 
)
virtual

ignoreRefresh tells the DD not to refresh just to clean up DMs

Reimplemented from casa::CachingDisplayData.

MSAsRaster& casa::MSAsRaster::operator= ( const MSAsRaster )
inlineprivate

Definition at line 359 of file MSAsRaster.h.

virtual AttributeBuffer casa::MSAsRaster::optionsAsAttributes ( )
virtual

Return the current options of this DisplayData as a 'restrictions' AttributeBuffer (only options that affect the way the image would be drawn are returned).

It is used to determine which (if any) of the cached drawings can be used to satisfy the current draw request.

Reimplemented from casa::ActiveCaching2dDD.

void casa::MSAsRaster::postEditsToDisp_ ( )
private

Assure that the display matrices are up-to-date with the flagging edits list, to provide visual feedback of the edits.

virtual void casa::MSAsRaster::purgeCache ( )
inlinevirtual

Empty cache completely.

Reimplemented from casa::CachingDisplayData.

Definition at line 252 of file MSAsRaster.h.

References itsAxisLabeller, and casa::CachingDisplayData::purgeCache().

Referenced by setUIBase().

virtual void casa::MSAsRaster::purgeCache ( const WorldCanvasHolder wch)
inlinevirtual

Empty cache of all DMs for a given WCH.

Reimplemented from casa::CachingDisplayData.

Definition at line 258 of file MSAsRaster.h.

References itsAxisLabeller, and casa::CachingDisplayData::purgeCache().

static casacore::Float casa::MSAsRaster::real ( const casacore::Complex &  val)
inlinestaticprotected

Helper functions.

Definition at line 332 of file MSAsRaster.h.

void casa::MSAsRaster::resetFreq_ ( )
inlineprivate

Reset casacore::Block of relevant Spectral window IDs, and return correponding Vectors of channel frequencies.

freq_ is used for display of frequencies in position tracking. spwId_ translates spw 'index' into the actual spectral window ID.

Definition at line 469 of file MSAsRaster.h.

References freq_, casacore::Block< T >::nelements(), casacore::Block< T >::resize(), and spwId_.

void casa::MSAsRaster::resetMinMax_ ( )
private

Reset data scaling DParameters to newly-computed data ranges.

void casa::MSAsRaster::reSortVis_ ( )
private

Shuffle vis_ into new baseline order, per user request for sort change.

(Information needed to do this should already have been set up by the previous two routines).

casacore::Bool casa::MSAsRaster::saveEdits_ ( )
private

Save all edits permanently to the MS.

The return value indicates whether there were any edits to save.

void casa::MSAsRaster::selectVS_ ( const viewer::DisplayDataOptions ddo = viewer::DisplayDataOptions())
private

prepare the selection casacore::MS and its VisSet.

virtual casacore::Bool casa::MSAsRaster::setActiveZIndex_ ( casacore::Int  zindex)
inlineprotectedvirtual

This routine is called to inform the DD of the current canvas's animator index.

Used by confromsTo() and related methods. Return value indicates whether the index is within the data's range.

activeZIndex_ and zIndexConformed_ protected on the DD base level; they are intended to be set only by these [protected] setActiveZIndex_() methods, which are in turn called by DD::conformsToZIndex().

Reimplemented from casa::DisplayData.

Definition at line 306 of file MSAsRaster.h.

References casa::DisplayData::activeZIndex_, nelements(), and casa::DisplayData::zIndexConformed_.

void casa::MSAsRaster::setBslSort_ ( )
private

Set the baseline index translation Arrays a1_, a2_ and bsl_ by copying as appropriate according to the current sort.

(Source Arrays should already have been created by computeBaselineSorts_(), above). also sets total number of baselines, nbsl_, which becomes msShape_[BASELN] except in single dish case.

DisplayCoordinateSystem casa::MSAsRaster::setCS_ ( )
private

update/set the (2d–canvas) coordinate system from the current MS selection and display axes.

Referenced by setUIBase().

void casa::MSAsRaster::setDefaultMSAROptions_ ( )
private

set/restore default option values on this level only.

(Not implemented).

virtual void casa::MSAsRaster::setDefaultOptions ( )
virtual

set all options to default values (unused so far; incomplete support in base classes...incomplete here as well).

Reimplemented from casa::ActiveCaching2dDD.

void casa::MSAsRaster::setFlag_ ( casacore::IPosition slot,
casacore::Bool  flag 
)
private
virtual casacore::Bool casa::MSAsRaster::setOptions ( casacore::Record rec,
casacore::Record recOut 
)
virtual

Apply option values stored in rec to the DisplayData.

A return value of true means a refresh is needed. recOut contains any fields which were implicitly changed as a result of the call to this function. Parameters from the 'adjust' gui are sent through here, controlling and triggering many of MSAsRaster's actions. (Other input is via the mouse on the canvas, which affects the object through the event handlers).

Reimplemented from casa::ActiveCaching2dDD.

virtual void casa::MSAsRaster::setUIBase ( casacore::Int  uibase)
inlinevirtual

DD 'Absolute Pixel Coordinates', e.g.

channel numbers, are internally 0-based (they begin numbering at 0), but certain external user-interface methods (e.g. showPosition(), used for position tracking) have produced 1-based output traditionally for the glish-based viewer. uiBase_, and related methods uiBase() and setUIBase(), allow newer (python/Qt-based) code to cause external ui functions like showValue() to report 0-based values instead. Unless setUIBase(0) is called, the traditional 1-based reporting behavior is retained by default. For this DD, in addition to tracking, this setting affects labelling, slider-based position setting, and casacore::MS selection on Field or Sp. Window.

If you are using 0-basing in the user interface, you should call setUIBase(0) right after constructing this DisplayData, before other user interface operations such as getOptions(); the method has not been tested other than for a one-time setUIBase(0) call directly after DD construction.

Reimplemented from casa::DisplayData.

Definition at line 279 of file MSAsRaster.h.

References purgeCache(), setCS_(), casa::DisplayData::setUIBase(), and casa::DisplayData::uiBase().

virtual casacore::String casa::MSAsRaster::showPosition ( const casacore::Vector< casacore::Double > &  world,
const casacore::Bool displayAxesOnly = false 
)
virtual

casacore::Format the position of the cursor.

Also requires previous call to setActiveImage(zindex); also used for position tracking.

Reimplemented from casa::ActiveCaching2dDD.

bool casa::MSAsRaster::showPosition ( viewer::RegionInfo::stats_t stat_list,
const casacore::Vector< casacore::Double > &  world,
const casacore::Bool displayAxesOnly = false 
)
virtual casacore::String casa::MSAsRaster::showValue ( const casacore::Vector< casacore::Double > &  world)
virtual

casacore::Format the data value at the given world position.

Call setActiveImage(zindex) with the desired animator position before calling this routine.

Implements casa::DisplayData.

casacore::Int casa::MSAsRaster::spw_ ( casacore::Int  spwid)
inlineprivate

Translate actual spectral window ID into the 'spw' index (zero-based pixel coordinate) along the spectral window axis.

Because the user can select specific spectral windows, these two may not be the same. Returns -1 if the spectral window ID is not in the selected casacore::MS data.

Definition at line 481 of file MSAsRaster.h.

References casacore::Block< T >::nelements(), and spwId_.

casacore::Bool casa::MSAsRaster::undoEdits_ ( casacore::String  extent = "all",
casacore::Bool  feedback = false 
)
private

Undo unsaved edits.

Return value indicates whether there were any edits to undo. extent=="all" means undo all, else just the last one. If feedback==true, a warning message will be printed about discarded edits.

casacore::Float casa::MSAsRaster::v_ ( casacore::Int  t)
private

Return a single visibility point from vis_ or disp_, as a function of time slot only.

The row of times and mode must be predetermined by setting useVis_, dPos_, axlTm_ and flgdDev_ (below). goodData_ is set true by this routine if the data exists, is loaded and is not flagged (false otherwise).

casacore::Float casa::MSAsRaster::vAlt_ ( casacore::Float  v)
inlineprivate

Phase deviations are calculated both for the original phases (in [-180,180]), and for the phases 180 degrees opposite (also expressed within [-180,180]); the minimum result is displayed.

This is so that phases clustered around +-180 do not show artificially high deviations. (remainder(x,360) (from math.h) is always in [-180,180] – wierd, but usable for this purpose).

Definition at line 563 of file MSAsRaster.h.

VisComp casa::MSAsRaster::visCompNum_ ( const casacore::String visCompName) const
inlineprivate

Definition at line 644 of file MSAsRaster.h.

References ind_(), and visCompName_.

casacore::String casa::MSAsRaster::visMbLabel_ ( )
private

A small routine to return the label for the "Visibility Memory" slider widget.

The label includes feedback on the selected casacore::MS's total size, and is updated when that changes.

VisType casa::MSAsRaster::visTypeNum_ ( const casacore::String visTypeName) const
inlineprivate

Definition at line 640 of file MSAsRaster.h.

References ind_(), and visTypeName_.

virtual casacore::Bool casa::MSAsRaster::zIndexHint ( casacore::Int preferredZIndex) const
virtual

Return the animator position setting preferred if this DD about to be registered on a new DisplayPanel.

Reimplemented from casa::DisplayData.

Friends And Related Function Documentation

friend struct FlagEdit_
friend

Definition at line 1200 of file MSAsRaster.h.

friend class MSAsRasterDM
friend

The (multiple) DMs which this DD creates just hold drawlist handles.

They send the actual drawing chores back to MSAsRaster::draw_(). The friend designation is so that draw_() can be made private.

Definition at line 350 of file MSAsRaster.h.

friend struct MSpos_
friend

Definition at line 985 of file MSAsRaster.h.

Member Data Documentation

casacore::Vector<casacore::Int> casa::MSAsRaster::a1_
private

numbers (symmetric, 0 along diagonal).

Used to order baselines by length on request.

Definition at line 834 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::a1A_
private

Definition at line 834 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::a1L_
private

Definition at line 834 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::a2_
private

Definition at line 834 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::a2A_
private

Definition at line 834 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::a2L_
private

Definition at line 834 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::AMPDIFF
staticprivate

Definition at line 618 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::AMPLITUDE
staticprivate

Definition at line 616 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::AMPRMS
staticprivate

Definition at line 618 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::ant2len_
private

Definition at line 834 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::antSort_
private

axis when baselines are sorted by length (antSort==false).

In that case, msShapeA_[BASELN] is the number of baseline slots that would be required if the antenna sort were used, including 1-element 'gaps' where antenna1 changes. msShape_[BASELN] is the number of actual baselines needed; the gaps are not needed when displaying the sort by baseline length. However, when able to fit into memory, vis_ is sized according to the larger msShapeA_[BASELN] in any case, so that switching between sorts does not require resizing or reloading vis_, but only reshuffling of the baseline planes in memory.

Definition at line 826 of file MSAsRaster.h.

casacore::Vector<casacore::String> casa::MSAsRaster::axisName_
private

--—more constants and statics -------------------------------------—

These should be static const, but there's no way to initialize them. Print strings, corresponding to Axis, VisType and VisComp enums above.

Definition at line 654 of file MSAsRaster.h.

Referenced by axisNum_().

casacore::Vector<casacore::Int> casa::MSAsRaster::axisOn_
private

-—derived from above: what is now requested--------------------—

Definition at line 740 of file MSAsRaster.h.

Referenced by nelements().

AxisLoc casa::MSAsRaster::axlTm_
private

Definition at line 1342 of file MSAsRaster.h.

const Axis casa::MSAsRaster::BASELN
staticprivate
casacore::Matrix<casacore::Double> casa::MSAsRaster::bLen_
private

sorted by antenna1-antenna2.

false means sorting by (unprojected, uvw) baseline length.

Definition at line 830 of file MSAsRaster.h.

casacore::Matrix<casacore::Int> casa::MSAsRaster::bsl_
private

Definition at line 838 of file MSAsRaster.h.

casacore::Matrix<casacore::Int> casa::MSAsRaster::bslA_
private

Definition at line 838 of file MSAsRaster.h.

casacore::Matrix<casacore::Int> casa::MSAsRaster::bslL_
private

Definition at line 838 of file MSAsRaster.h.

const Axis casa::MSAsRaster::CHAN
staticprivate
casacore::Matrix<casacore::Double> casa::MSAsRaster::chanFreq_
private

Definition at line 788 of file MSAsRaster.h.

const VisType casa::MSAsRaster::CORRECTED
staticprivate

Definition at line 610 of file MSAsRaster.h.

VisComp casa::MSAsRaster::curVisComp_
private

Definition at line 922 of file MSAsRaster.h.

VisType casa::MSAsRaster::curVisType_
private

BASELN axis, and then only when computeVisShape_() determines that the entire msShapeA_[BASELN] will fit into memory, and the length sort is also in effect.

In that case, visShapeA_[BASELN] == msShapeA_[BASELN] and visShape_[BASELN] == msShape_[BASELN] (which is msShapeA_[BASELN] - (nAnt_-1)). vis_ is actually sized according to visShapeA_.

Definition at line 921 of file MSAsRaster.h.

casacore::Float casa::MSAsRaster::d_
private

Definition at line 1365 of file MSAsRaster.h.

casacore::Float casa::MSAsRaster::dataRngMax_
private

Definition at line 924 of file MSAsRaster.h.

casacore::Float casa::MSAsRaster::dataRngMin_
private

Definition at line 924 of file MSAsRaster.h.

casacore::Float casa::MSAsRaster::devRngMax_
private

Definition at line 929 of file MSAsRaster.h.

casacore::Float casa::MSAsRaster::devRngMin_
private

Used (only) for scaling data values to colors; they are too expensive to compute except during extract_().

Not the actual min/max of the data in general, since they may be sampled and/or clipped to 3-sigma limits.

Definition at line 929 of file MSAsRaster.h.

const VisDev casa::MSAsRaster::DIFF
staticprivate

Definition at line 626 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::dish_
private

Definition at line 789 of file MSAsRaster.h.

casacore::Matrix<casacore::Float> casa::MSAsRaster::disp_
private

visibility deviations are being displayed.

Both types of ranges are kept, in case the user switches from one type ot display to the other. devRngMin_ is set to NO_DATA if these haven't been computed yet. computeDevRange_() is called from extract_ or setOptions to compute these when needed.

The display matrices which are drawn on the canvas.

Definition at line 940 of file MSAsRaster.h.

casacore::Matrix<casacore::Float> casa::MSAsRaster::dispDev_
private

NOT_LOADED value?

Definition at line 952 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::dispDevNAvg_
private

represents.

Definition at line 958 of file MSAsRaster.h.

VisDev casa::MSAsRaster::dispDevType_
private

(if necessary) the state of flag edits?

Definition at line 956 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::dispDevValid_
private

data displays.

(Filled by createDevSlice_()).

Definition at line 954 of file MSAsRaster.h.

casacore::Matrix<casacore::Float> casa::MSAsRaster::dispFlags_
private

good data from flagged/missing data.

Which is true and which false depends on flagsInClr_.

Definition at line 1187 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::dispFlagsInClr_
private

will overlay the main data array to show flags in color.

Definition at line 1190 of file MSAsRaster.h.

casacore::Matrix<casacore::Bool> casa::MSAsRaster::dispMask_
private

from the casacore::MS (only); not for new, unsaved flags.

Virtually, this has the same shape as vis_.

Definition at line 1184 of file MSAsRaster.h.

casacore::uInt casa::MSAsRaster::dispNEdits_
private

draw flags in color?

Definition at line 1192 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::dispNotLoaded_
private

called?

Definition at line 949 of file MSAsRaster.h.

casacore::Block<casacore::Int> casa::MSAsRaster::dispPos_
private

Definition at line 943 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::dispValid_
private

represents, by Axis.

Settings for display axes, (i.e. dispPos_[dispX_] and dispPos_[dispY_]), are irrelevant).

Definition at line 947 of file MSAsRaster.h.

Axis casa::MSAsRaster::dispX_
private

display canvas.

Definition at line 942 of file MSAsRaster.h.

Axis casa::MSAsRaster::dispY_
private

Definition at line 942 of file MSAsRaster.h.

casacore::IPosition casa::MSAsRaster::dPos_
private

Definition at line 1341 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::entireAnt_
private

choice box for applying edits to entire antenna.

Definition at line 1168 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::eT_
private

Definition at line 1362 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::field_
private

only first msShape_TIME) are valid.

Definition at line 856 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::fieldIds_
private

Definition at line 766 of file MSAsRaster.h.

casacore::Vector<casacore::String> casa::MSAsRaster::fieldName_
private

Definition at line 862 of file MSAsRaster.h.

casacore::Block<casacore::Bool> casa::MSAsRaster::flagAll_
private

Definition at line 1163 of file MSAsRaster.h.

Colormap casa::MSAsRaster::flagCM_
private

A private internal colormap for showing colors for various conditions (flagged, no data, data not loaded).

This is not the colormap set by the user for mapping data values. It has rigid single colors for the different conditions.

Definition at line 1391 of file MSAsRaster.h.

std::list<void*> casa::MSAsRaster::flagEdits_
private

Definition at line 1321 of file MSAsRaster.h.

casacore::Vector<casacore::uInt> casa::MSAsRaster::flags_
private

defines the button for saving all edits.

Definition at line 1180 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::flagsInClr_
private

Definition at line 1158 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::flgdDev_
private

Definition at line 1343 of file MSAsRaster.h.

casacore::Block<void*> casa::MSAsRaster::freq_
private

The user can select the spectral windows to view.

This casacore::Block holds the (sorted) spectral windows actually found in the selected casacore::MS–usually it will be identical to the user selection (spwIds_, above). Its length is the size of the Spectral Window axis (msShape_[SP_W]). Note that throughout the code, the variable 'spw' refers to the index into this block, not the Spectral window ID itself. Actual IDs will have 'Id' in the variable name.

Definition at line 875 of file MSAsRaster.h.

Referenced by resetFreq_().

casacore::Bool casa::MSAsRaster::goodData_
private

Initializing input to dev_(t) and its subsidiary routine v_(t).

These create something similar to an casacore::ArrayAccessor, in that vis_ (or disp_, depending on useVis_) can be accessed by giving only the value along the time axis. dPos_ fixes the row of times to use within vis_ or disp_; axlTm_ gives the location of the time axis within dPos_. The value of the index along that axis (only) will be varied as needed, by dev_() and v_().

flgdDev_ should usually be set false, causing dev_ simply to return INSUF_DATA for flagged points. In one obscure case, it is set true to request dev_ to calculate deviations even for the flagged points.

Definition at line 1357 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::IMAGINARY
staticprivate

Definition at line 616 of file MSAsRaster.h.

const casacore::Float casa::MSAsRaster::INSUF_DATA
staticprivate

Very similar, but used only in the disp_ array, for data which is not loaded into memory (vis_) at present.

Definition at line 666 of file MSAsRaster.h.

const casacore::Int casa::MSAsRaster::INVALID
staticprivate

=================== casacore::Data ======================= (mostly) ========

---—Main enums (and their conversions to strings)----------------—

(or, rather, they used to be enums, until the compiler started whining and moaning about their use as Ints, casacore::Vector/casacore::Array/Block indices, etc. (Strong typing: grrr...)

Definition at line 597 of file MSAsRaster.h.

Referenced by casa::MSAsRaster::MSpos_::b(), casa::MSAsRaster::MSpos_::operator[](), and casa::MSAsRaster::MSpos_::p0().

const Axis casa::MSAsRaster::INVALID_AXIS
staticprivate

Definition at line 601 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::INVALID_VC
staticprivate

GUI choice box (itsVisComp).

itsVisComp is split into visComp_ (which must be one of the first four values above) and visDev_. (see visDev_ below, and also setOptions()).

Definition at line 623 of file MSAsRaster.h.

const VisDev casa::MSAsRaster::INVALID_VD
staticprivate

Definition at line 626 of file MSAsRaster.h.

const VisType casa::MSAsRaster::INVALID_VT
staticprivate

Definition at line 613 of file MSAsRaster.h.

WorldAxesDD casa::MSAsRaster::itsAxisLabeller
private

This labels the axes.

An actual CachingDisplayData itself, contained within MSAsRaster and controlled through it. MSAsRaster propagates getOptions and setOptions calls and draw commands to it, and sets the WC DisplayCoordinateSystem which it uses.

Definition at line 1385 of file MSAsRaster.h.

Referenced by purgeCache().

DParameterChoice* casa::MSAsRaster::itsAxisLabelling
private

Axis Labelling? (Yes/No).

Definition at line 719 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsBslnSort
private

Baseline sort (antenna1-antenna2 vs.

baseline length).

Definition at line 712 of file MSAsRaster.h.

DParameterRange<casacore::Float>* casa::MSAsRaster::itsDataMax
private

Definition at line 716 of file MSAsRaster.h.

DParameterRange<casacore::Float>* casa::MSAsRaster::itsDataMin
private

Sent to scale handler for scaling data to color within these limits.

Definition at line 715 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsEditEntireMS
private

defines the button for undoing all edits.

Definition at line 1174 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsEntireAnt
private

no checkbox-type DParameter yet).

Definition at line 1166 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsFlagColor
private

position being viewed as much as possible when casacore::MS selection is changed–e.g., to remain on the same time (if it is still in the selected casacore::MS), even though its time-slot index (slice position) may have changed.

-—flagging state----------------------------------------------------—

Definition at line 1157 of file MSAsRaster.h.

casacore::MeasurementSet* casa::MSAsRaster::itsMS
private

-—current state of main internal data: what is already computed-—

(These are set (successively) in initMSAR_, selectVS_, findRanges_, extract_, createDisplaySlice_, and createDevSlice_).

The original, unselected MS

Definition at line 778 of file MSAsRaster.h.

DParameterRange<casacore::Int>* casa::MSAsRaster::itsNAvg
private

how many values to use (ideally) in moving averages.

Definition at line 735 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsParamSpectralUnit
private

Units of display for Channels.

Definition at line 721 of file MSAsRaster.h.

WCPowerScaleHandler casa::MSAsRaster::itsPowerScaleHandler
private

Saved state from the last call to dev_().

When moving along a time axis, it sometimes saves time to have these previous results handy. d_ is the most recently computed deviation. sT_ (boxcar start time slot) must be set to -1 when starting to compute deviations on a new line of times, indicating that none of this 'saved state' is valid yet.

-------—helper objects and their control data--------—

This does data scaling for WorldCanvas

Definition at line 1379 of file MSAsRaster.h.

DParameterButton* casa::MSAsRaster::itsSaveEdits
private

choice box for using entire casacore::MS (vs.

selected casacore::MS only) when saving edits.

Definition at line 1177 of file MSAsRaster.h.

DParameterRange<casacore::Int>* casa::MSAsRaster::itsSL0Pos
private

Which slice to display, for the other two axes.

The label of the sliders (and the axes they control) vary. They control the slice position of the axes not selected above. Animator position is determined externally by WCH restriction 'zIndex'.

Definition at line 708 of file MSAsRaster.h.

DParameterRange<casacore::Int>* casa::MSAsRaster::itsSL1Pos
private

Definition at line 709 of file MSAsRaster.h.

DParameterButton* casa::MSAsRaster::itsUndoAll
private

defines the button for undoing one edit.

Definition at line 1172 of file MSAsRaster.h.

DParameterButton* casa::MSAsRaster::itsUndoOne
private

Definition at line 1170 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsUnflag
private

Definition at line 1160 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsVisComp
private

Which real visibiliy component to display: Real, Imag, Amp, Phase.

Definition at line 732 of file MSAsRaster.h.

DParameterRange<casacore::Int>* casa::MSAsRaster::itsVisMb
private

User option DisplayParameters specific to MSAsRaster.

Maximum memory to use for vis_ buffer.

Definition at line 696 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsVisType
private

changes to these options require data extraction:

Observed, Corrected, Model, etc.

Definition at line 729 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsXAxis
private

Which axes will be on X, Y, Animator.

Chosen from time, baseline, channel, polarization and spectral window.

Definition at line 700 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsYAxis
private

Definition at line 701 of file MSAsRaster.h.

DParameterChoice* casa::MSAsRaster::itsZAxis
private

Definition at line 702 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::len2ant_
private

Definition at line 834 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::leTime_
private

Definition at line 1330 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::levTime_
private

Definition at line 1330 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::lsTime_
private

(<void*> rather than <FlagEdit_*> just to avoid the extra templates)

—state for computing [RMS] deviation from local visibility average— (Not very object-oriented–more like Fortran common. Sorry, pressed for time. To be reworked into object(s) sometime, if it can be done efficiently).

Definition at line 1330 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::lsvTime_
private

Definition at line 1330 of file MSAsRaster.h.

const VisType casa::MSAsRaster::MODEL
staticprivate

Definition at line 611 of file MSAsRaster.h.

casacore::ROMSColumns* casa::MSAsRaster::msCols_
private

(should be set true (permanently) during construction, or this object will be useless, and do nothing).

Definition at line 784 of file MSAsRaster.h.

casacore::String casa::MSAsRaster::msName_
private

--—primary user input data----------------------------------------—

Passed in through constructors and setOpts parameters.

Definition at line 690 of file MSAsRaster.h.

Referenced by name().

MSpos_ casa::MSAsRaster::mspos_
private

Definition at line 1147 of file MSAsRaster.h.

casacore::MS* casa::MSAsRaster::mssel_
private

which will then be used instead of the DATA column).

The selected MS.

Definition at line 795 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::msselValid_
private

Definition at line 797 of file MSAsRaster.h.

casacore::Block<casacore::Int> casa::MSAsRaster::msShape_
private

of the set of antennas appearing in mssel_ main data rows.

NB: nAnt_==1 is tested, rather than dish_ (which should be equivalent), to determine whether feeds are displayed instead of baselines.

Definition at line 807 of file MSAsRaster.h.

Referenced by casa::MSAsRaster::FlagEdit_::getLoopRange(), and nelements().

casacore::Block<casacore::Int> casa::MSAsRaster::msShapeA_
private

= {nTime, nBsln, nChan, nPol, nSpw}.

msShape_[BASELN] reflects the size requirement for the baseline sort in use (see antSort_, below).

Definition at line 811 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::msValid_
private

Definition at line 780 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::nAnt_
private

not draw until this is set true (in selectVS_).

Definition at line 800 of file MSAsRaster.h.

Referenced by a1mult_(), and bsln_().

const Axis casa::MSAsRaster::NAXES
staticprivate

Definition at line 601 of file MSAsRaster.h.

Referenced by casa::MSAsRaster::FlagEdit_::appliesTo().

casacore::Int casa::MSAsRaster::nbsl_
private

Definition at line 840 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::nbslA_
private

Definition at line 840 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::nbslL_
private

Definition at line 840 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::nChan_
private

Definition at line 787 of file MSAsRaster.h.

const casacore::Int casa::MSAsRaster::NCOLORS
staticprivate

Definition at line 684 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::NCOMPNAMES
staticprivate

Definition at line 619 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::NCOMPS
staticprivate

Definition at line 617 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::nDAvg_
private

visComp_ and visDev_.

visComp_ is only AMP, PHASE, REAL or IMAGINARY (above is what is stored in large vis_ casacore::Array) and visDev_ tells whether to display the straight vis component (NORMAL), a difference from a running average (DIFF) or a running RMS (RMS).

Definition at line 763 of file MSAsRaster.h.

const casacore::Float casa::MSAsRaster::NEWFLAG
staticprivate

Definition at line 680 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::nFieldIds_
private

Definition at line 785 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::NLOCS
staticprivate

Definition at line 606 of file MSAsRaster.h.

const casacore::Float casa::MSAsRaster::NO_DATA
staticprivate

Definition at line 658 of file MSAsRaster.h.

const casacore::Float casa::MSAsRaster::NODATA
staticprivate

Definition at line 680 of file MSAsRaster.h.

const VisDev casa::MSAsRaster::NORMAL
staticprivate

Definition at line 626 of file MSAsRaster.h.

const casacore::Float casa::MSAsRaster::NOT_LOADED
staticprivate

to stand for 'no data in the selected casacore::MS at this position in the visibility cube'.

vis_ is initialized to this value before data is extracted into it from the selected MS. After extract_, elements left with this value will be masked out during display.

Definition at line 663 of file MSAsRaster.h.

const casacore::Float casa::MSAsRaster::NOTLOADED
staticprivate

Also similar.

Returned by dev_() when there are less than 2 values in the local neighborhood from which to compute a meaningful deviation, or if the data is flagged.

NB: The values above are large negative numbers which will not correspond to legitimate data values in the data arrays where they appear. The dispFlags_ overlay matrix uses different values (NODATA, NOTLOAED, below) to indicate these same two conditions–small enum-like sequential integers which can be mapped to definite colors easily.

dispFlags_ and the flagCM_ custom colormap use the following coding:

Definition at line 680 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::nPAvg_
private

Definition at line 764 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::nPolIds_
private

(*freq_[spw])[chan] holds the CHAN_FREQ for the given spw index and channel (in Hz).

The following translate pol ID and the polarization index within a cell of data in the casacore::MS, to the 'pol' index within the internal visibility cube. There is no 'polID axis' separate from the pol axis internally or for the display; it is flattened to a single pol axis, using these tables. They are set up in findRanges_.

Definition at line 884 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::nPolsIn_
private

(and the size of the next two vectors).

Definition at line 886 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::nSpwIds_
private

Definition at line 786 of file MSAsRaster.h.

const VisType casa::MSAsRaster::NTYPES
staticprivate

Definition at line 613 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::nValid_
private

Definition at line 1364 of file MSAsRaster.h.

const VisType casa::MSAsRaster::OBSERVED
staticprivate

Definition at line 609 of file MSAsRaster.h.

const casacore::Float casa::MSAsRaster::OLDFLAG
staticprivate

Definition at line 680 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::PHASE
staticprivate

Definition at line 616 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::PHDIFF
staticprivate

Definition at line 618 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::PHRMS
staticprivate

Definition at line 618 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::pidBase_
private

Definition at line 887 of file MSAsRaster.h.

Referenced by casa::MSAsRaster::MSpos_::p0().

const Axis casa::MSAsRaster::POL
staticprivate
casacore::Vector<casacore::Int> casa::MSAsRaster::polId_
private

within msShape_[POL] and its index within the casacore::MS table's visibility data cell, for given polId (or -1, if the polID is not in the selected data).

The following 2 vectors will have sizes = msShape_[POL], and are indexed according to the internal polarization 'data pixel number' (generally referred to as 'pol').

Definition at line 895 of file MSAsRaster.h.

casacore::Vector<casacore::String> casa::MSAsRaster::polName_
private

Definition at line 896 of file MSAsRaster.h.

casacore::Block<casacore::Int> casa::MSAsRaster::pos_
private

permutation of (TIME, BASELN, CHAN, POL, SP_W), corresponding to the axis to display or control on X, Y, Z, SL0, and SL1, in that order.

Definition at line 744 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::postDataRng_
private

do not reflect current state of vis_.

Set by setOptions. Indicates to extract_ that it should completely recalculate data ranges (and set the actual dataMin/Max_ sent to the scale handler accordingly). setOptions also uses it to help determine whether it should call extract_.

Definition at line 976 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::REAL
staticprivate

Definition at line 616 of file MSAsRaster.h.

const VisType casa::MSAsRaster::RESIDUAL
staticprivate

Definition at line 612 of file MSAsRaster.h.

const VisDev casa::MSAsRaster::RMS
staticprivate

Definition at line 626 of file MSAsRaster.h.

casacore::Vector<casacore::Int> casa::MSAsRaster::scan_
private

indexed as time_ is, above.

For now, field id is assumed to be unique for a given time. Used to avoid computing running averages across field boundaries.

Definition at line 861 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::SL0
staticprivate

Definition at line 606 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::SL1
staticprivate

Definition at line 606 of file MSAsRaster.h.

const Axis casa::MSAsRaster::SP_W
staticprivate
casacore::Block<casacore::Int> casa::MSAsRaster::spwId_
private

Definition at line 864 of file MSAsRaster.h.

Referenced by resetFreq_(), and spw_().

casacore::Vector<casacore::Int> casa::MSAsRaster::spwIds_
private

Definition at line 767 of file MSAsRaster.h.

casacore::Int casa::MSAsRaster::sT_
private

This really should be a return value from v_(); placed here for 'efficiency'.

Set after each call to v_(): true iff the data existed, was loaded, and was not flagged.

Definition at line 1362 of file MSAsRaster.h.

casacore::Double casa::MSAsRaster::sumv2_
private

Definition at line 1363 of file MSAsRaster.h.

casacore::Double casa::MSAsRaster::sumv2a_
private

Definition at line 1363 of file MSAsRaster.h.

casacore::Double casa::MSAsRaster::sumv_
private

Definition at line 1363 of file MSAsRaster.h.

casacore::Double casa::MSAsRaster::sumva_
private

Definition at line 1363 of file MSAsRaster.h.

const Axis casa::MSAsRaster::TIME
staticprivate

The visibility hypercube (vis_) has 5 axes, in this order.

Definition at line 600 of file MSAsRaster.h.

Referenced by casa::MSAsRaster::MSpos_::operator[](), and casa::MSAsRaster::MSpos_::set().

casacore::Vector<casacore::Double> casa::MSAsRaster::time_
private

The A and L versions are for antenna and length sorts, respectively; they are copied into a1_, a2_, and bsl_ in accordance with the current sort.

len2ant_ and ant2len_ provide conversion between baseline indices for the two sorts. nbsl* give the number of baselines for the applicable case (if sgl dish, they will be 1, but irrelevant; msShape_[BASELN] will be set to number of feeds instead).

Definition at line 853 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::unflag_
private

Definition at line 1161 of file MSAsRaster.h.

casacore::Bool casa::MSAsRaster::useVis_
private

Beginning and (1 beyond) ending time index defining the 'boxcar' or local neighborhood over which averages are computed, for given time slot.

(Note that, for now, these are assumed to be only a function of time. Later, these may become Matrices, indexed also by casacore::Array ID or baseline). Recomputed (computeTimeBoxcars_) when nAvg_ changes, and after extract_. lsv, lev versions are for vis_, i.e relative to visStart_[TIME], and of length visShape_[TIME].

Definition at line 1340 of file MSAsRaster.h.

casacore::Array<casacore::Float> casa::MSAsRaster::vis_
private

The visibility hypercube.

Definition at line 901 of file MSAsRaster.h.

VisComp casa::MSAsRaster::visComp_
private

Definition at line 753 of file MSAsRaster.h.

casacore::Vector<casacore::String> casa::MSAsRaster::visCompName_
private

Definition at line 656 of file MSAsRaster.h.

Referenced by visCompNum_().

casacore::Bool casa::MSAsRaster::visDataChg_
private

in effect when dispDev_ was last computed.

------------—additional control state-------------------------------— ...for communication of control logic between various methods (mainly setOptions, draw_ and extract_)

Definition at line 968 of file MSAsRaster.h.

VisDev casa::MSAsRaster::visDev_
private

Definition at line 754 of file MSAsRaster.h.

casacore::Block<casacore::Int> casa::MSAsRaster::visShape_
private

Definition at line 908 of file MSAsRaster.h.

casacore::Block<casacore::Int> casa::MSAsRaster::visShapeA_
private

Definition at line 911 of file MSAsRaster.h.

casacore::Block<casacore::Int> casa::MSAsRaster::visStart_
private

Definition at line 909 of file MSAsRaster.h.

VisType casa::MSAsRaster::visType_
private

Zero-based (although the user sees 1-based values).

pos_ is indexed by Axis (TIME, BASELN, etc). For axes being displayed, the position is not immediately relevant, but serves as a memory of the last setting and is restored to a slice control whenever the axis moves off the display. Corresponds somewhat to itsFixedPosition in PrincipalAxesDD.

Definition at line 752 of file MSAsRaster.h.

casacore::Vector<casacore::String> casa::MSAsRaster::visTypeName_
private

Definition at line 655 of file MSAsRaster.h.

Referenced by visTypeNum_().

casacore::Bool casa::MSAsRaster::visValid_
private

gridded casacore::MS visibilities (for t, bsl, chan, pol, spw, in that order).

Conceptually, this is a (contiguous, hyper-rectangular) 'window' or 'cursor' into the whole gridded ms as characterized by msShape_ above. It will be the whole thing, if it fits into memory; in any case, the two display axes will be full size.

Definition at line 907 of file MSAsRaster.h.

VisibilityIterator* casa::MSAsRaster::vs_
private

Definition at line 779 of file MSAsRaster.h.

VisibilityIterator* casa::MSAsRaster::wvi_p
private

Definition at line 796 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::X
staticprivate

Definition at line 606 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::Y
staticprivate

Definition at line 606 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::Z
staticprivate

Definition at line 606 of file MSAsRaster.h.

Referenced by nelements().


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