casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | 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
casa::MSAsRaster Class Reference

Class for displaying data within an 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

List of all members.

Classes

struct  FlagEdit_
struct  MSpos_

Public Member Functions

 MSAsRaster (const String msname, const viewer::DisplayDataOptions &ddo)
 constructor from the filename of an MS
virtual ~MSAsRaster ()
 Destructor.
virtual Bool setOptions (Record &rec, Record &recOut)
 Apply option values stored in rec to the DisplayData.
virtual Record getOptions ()
 Retrieve the current options.
virtual void setDefaultOptions ()
 set all options to default values (unused so far; incomplete support in base classes...incomplete here as well).
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).
virtual Bool conformsToCS (const WorldCanvas &wc)
 Determine whether DD is compatible with the WC[H]'s current world coordinates.
virtual String showValue (const Vector< Double > &world)
 Format the data value at the given world position.
virtual String showPosition (const Vector< Double > &world, const Bool &displayAxesOnly=False)
 Format the position of the cursor.
bool showPosition (viewer::RegionInfo::stats_t &stat_list, const Vector< Double > &world, const Bool &displayAxesOnly=False)
virtual const Unit dataUnit () const
 get the Unit for displayed data values (visibilities)
const IPosition dataShape () const
const uInt dataDim () const
std::vector< int > displayAxes () const
virtual Display::DisplayDataType classType ()
 Return the type of this DisplayData.
String dataType () const
 Pure virtual function from DisplayData...
virtual const uInt nelements () const
 return the size of the animation axis.
virtual const uInt nelements (const WorldCanvasHolder &) const
 Return the number of display elements (ie.
virtual Bool labelAxes (const WCRefreshEvent &ev)
 Handle axis labelling.
virtual void notifyRegister (WorldCanvasHolder *wch)
 Needed to enable or destroy drawlists and colormaps on corresp.
virtual void notifyUnregister (WorldCanvasHolder &wch, Bool ignoreRefresh=False)
 ignoreRefresh tells the DD not to refresh just to clean up DMs
virtual void handleEvent (DisplayEvent &ev)
 handle flagging region selection events, via new-style (1/02) interface.
virtual Bool zIndexHint (Int &preferredZIndex) const
 Return the animator position setting preferred if this DD about to be registered on a new DisplayPanel.
virtual void purgeCache ()
 Empty cache completely.
virtual void purgeCache (const WorldCanvasHolder &wch)
 Empty cache of all DMs for a given WCH.
virtual void setUIBase (Int uibase)
 DD 'Absolute Pixel Coordinates', e.g.
virtual const Stringname () const
 In case it helps; the method should probably be called only before we've had a chance to cache anything though....
bool flag (WorldCanvas *wc, double blc_x, double blc_y, double trc_x, double trc_y)
 added to allow flagging control from mouse tools...

Protected Member Functions

virtual Bool setActiveZIndex_ (Int zindex)
 This routine is called to inform the DD of the current canvas's animator index.
void constructParameters_ ()
 Construct and destroy the user option DisplayParameters.
void deleteParameters_ ()
virtual CachingDisplayMethodnewDisplayMethod (WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd)
 return a new MSAsRasterDM for the given WorldCanvas.

Static Protected Member Functions

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

Private Types

typedef Int Axis
 The visibility hypercube (vis_) has 5 axes, in this order.
typedef 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)
typedef Int VisType
typedef Int VisComp
typedef Int VisDev

Private Member Functions

String avgPos (const String &dim, int v)
 
   

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

Static Private Member Functions

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

Private Attributes

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

Static Private Attributes

static const Int INVALID
 =================== Data ======================= (mostly) ========
static const Axis TIME
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).
static const VisDev NORMAL
static const VisDev DIFF
static const VisDev RMS
static const VisDev INVALID_VD
static const Float NO_DATA
static const Float NOT_LOADED
 to stand for 'no data in the selected MS at this position in the visibility cube'.
static const Float INSUF_DATA
 Very similar, but used only in the disp_ array, for data which is not loaded into memory (vis_) at present.
static const Float NOTLOADED
 Also similar.
static const Float NODATA
static const Float OLDFLAG
static const Float NEWFLAG
static const Int NCOLORS

