DOnewsimulator.h

Classes

newsimulator -- Simulates MeasurementSets from SkyModel and SkyEquation (full description)

class newsimulator : public ApplicationObject

Types

enum methods

OBSERVE = 0
PREDICT
CORRUPT
RESET
STATE
SETDATA
NAME
SUMMARY
SETLIMITS
SETAUTO
SETSEED
SETGAIN
SETNOISE
SETLEAKAGE
SETPA
SETBANDPASS
SETOPTIONS
SETTIMES
SETCONFIG
SETFIELD
SETSPWINDOW
SETFEED
SETVP
NUM_METHODS

Interface

Public Members
newsimulator(String& msname)
newsimulator(MeasurementSet &thems)
String name() const
newsimulator(const newsimulator &other)
newsimulator &operator=(const newsimulator &other)
~newsimulator()
Bool close()
Bool setdata(const Vector<Int>& spectralwindowids, const Vector<Int>& fieldids, const String& msSelect)
Bool settimes(const Quantity& integrationTime, const Bool useHourAngle, const MEpoch& refTime)
Bool setconfig(const String& telname, const Vector<Double>& x, const Vector<Double>& y, const Vector<Double>& z, const Vector<Double>& dishDiameter, const Vector<Double>& offset, const Vector<String>& mount, const Vector<String>& antName, const String& coordsystem, const MPosition& referenceLocation)
Bool setfield(const String& sourceName, const MDirection& sourceDirection, const String& calCode, const Quantity& distance)
Bool setspwindow(const String& spwName, const Quantity& freq, const Quantity& deltafreq, const Quantity& freqresolution, const Int nchannels, const String& stokes)
Bool setfeed(const String& mode)
Bool setvp(const Bool dovp, const Bool defaultVP, const String& vpTable, const Bool doSquint, const Quantity &parAngleInc)
Bool setseed(const Int seed)
Bool setgain(const String& mode, const String& table, const Quantity& interval, const Vector<Double>& amplitude)
Bool setleakage(const String& mode, const String& table, const Quantity& interval, const Double amplitude)
Bool setbandpass(const String& mode, const String& table, const Quantity& interval, const Vector<Double>& amplitude)
Bool setpa(const String& mode, const String& table, const Quantity& interval)
Bool setnoise(const String& mode, const Quantity& simplenoise, const String& table, const Float antefficiency, const Float correfficiency, const Float spillefficiency, const Float tau, const Float trx, const Float tatmos, const Float tcmb)
Bool corrupt()
Bool setlimits(const Double shadowFraction, const Quantity& elevationLimit)
Bool setauto(const Float autocorrwt)
Bool observe(const String& sourcename, const String& spwname, const Quantity& startTime, const Quantity& stopTime)
Bool predict(const Vector<String>& modelImage, const String& compList, const Bool incremental)
String state()
Bool summary()
Bool reset()
Bool setoptions(const String& ftmachine, const Int cache, const Int tile, const String& gridfunction, const MPosition& mLocation, const Float padding, const Int facets, const Double maxData)
Bool setauto(const Double autocorrwt)
virtual String className() const
virtual Vector<String> methods() const
virtual Vector<String> noTraceMethods() const
virtual MethodResult runMethod(uInt which, ParameterSet &inputRecord, Bool runMethod)
Private Members
newsimulator()
Bool detached() const
void defaults()
void makeVisSet()
String formatDirection(const MDirection& direction)
String formatTime(const Double time)
Bool createSummary(LogIO& os)
Bool configSummary(LogIO& os)
Bool fieldSummary(LogIO& os)
Bool spWindowSummary(LogIO& os)
Bool feedSummary(LogIO& os)
Bool timeSummary(LogIO& os)
Bool predictSummary(LogIO& os)
Bool vpSummary(LogIO& os)
Bool optionsSummary(LogIO& os)
Bool corruptSummary(LogIO& os)
Bool gainSummary(LogIO& os)
Bool leakageSummary(LogIO& os)
Bool bandpassSummary(LogIO& os)
Bool paSummary(LogIO& os)
Bool noiseSummary(LogIO& os)
Bool createSkyEquation( const Vector<String>& image, const String complist)
void destroySkyEquation()

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

The name MUST have the 'DO' prefix as this class is derived from ApplicationObject, and hence is classified as a distributed object. For the same reason the rest of its name must be in lower case. This class simulates visibility data, so it is called DOnewsimulator.

Synopsis

Motivation

This class was written to make the simulation capability useful from glish

Thrown Exceptions

To Do

Member Description

newsimulator(String& msname)

Construct from string

newsimulator(MeasurementSet &thems)

"newsimulator" ctor

String name() const

Return the name of the MeasurementSet

newsimulator(const newsimulator &other)

