DOsimulator.h
Classes
- simulator -- Simulates MeasurementSets from SkyModel and SkyEquation (full description)
Interface
- Public Members
- simulator(MeasurementSet &thems)
- Bool open(MeasurementSet &thems)
- Bool close()
- String name() const
- simulator()
- simulator(const simulator &other)
- simulator &operator=(const simulator &other)
- ~simulator()
- Bool setconfig(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>& antName, const String& coordsystem, const MPosition& referenceLocation)
- Bool setfield(const uInt rowID, const String& sourceName, const MDirection& sourceDirection, const Int intsPerPointing, const Int mosPointingsX, const Int mosPointingsY, const Float& mosSpacing, const Quantity& distance)
- Bool settimes(const Quantity& integrationTime, const Quantity& gapTime, const Bool useHourAngle, const Quantity& startTime, const Quantity& stopTime, const MEpoch& refTime)
- Bool setspwindow(const uInt rowID, 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 create(const String& newMSName, const Double shadowFraction, const Quantity& elevationLimit, const Float autocorrwt=0.0)
- Bool add(const Double shadowFraction, const Quantity& elevationLimit, const Float autocorrwt=0.0)
- 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)
- 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
- Bool detached() const
- void defaults()
- void createHelp()
- 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()
- Bool checkFields()
- Bool fieldsContiguous(Bool doFix)
- void resizeFields(const uInt newsize)
- Bool checkSpWindows()
- Bool spWindowsContiguous(Bool doFix)
- void resizeSpWindows(const uInt newsize)
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 DOsimulator.
Synopsis
Motivation
This class was written to make the simulation capability useful from glish
Thrown Exceptions
- AipsError - if an error occurs
To Do
Member Description
"simulator" ctor
Close the current ms, and replace it with the supplied ms.
Flush the ms to disk and detach from the ms file. All function
calls after this will be a no-op.
Return the name of the MeasurementSet
simulator(const simulator &other)
simulator &operator=(const simulator &other)
Bool setconfig(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>& 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 uInt rowID, const String& sourceName, const MDirection& sourceDirection, const Int intsPerPointing, const Int mosPointingsX, const Int mosPointingsY, const Float& mosSpacing, const Quantity& distance)
set the observed fields for the simulation
Bool settimes(const Quantity& integrationTime, const Quantity& gapTime, const Bool useHourAngle, const Quantity& startTime, const Quantity& stopTime, const MEpoch& refTime)
set the required times for the simulation
Bool setspwindow(const uInt rowID, 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
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
const Quantity& trx,
const Quantity& tatmos,
const Quantity& tcmb);
calculate errors and apply them to the data in our MS
Bool create(const String& newMSName, const Double shadowFraction, const Quantity& elevationLimit, const Float autocorrwt=0.0)
Create a MS from a file containing the names of various parameter files
(ie, fields, spectral window, etc -- see MeasurementSets/MSSimulator
for more info).
Bool add(const Double shadowFraction, const Quantity& elevationLimit, const Float autocorrwt=0.0)
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
Bool setoptions(const String& ftmachine, const Int cache, const Int tile, const String& gridfunction, const MPosition& mLocation, const Float padding, const Int facets)
Set the processing options
Stuff needed for distributing this class
If your object has more than one method
Prints an error message if the simulator DO is detached and returns True.
set up some defaults
print out some help about create()
individual summary() functions
info for coordinates and station locations
info for observed field parameters
this will grow into an observing schedule
check to see if rows are contiguous; returns True if fields were
contiguous in row numbers (ie, vectors had no gaps.
if doFix==True, we remove any empty rows
void resizeFields(const uInt newsize)
info for observed field parameters
this will grow into an observing schedule
resizes field vectors
info for observed field parameters
this will grow into an observing schedule
info for spectral window parameters
check to see if rows are contiguous; returns True if spwindows were
contiguous in row numbers (ie, vectors had no gaps.
if doFix==True, we remove any empty rows
info for spectral window parameters
resizes spWindow vectors
pointer to VPSkyJones for the sky equation
Saving some information about the various corrupting terms