Friends

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

Detailed Description

Class for displaying data within an 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 MS, and a hypercube of visibility data, which is extracted from the 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. 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

typedef Int casa::MSAsRaster::Axis [private]

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

Definition at line 562 of file MSAsRaster.h.

typedef Int casa::MSAsRaster::AxisLoc [private]

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 568 of file MSAsRaster.h.

typedef Int casa::MSAsRaster::VisComp [private]

Definition at line 578 of file MSAsRaster.h.

typedef Int casa::MSAsRaster::VisDev [private]

Definition at line 588 of file MSAsRaster.h.

typedef Int casa::MSAsRaster::VisType [private]

Definition at line 571 of file MSAsRaster.h.


Constructor & Destructor Documentation

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

constructor from the filename of an MS

virtual casa::MSAsRaster::~MSAsRaster ( ) [virtual]

Destructor.

casa::MSAsRaster::MSAsRaster ( ) [inline, private]

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 331 of file MSAsRaster.h.

casa::MSAsRaster::MSAsRaster ( const MSAsRaster other) [inline, private]

Definition at line 332 of file MSAsRaster.h.


Member Function Documentation

void casa::MSAsRaster::a1a2_ ( Double a1,
Double a2,
Double  bsl,
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 Double return value returns a1 + a2/a1mult_() (for labelling -- example: for baseline index corresp. to 13-24, returns 13.024).

Double casa::MSAsRaster::a1a2_ ( Double  bsl,
Int  abase = 0 
) [private]
Double casa::MSAsRaster::a1mult_ ( ) [inline, private]

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 423 of file MSAsRaster.h.

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

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

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

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

   

Constructs position information for non-deviation display state averaging...

Axis casa::MSAsRaster::axisNum_ ( const String axisName) const [inline, private]

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

Definition at line 598 of file MSAsRaster.h.

References axisName_, and ind_().

Int casa::MSAsRaster::bsln_ ( Int  a1,
Int  a2 
) const [inline, private]

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

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

Definition at line 407 of file MSAsRaster.h.

References nAnt_.

Return the type of this DisplayData.

Implements casa::DisplayData.

Definition at line 203 of file MSAsRaster.h.

References casa::Display::Raster.

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

Calculate deviations throughout range of vis_.

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

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

void casa::MSAsRaster::computeVisShape_ ( Block< Int > &  visShp,
Block< 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 Bool casa::MSAsRaster::conformsToCS ( const WorldCanvas wc) [inline, virtual]

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 179 of file MSAsRaster.h.

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

Construct and destroy the user option DisplayParameters.

To be used by constructors/destructor only.

Create dispDev_ Matrix for displaying deviations.

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

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

const uInt casa::MSAsRaster::dataDim ( ) const [inline, virtual]

Implements casa::DisplayData.

Definition at line 198 of file MSAsRaster.h.

const IPosition casa::MSAsRaster::dataShape ( ) const [inline, virtual]

Implements casa::DisplayData.

Definition at line 197 of file MSAsRaster.h.

String casa::MSAsRaster::dataType ( ) const [inline, virtual]

Pure virtual function from DisplayData...

Implements casa::DisplayData.

Definition at line 206 of file MSAsRaster.h.

virtual const Unit casa::MSAsRaster::dataUnit ( ) const [virtual]

get the Unit for displayed data values (visibilities)

Implements casa::DisplayData.

Float casa::MSAsRaster::dev_ ( 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 [inline, virtual]

Implements casa::DisplayData.

Definition at line 199 of file MSAsRaster.h.

Actually do the drawing.

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

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

void casa::MSAsRaster::extract_ ( ) [private]

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

void casa::MSAsRaster::findRanges_ ( ) [private]

find the ranges of the 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>

Bool casa::MSAsRaster::flag_ ( IPosition slot) [private]

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

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

virtual Record casa::MSAsRaster::getOptions ( ) [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 Float casa::MSAsRaster::imag ( const Complex &  val) [inline, static, protected]

Definition at line 310 of file MSAsRaster.h.

static Int casa::MSAsRaster::ind_ ( const String name,
const Vector< String > &  names 
) [inline, static, private]

Generic string-to-index converter...

Definition at line 592 of file MSAsRaster.h.

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

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

Initialization common to all useful constructors.

virtual Bool casa::MSAsRaster::labelAxes ( const WCRefreshEvent ev) [virtual]

Handle axis labelling.

Reimplemented from casa::DisplayData.

Int casa::MSAsRaster::maxframes_ ( const Block< Int > &  frames,
Int strtfrm,
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 String& casa::MSAsRaster::name ( ) const [inline, virtual]

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

Definition at line 273 of file MSAsRaster.h.

References msName_.

Referenced by ind_().

virtual const uInt casa::MSAsRaster::nelements ( ) const [inline, virtual]

return the size of the animation axis.

Reimplemented from casa::ActiveCaching2dDD.

Definition at line 211 of file MSAsRaster.h.

References axisOn_, msShape_, and Z.

Referenced by setActiveZIndex_().

virtual const uInt casa::MSAsRaster::nelements ( const WorldCanvasHolder ) const [inline, virtual]

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 213 of file MSAsRaster.h.

References axisOn_, msShape_, and Z.

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

return a new MSAsRasterDM for the given WorldCanvas.

Implements casa::CachingDisplayData.

Int casa::MSAsRaster::nframes_ ( const Block< Int > &  frames,
Int  strtfrm,
Int  nfrms,
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,
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 ) [inline, private]

Definition at line 333 of file MSAsRaster.h.

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.

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 ( ) [inline, virtual]

Empty cache completely.

Reimplemented from casa::CachingDisplayData.

Definition at line 237 of file MSAsRaster.h.

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

Referenced by purgeCache(), and setUIBase().

virtual void casa::MSAsRaster::purgeCache ( const WorldCanvasHolder wch) [inline, virtual]

Empty cache of all DMs for a given WCH.

Reimplemented from casa::CachingDisplayData.

Definition at line 242 of file MSAsRaster.h.

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

static Float casa::MSAsRaster::real ( const Complex &  val) [inline, static, protected]

Helper functions.

Definition at line 308 of file MSAsRaster.h.

void casa::MSAsRaster::resetFreq_ ( ) [inline, private]

Reset 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 439 of file MSAsRaster.h.

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

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).

Save all edits permanently to the MS.

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

prepare the selection MS and its VisSet.

virtual Bool casa::MSAsRaster::setActiveZIndex_ ( Int  zindex) [inline, protected, virtual]

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 283 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.

void casa::MSAsRaster::setCS_ ( ) [private]

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

Referenced by setUIBase().

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_ ( IPosition slot,
Bool  flag 
) [private]
virtual Bool casa::MSAsRaster::setOptions ( Record rec,
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 ( Int  uibase) [inline, virtual]

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 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 262 of file MSAsRaster.h.

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

virtual String casa::MSAsRaster::showPosition ( const Vector< Double > &  world,
const Bool displayAxesOnly = False 
) [virtual]

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 Vector< Double > &  world,
const Bool displayAxesOnly = False 
)
virtual String casa::MSAsRaster::showValue ( const Vector< Double > &  world) [virtual]

Format the data value at the given world position.

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

Implements casa::DisplayData.

Int casa::MSAsRaster::spw_ ( Int  spwid) [inline, private]

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 MS data.

Definition at line 449 of file MSAsRaster.h.

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

Bool casa::MSAsRaster::undoEdits_ ( String  extent = "all",
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.

Float casa::MSAsRaster::v_ ( 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).

Float casa::MSAsRaster::vAlt_ ( Float  v) [inline, private]

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 527 of file MSAsRaster.h.

VisComp casa::MSAsRaster::visCompNum_ ( const String visCompName) const [inline, private]

Definition at line 604 of file MSAsRaster.h.

References ind_(), and visCompName_.

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

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

VisType casa::MSAsRaster::visTypeNum_ ( const String visTypeName) const [inline, private]

Definition at line 601 of file MSAsRaster.h.

References ind_(), and visTypeName_.

virtual Bool casa::MSAsRaster::zIndexHint ( 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 1102 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 324 of file MSAsRaster.h.

friend struct MSpos_ [friend]

Definition at line 941 of file MSAsRaster.h.


Member Data Documentation

numbers (symmetric, 0 along diagonal).

Used to order baselines by length on request.

Definition at line 790 of file MSAsRaster.h.

Definition at line 790 of file MSAsRaster.h.

Definition at line 790 of file MSAsRaster.h.

Definition at line 790 of file MSAsRaster.h.

Definition at line 790 of file MSAsRaster.h.

Definition at line 790 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::AMPDIFF [static, private]

Definition at line 581 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::AMPLITUDE [static, private]

Definition at line 579 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::AMPRMS [static, private]

Definition at line 581 of file MSAsRaster.h.

Definition at line 790 of file MSAsRaster.h.

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 782 of file MSAsRaster.h.

-----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 613 of file MSAsRaster.h.

Referenced by axisNum_().

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

Definition at line 697 of file MSAsRaster.h.

Referenced by nelements().

Definition at line 1230 of file MSAsRaster.h.

const Axis casa::MSAsRaster::BASELN [static, private]

sorted by antenna1-antenna2.

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

Definition at line 786 of file MSAsRaster.h.

Definition at line 794 of file MSAsRaster.h.

Definition at line 794 of file MSAsRaster.h.

Definition at line 794 of file MSAsRaster.h.

const Axis casa::MSAsRaster::CHAN [static, private]
const VisType casa::MSAsRaster::CORRECTED [static, private]

Definition at line 573 of file MSAsRaster.h.

Definition at line 878 of file MSAsRaster.h.

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 877 of file MSAsRaster.h.

Definition at line 1249 of file MSAsRaster.h.

Definition at line 880 of file MSAsRaster.h.

Definition at line 880 of file MSAsRaster.h.

Definition at line 885 of file MSAsRaster.h.

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 885 of file MSAsRaster.h.

const VisDev casa::MSAsRaster::DIFF [static, private]

Definition at line 589 of file MSAsRaster.h.

Definition at line 745 of file MSAsRaster.h.

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 896 of file MSAsRaster.h.

NOT_LOADED value?

Definition at line 908 of file MSAsRaster.h.

represents.

Definition at line 914 of file MSAsRaster.h.

(if necessary) the state of flag edits?

Definition at line 912 of file MSAsRaster.h.

data displays.

(Filled by createDevSlice_()).

Definition at line 910 of file MSAsRaster.h.

good data from flagged/missing data.

Which is True and which False depends on flagsInClr_.

Definition at line 1089 of file MSAsRaster.h.

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

Definition at line 1092 of file MSAsRaster.h.

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

Virtually, this has the same shape as vis_.

Definition at line 1086 of file MSAsRaster.h.

draw flags in color?

Definition at line 1094 of file MSAsRaster.h.

called?

Definition at line 905 of file MSAsRaster.h.

Definition at line 899 of file MSAsRaster.h.

represents, by Axis.

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

Definition at line 903 of file MSAsRaster.h.

display canvas.

Definition at line 898 of file MSAsRaster.h.

Definition at line 898 of file MSAsRaster.h.

Definition at line 1230 of file MSAsRaster.h.

choice box for applying edits to entire antenna.

Definition at line 1070 of file MSAsRaster.h.

Definition at line 1249 of file MSAsRaster.h.

only first msShape_TIME ) are valid.

Definition at line 812 of file MSAsRaster.h.

Definition at line 723 of file MSAsRaster.h.

Definition at line 818 of file MSAsRaster.h.

Definition at line 1065 of file MSAsRaster.h.

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 1275 of file MSAsRaster.h.

Definition at line 1211 of file MSAsRaster.h.

defines the button for saving all edits.

Definition at line 1082 of file MSAsRaster.h.

Definition at line 1060 of file MSAsRaster.h.

Definition at line 1230 of file MSAsRaster.h.

Block<void*> casa::MSAsRaster::freq_ [private]

The user can select the spectral windows to view.

This Block holds the (sorted) spectral windows actually found in the selected 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 831 of file MSAsRaster.h.

Referenced by resetFreq_().

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

These create something similar to an 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 1244 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::IMAGINARY [static, private]

Definition at line 579 of file MSAsRaster.h.

const Float casa::MSAsRaster::INSUF_DATA [static, private]

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

Definition at line 625 of file MSAsRaster.h.

const Int casa::MSAsRaster::INVALID [static, private]

=================== 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, Vector/Array/Block indices, etc. (Strong typing: grrr...)

Definition at line 559 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 [static, private]

Definition at line 564 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::INVALID_VC [static, private]

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 586 of file MSAsRaster.h.

const VisDev casa::MSAsRaster::INVALID_VD [static, private]

Definition at line 589 of file MSAsRaster.h.

const VisType casa::MSAsRaster::INVALID_VT [static, private]

Definition at line 576 of file MSAsRaster.h.

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 CoordinateSystem which it uses.

Definition at line 1269 of file MSAsRaster.h.

Referenced by purgeCache().

Axis Labelling? (Yes/No).

Definition at line 678 of file MSAsRaster.h.

Baseline sort (antenna1-antenna2 vs.

baseline length).

Definition at line 671 of file MSAsRaster.h.

Definition at line 675 of file MSAsRaster.h.

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

Definition at line 674 of file MSAsRaster.h.

defines the button for undoing all edits.

Definition at line 1076 of file MSAsRaster.h.

no checkbox-type DParameter yet).

Definition at line 1068 of file MSAsRaster.h.

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

----flagging state-------------------------------------------------------

Definition at line 1059 of file MSAsRaster.h.

----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 735 of file MSAsRaster.h.

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

Definition at line 692 of file MSAsRaster.h.

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 1263 of file MSAsRaster.h.

choice box for using entire MS (vs.

selected MS only) when saving edits.

Definition at line 1079 of file MSAsRaster.h.

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 667 of file MSAsRaster.h.

Definition at line 668 of file MSAsRaster.h.

defines the button for undoing one edit.

Definition at line 1074 of file MSAsRaster.h.

Definition at line 1072 of file MSAsRaster.h.

Definition at line 1062 of file MSAsRaster.h.

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

Definition at line 689 of file MSAsRaster.h.

User option DisplayParameters specific to MSAsRaster.

Maximum memory to use for vis_ buffer.

Definition at line 655 of file MSAsRaster.h.

changes to these options require data extraction:

Observed, Corrected, Model, etc.

Definition at line 686 of file MSAsRaster.h.

Which axes will be on X, Y, Animator.

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

Definition at line 659 of file MSAsRaster.h.

Definition at line 660 of file MSAsRaster.h.

Definition at line 661 of file MSAsRaster.h.

Definition at line 790 of file MSAsRaster.h.

Definition at line 1220 of file MSAsRaster.h.

Definition at line 1220 of file MSAsRaster.h.

(<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 1220 of file MSAsRaster.h.

Definition at line 1220 of file MSAsRaster.h.

const VisType casa::MSAsRaster::MODEL [static, private]

Definition at line 574 of file MSAsRaster.h.

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

Definition at line 741 of file MSAsRaster.h.

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

Passed in through constructors and setOpts parameters.

Definition at line 649 of file MSAsRaster.h.

Referenced by name().

Definition at line 1049 of file MSAsRaster.h.

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

The selected MS.

Definition at line 751 of file MSAsRaster.h.

Definition at line 753 of file MSAsRaster.h.

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 763 of file MSAsRaster.h.

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

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

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

Definition at line 767 of file MSAsRaster.h.

Definition at line 737 of file MSAsRaster.h.

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

Definition at line 756 of file MSAsRaster.h.

Referenced by a1mult_(), and bsln_().

const Axis casa::MSAsRaster::NAXES [static, private]

Definition at line 564 of file MSAsRaster.h.

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

Definition at line 796 of file MSAsRaster.h.

Definition at line 796 of file MSAsRaster.h.

Definition at line 796 of file MSAsRaster.h.

Definition at line 744 of file MSAsRaster.h.

const Int casa::MSAsRaster::NCOLORS [static, private]

Definition at line 643 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::NCOMPNAMES [static, private]

Definition at line 582 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::NCOMPS [static, private]

Definition at line 580 of file MSAsRaster.h.

visComp_ and visDev_.

visComp_ is only AMP, PHASE, REAL or IMAGINARY (above is what is stored in large vis_ 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 720 of file MSAsRaster.h.

const Float casa::MSAsRaster::NEWFLAG [static, private]

Definition at line 639 of file MSAsRaster.h.

Definition at line 742 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::NLOCS [static, private]

Definition at line 569 of file MSAsRaster.h.

const Float casa::MSAsRaster::NO_DATA [static, private]

Definition at line 617 of file MSAsRaster.h.

const Float casa::MSAsRaster::NODATA [static, private]

Definition at line 639 of file MSAsRaster.h.

const VisDev casa::MSAsRaster::NORMAL [static, private]

Definition at line 589 of file MSAsRaster.h.

const Float casa::MSAsRaster::NOT_LOADED [static, private]

to stand for 'no data in the selected 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 622 of file MSAsRaster.h.

const Float casa::MSAsRaster::NOTLOADED [static, private]

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 639 of file MSAsRaster.h.

Definition at line 721 of file MSAsRaster.h.

(*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 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 840 of file MSAsRaster.h.

(and the size of the next two vectors).

Definition at line 842 of file MSAsRaster.h.

Definition at line 743 of file MSAsRaster.h.

const VisType casa::MSAsRaster::NTYPES [static, private]

Definition at line 576 of file MSAsRaster.h.

Definition at line 1249 of file MSAsRaster.h.

const VisType casa::MSAsRaster::OBSERVED [static, private]

Definition at line 572 of file MSAsRaster.h.

const Float casa::MSAsRaster::OLDFLAG [static, private]

Definition at line 639 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::PHASE [static, private]

Definition at line 579 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::PHDIFF [static, private]

Definition at line 581 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::PHRMS [static, private]

Definition at line 581 of file MSAsRaster.h.

Definition at line 843 of file MSAsRaster.h.

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

const Axis casa::MSAsRaster::POL [static, private]

within msShape_[POL] and its index within the 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 851 of file MSAsRaster.h.

Definition at line 852 of file MSAsRaster.h.

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 701 of file MSAsRaster.h.

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 932 of file MSAsRaster.h.

const VisComp casa::MSAsRaster::REAL [static, private]

Definition at line 579 of file MSAsRaster.h.

const VisType casa::MSAsRaster::RESIDUAL [static, private]

Definition at line 575 of file MSAsRaster.h.

const VisDev casa::MSAsRaster::RMS [static, private]

Definition at line 589 of file MSAsRaster.h.

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 817 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::SL0 [static, private]

Definition at line 569 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::SL1 [static, private]

Definition at line 569 of file MSAsRaster.h.

const Axis casa::MSAsRaster::SP_W [static, private]

Definition at line 820 of file MSAsRaster.h.

Referenced by resetFreq_(), and spw_().

Definition at line 724 of file MSAsRaster.h.

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 1249 of file MSAsRaster.h.

Definition at line 1249 of file MSAsRaster.h.

Definition at line 1249 of file MSAsRaster.h.

Definition at line 1249 of file MSAsRaster.h.

Definition at line 1249 of file MSAsRaster.h.

const Axis casa::MSAsRaster::TIME [static, 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 809 of file MSAsRaster.h.

Definition at line 1063 of file MSAsRaster.h.

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 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 1230 of file MSAsRaster.h.

The visibility hypercube.

Definition at line 857 of file MSAsRaster.h.

Definition at line 710 of file MSAsRaster.h.

Definition at line 615 of file MSAsRaster.h.

Referenced by visCompNum_().

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 924 of file MSAsRaster.h.

Definition at line 711 of file MSAsRaster.h.

Definition at line 864 of file MSAsRaster.h.

Definition at line 867 of file MSAsRaster.h.

Definition at line 865 of file MSAsRaster.h.

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 709 of file MSAsRaster.h.

Definition at line 614 of file MSAsRaster.h.

Referenced by visTypeNum_().

gridded 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 863 of file MSAsRaster.h.

Definition at line 736 of file MSAsRaster.h.

Definition at line 752 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::X [static, private]

Definition at line 569 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::Y [static, private]

Definition at line 569 of file MSAsRaster.h.

const AxisLoc casa::MSAsRaster::Z [static, private]

Definition at line 569 of file MSAsRaster.h.

Referenced by nelements().


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