MSSimulator.h

Classes

MSSimulator -- Create an empty MeasurementSet from observation and telescope descriptions. (full description)

class MSSimulator

Interface

Public Members
MSSimulator()
MSSimulator(const MSSimulator & mss)
~MSSimulator()
MSSimulator & operator=(const MSSimulator &)
void initAnt(const String& telname, const Vector<Double>& x, const Vector<Double>& y, const Vector<Double>& z, const Vector<Float>& dishDiameter, const Vector<String>& mount, const Vector<String>& name, const String& coordsystem, const MPosition& mRefLocation)
void initFields(const uInt nSources, const Vector<String>& sourceName, const Vector<MDirection>& sourceDirection, const Vector<Int>& intsPerPointing, const Vector<Int>& mosPointingsX, const Vector<Int>& mosPointingsY, const Vector<Float>& mosSpacing)
void initFeeds(const String& mode)
void initSpWindows(const uInt nSpWindows, const Vector<String>& spWindowName, const Vector<Int>& nChan, const Vector<Quantity>& startFreq, const Vector<Quantity>& freqInc, const Vector<Quantity>& freqRes, const Vector<String>& stokesString)
void setFractionBlockageLimit(const Double fraclimit)
void setElevationLimit(const Quantity& ellimit)
void setAutoCorrelationWt(const Float autocorrwt)
void setTimes(const Quantity& qIntegrationTime, const Quantity& qGapTime, const Bool useHourAngles, const Quantity& qStartTime, const Quantity& qStopTime, const MEpoch& qRefTime )
void writeMS(const String& msname)
void extendMS(MeasurementSet & ms)
Private Members
void local2global(Vector<Double>& xReturned, Vector<Double>& yReturned, Vector<Double>& zReturned, const MPosition& mRefLocation, const Vector<Double>& xIn, const Vector<Double>& yIn, const Vector<Double>& zIn)
void longlat2global(Vector<Double>& xReturned, Vector<Double>& yReturned, Vector<Double>& zReturned, const MPosition& mRefLocation, const Vector<Double>& xIn, const Vector<Double>& yIn, const Vector<Double>& zIn)

Description

Prerequisite

Etymology

MS is from MeasurementSet, Simulator refers to the generation of 'fake' data from a set of parameters for instrument and sources.

Synopsis

This class creates a MeasurementSet from a set of parameters for instrument and sources. It does not simulate the data, only the coordinates of a measurement. The application "simulator" uses this class to create a true simulated MS with perfect or corrupted data.

Motivation

To test calibration and imaging programs it is necessary to have flawless data and data with errors that are known exactly. This class generates empty MeasurementSets (only coordinates filled in) that can be filled with predicted data.

To Do

Member Description

MSSimulator()

Default constructor - use this, then invoke initAnt, initFeed, initSpWindow, initConfig.

MSSimulator(const MSSimulator & mss)

Copy constructor - for completeness only

~MSSimulator()

MSSimulator & operator=(const MSSimulator &)

Assignment

void initAnt(const String& telname, const Vector<Double>& x, const Vector<Double>& y, const Vector<Double>& z, const Vector<Float>& dishDiameter, const Vector<String>& mount, const Vector<String>& name, const String& coordsystem, const MPosition& mRefLocation)

set the antenna and array data. This is held in MSSimulator vectors, and is then written into the appropriate MS Tables when writeMS() and its helper function extendMS() are called. The same model is used for the Fields, SpWindows, Feeds, and Times information below.

void initFields(const uInt nSources, const Vector<String>& sourceName, const Vector<MDirection>& sourceDirection, const Vector<Int>& intsPerPointing, const Vector<Int>& mosPointingsX, const Vector<Int>& mosPointingsY, const Vector<Float>& mosSpacing)

set the observed fields

void initFeeds(const String& mode)

set the Feeds; brain dead version

void initSpWindows(const uInt nSpWindows, const Vector<String>& spWindowName, const Vector<Int>& nChan, const Vector<Quantity>& startFreq, const Vector<Quantity>& freqInc, const Vector<Quantity>& freqRes, const Vector<String>& stokesString)

set the spectral windows information

void setFractionBlockageLimit(const Double fraclimit)

void setElevationLimit(const Quantity& ellimit)

void setAutoCorrelationWt(const Float autocorrwt)

void setTimes(const Quantity& qIntegrationTime, const Quantity& qGapTime, const Bool useHourAngles, const Quantity& qStartTime, const Quantity& qStopTime, const MEpoch& qRefTime )

void writeMS(const String& msname)

Write out a simulated MeasurementSet with the given name

void extendMS(MeasurementSet & ms)

void local2global(Vector<Double>& xReturned, Vector<Double>& yReturned, Vector<Double>& zReturned, const MPosition& mRefLocation, const Vector<Double>& xIn, const Vector<Double>& yIn, const Vector<Double>& zIn)

void longlat2global(Vector<Double>& xReturned, Vector<Double>& yReturned, Vector<Double>& zReturned, const MPosition& mRefLocation, const Vector<Double>& xIn, const Vector<Double>& yIn, const Vector<Double>& zIn)