newsimulator &operator=(const newsimulator &other)

~newsimulator()

Bool close()

enum methods

Bool setdata(const Vector<Int>& spectralwindowids, const Vector<Int>& fieldids, const String& msSelect)

Select the data to be predicted or corrupted

Bool settimes(const Quantity& integrationTime, const Bool useHourAngle, const MEpoch& refTime)

Bool setconfig(const String& telname, const Vector<Double>& x, const Vector<Double>& y, const Vector<Double>& z, const Vector<Double>& dishDiameter, const Vector<Double>& offset, const Vector<String>& mount, const Vector<String>& antName, const String& coordsystem, const MPosition& referenceLocation)

set the configuration; NOTE: the telname used here will determine the Voltage Pattern to be used in the simulation

Bool setfield(const String& sourceName, const MDirection& sourceDirection, const String& calCode, const Quantity& distance)

set the observed fields for the simulation

Bool setspwindow(const String& spwName, const Quantity& freq, const Quantity& deltafreq, const Quantity& freqresolution, const Int nchannels, const String& stokes)

set one or more spectral windows and their characteristics

Bool setfeed(const String& mode)

Set the simulated feed characteristics (currently brain dead version, only takes "perfect R L" or "perfect X Y")

Bool setvp(const Bool dovp, const Bool defaultVP, const String& vpTable, const Bool doSquint, const Quantity &parAngleInc)

Set the voltage pattern

Bool setseed(const Int seed)

Set the random number generator seed for the addition of errors

Bool setgain(const String& mode, const String& table, const Quantity& interval, const Vector<Double>& amplitude)

Apply antenna-based gain errors

Bool setleakage(const String& mode, const String& table, const Quantity& interval, const Double amplitude)

Apply polarization leakage errors

Bool setbandpass(const String& mode, const String& table, const Quantity& interval, const Vector<Double>& amplitude)

Apply bandpass errors

Bool setpa(const String& mode, const String& table, const Quantity& interval)

Simulate the parallactic angle phase effect

Bool setnoise(const String& mode, const Quantity& simplenoise, const String& table, const Float antefficiency, const Float correfficiency, const Float spillefficiency, const Float tau, const Float trx, const Float tatmos, const Float tcmb)

Simulate quasi-realistic thermal noise, which can depend upon elevation, bandwidth, antenna diameter, as expected

Bool corrupt()

const Quantity& trx, const Quantity& tatmos, const Quantity& tcmb);

calculate errors and apply them to the data in our MS

Bool setlimits(const Double shadowFraction, const Quantity& elevationLimit)

Set limits

Bool setauto(const Float autocorrwt)

Set autocorrelation weight

Bool observe(const String& sourcename, const String& spwname, const Quantity& startTime, const Quantity& stopTime)

add new visibilities as described by the set methods to an existing or just created measurement set

Bool predict(const Vector<String>& modelImage, const String& compList, const Bool incremental)

Given a model image, predict the visibilities onto the (u,v) coordinates of our MS

String state()

Bool summary()

Bool reset()

Bool setoptions(const String& ftmachine, const Int cache, const Int tile, const String& gridfunction, const MPosition& mLocation, const Float padding, const Int facets, const Double maxData)

Set the processing options

Bool setauto(const Double autocorrwt)

virtual String className() const

Stuff needed for distributing this class

virtual Vector<String> methods() const

virtual Vector<String> noTraceMethods() const

virtual MethodResult runMethod(uInt which, ParameterSet &inputRecord, Bool runMethod)

If your object has more than one method

newsimulator()

Protect the default constructor

Bool detached() const

Prints an error message if the newsimulator DO is detached and returns True.

void defaults()

set up some defaults

void makeVisSet()

Make a VisSet if needed

String formatDirection(const MDirection& direction)

print out some help about create() Format direction nicely

String formatTime(const Double time)

Format time nicely

Bool createSummary(LogIO& os)
Bool configSummary(LogIO& os)
Bool fieldSummary(LogIO& os)
Bool spWindowSummary(LogIO& os)
Bool feedSummary(LogIO& os)
Bool timeSummary(LogIO& os)
Bool predictSummary(LogIO& os)
Bool vpSummary(LogIO& os)
Bool optionsSummary(LogIO& os)
Bool corruptSummary(LogIO& os)
Bool gainSummary(LogIO& os)
Bool leakageSummary(LogIO& os)
Bool bandpassSummary(LogIO& os)
Bool paSummary(LogIO& os)
Bool noiseSummary(LogIO& os)

individual summary() functions

Bool createSkyEquation( const Vector<String>& image, const String complist)
void destroySkyEquation()

pointer to VPSkyJones for the sky equation

Saving some information about the various corrupting terms