casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::NewMSSimulator Class Reference

Create an empty MeasurementSet from observation and telescope descriptions. More...

#include <NewMSSimulator.h>

List of all members.

Public Member Functions

 NewMSSimulator (const String &)
 Constructor from name only.
 NewMSSimulator (MeasurementSet &)
 Constructor from existing MS.
 NewMSSimulator (const NewMSSimulator &mss)
 Copy constructor - for completeness only.
 ~NewMSSimulator ()
NewMSSimulatoroperator= (const NewMSSimulator &)
 Assignment.
void setMaxData (const Double maxData=2e9)
 Set maximum amount of data (bytes) to be written into any one scratch column hypercube.
void initAnt (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 > &name, const Vector< String > &padname, const String &coordsystem, const MPosition &mRefLocation)
 set the antenna and array data.
bool getAnt (String &telescope, Int &nAnt, Matrix< Double > *antXYZ, Vector< Double > &antDiam, Vector< Double > &offset, Vector< String > &mount, Vector< String > &name, Vector< String > &padname, String &coordsystem, MPosition &mRefLocation)
 get the info back
void initFields (const String &sourceName, const MDirection &sourceDirection, const String &calCode)
 set the observed fields
bool getFields (Int &nField, Vector< String > &sourceName, Vector< MDirection > &sourceDirection, Vector< String > &calCode)
void initFeeds (const String &mode)
 set the Feeds; brain dead version
bool getFeedMode (String &mode)
void initFeeds (const String &mode, const Vector< Double > &x, const Vector< Double > &y, const Vector< String > &pol)
 set the Feeds; Smart version
void initSpWindows (const String &spWindowName, const Int &nChan, const Quantity &startFreq, const Quantity &freqInc, const Quantity &freqRes, const MFrequency::Types &freqType, const String &stokesString)
 set the spectral windows information
bool getSpWindows (Int &nSpw, Vector< String > &spWindowName, Vector< Int > &nChan, Vector< Quantity > &startFreq, Vector< Quantity > &freqInc, Vector< String > &stokesString)
void setFractionBlockageLimit (const Double fraclimit)
void setElevationLimit (const Quantity &ellimit)
void setAutoCorrelationWt (const Float autocorrwt)
void settimes (const Quantity &qIntegrationTime, const Bool useHourAngles, const MEpoch &mRefTime)
void observe (const String &sourceName, const String &spWindowName, const Quantity &qStartTime, const Quantity &qStopTime, const Bool add_observation, const Bool state_sig, const Bool state_ref, const double &state_cal, const double &state_load, const unsigned int state_sub_scan, const String &state_obs_mode, const String &observername, const String &projectname)
void observe (const Vector< String > &sourceNames, const String &spWindowName, const Vector< Quantity > &qStartTimes, const Vector< Quantity > &qStopTimes, const Vector< MDirection > &directions, const Bool add_observation, const Bool state_sig, const Bool state_ref, const double &state_cal, const double &state_load, const unsigned int state_sub_scan, const String &state_obs_mode, const String &observername, const String &projectname)
MeasurementSetgetMs () const

Private Member Functions

 NewMSSimulator ()
 Prevent use of default constructor.
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)
void blockage (Double &fraction1, Double &fraction2, const Vector< Double > &uvw, const Double diam1, const Double diam2)
 Returns the fractional blockage of one antenna by another We will want to put this somewhere else eventually, but I don't yet know where! Till then.
String formatDirection (const MDirection &)
String formatTime (const Double)
void addHyperCubes (const Int id, const Int nBase, const Int nChan, const Int nCorr)
void defaults ()
Bool calcAntUVW (MEpoch &epoch, MDirection &refdir, Matrix< Double > &uvwAnt)

Private Attributes

Double fractionBlockageLimit_p
Quantity elevationLimit_p
Float autoCorrelationWt_p
String telescope_p
Quantity qIntegrationTime_p
Bool useHourAngle_p
Bool hourAngleDefined_p
MEpoch mRefTime_p
Double t_offset_p
Double dataWritten_p
Int hyperCubeID_p
Bool hasHyperCubes_p
Int lastSpWID_p
Int lastNchan_p
MeasurementSetms_p
TiledDataStManAccessor dataAcc_p
TiledDataStManAccessor scratchDataAcc_p
TiledDataStManAccessor sigmaAcc_p
TiledDataStManAccessor flagAcc_p
Double maxData_p

Detailed Description

Create an empty MeasurementSet from observation and telescope descriptions.

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

Definition at line 88 of file NewMSSimulator.h.


Constructor & Destructor Documentation

Constructor from name only.

Constructor from existing MS.

Copy constructor - for completeness only.

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

Prevent use of default constructor.

Definition at line 217 of file NewMSSimulator.h.


Member Function Documentation

void casa::NewMSSimulator::addHyperCubes ( const Int  id,
const Int  nBase,
const Int  nChan,
const Int  nCorr 
) [private]
void casa::NewMSSimulator::blockage ( Double fraction1,
Double fraction2,
const Vector< Double > &  uvw,
const Double  diam1,
const Double  diam2 
) [private]

Returns the fractional blockage of one antenna by another We will want to put this somewhere else eventually, but I don't yet know where! Till then.

fraction1: fraction of antenna 1 that is blocked by 2 fraction2: fraction of antenna 2 that is blocked by 1 hint: at least one of the two will be 0.0

Bool casa::NewMSSimulator::calcAntUVW ( MEpoch epoch,
MDirection refdir,
Matrix< Double > &  uvwAnt 
) [private]
void casa::NewMSSimulator::defaults ( ) [private]
bool casa::NewMSSimulator::getAnt ( String telescope,
Int nAnt,
Matrix< Double > *  antXYZ,
Vector< Double > &  antDiam,
Vector< Double > &  offset,
Vector< String > &  mount,
Vector< String > &  name,
Vector< String > &  padname,
String coordsystem,
MPosition mRefLocation 
)

get the info back

bool casa::NewMSSimulator::getFields ( Int nField,
Vector< String > &  sourceName,
Vector< MDirection > &  sourceDirection,
Vector< String > &  calCode 
)
bool casa::NewMSSimulator::getSpWindows ( Int nSpw,
Vector< String > &  spWindowName,
Vector< Int > &  nChan,
Vector< Quantity > &  startFreq,
Vector< Quantity > &  freqInc,
Vector< String > &  stokesString 
)
void casa::NewMSSimulator::initAnt ( 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 > &  name,
const Vector< String > &  padname,
const String coordsystem,
const MPosition mRefLocation 
)

set the antenna and array data.

These are written immediately to the existing MS. The same model is used for the other init infor.

void casa::NewMSSimulator::initFeeds ( const String mode)

set the Feeds; brain dead version

void casa::NewMSSimulator::initFeeds ( const String mode,
const Vector< Double > &  x,
const Vector< Double > &  y,
const Vector< String > &  pol 
)

set the Feeds; Smart version

void casa::NewMSSimulator::initFields ( const String sourceName,
const MDirection sourceDirection,
const String calCode 
)

set the observed fields

void casa::NewMSSimulator::initSpWindows ( const String spWindowName,
const Int nChan,
const Quantity startFreq,
const Quantity freqInc,
const Quantity freqRes,
const MFrequency::Types freqType,
const String stokesString 
)

set the spectral windows information

void casa::NewMSSimulator::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 
) [private]
void casa::NewMSSimulator::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 
) [private]
void casa::NewMSSimulator::observe ( const String sourceName,
const String spWindowName,
const Quantity qStartTime,
const Quantity qStopTime,
const Bool  add_observation,
const Bool  state_sig,
const Bool  state_ref,
const double &  state_cal,
const double &  state_load,
const unsigned int  state_sub_scan,
const String state_obs_mode,
const String observername,
const String projectname 
)
void casa::NewMSSimulator::observe ( const Vector< String > &  sourceNames,
const String spWindowName,
const Vector< Quantity > &  qStartTimes,
const Vector< Quantity > &  qStopTimes,
const Vector< MDirection > &  directions,
const Bool  add_observation,
const Bool  state_sig,
const Bool  state_ref,
const double &  state_cal,
const double &  state_load,
const unsigned int  state_sub_scan,
const String state_obs_mode,
const String observername,
const String projectname 
)
NewMSSimulator& casa::NewMSSimulator::operator= ( const NewMSSimulator )

Assignment.

void casa::NewMSSimulator::setAutoCorrelationWt ( const Float  autocorrwt) [inline]

Definition at line 174 of file NewMSSimulator.h.

References autoCorrelationWt_p.

void casa::NewMSSimulator::setElevationLimit ( const Quantity ellimit) [inline]

Definition at line 171 of file NewMSSimulator.h.

References elevationLimit_p.

void casa::NewMSSimulator::setFractionBlockageLimit ( const Double  fraclimit) [inline]

Definition at line 168 of file NewMSSimulator.h.

References fractionBlockageLimit_p.

void casa::NewMSSimulator::setMaxData ( const Double  maxData = 2e9) [inline]

Set maximum amount of data (bytes) to be written into any one scratch column hypercube.

Definition at line 110 of file NewMSSimulator.h.

References maxData_p.

void casa::NewMSSimulator::settimes ( const Quantity qIntegrationTime,
const Bool  useHourAngles,
const MEpoch mRefTime 
)

Member Data Documentation

Definition at line 222 of file NewMSSimulator.h.

Referenced by setAutoCorrelationWt().

Definition at line 237 of file NewMSSimulator.h.

Definition at line 229 of file NewMSSimulator.h.

Definition at line 221 of file NewMSSimulator.h.

Referenced by setElevationLimit().

Definition at line 237 of file NewMSSimulator.h.

Definition at line 217 of file NewMSSimulator.h.

Referenced by setFractionBlockageLimit().

Definition at line 231 of file NewMSSimulator.h.

Definition at line 226 of file NewMSSimulator.h.

Definition at line 230 of file NewMSSimulator.h.

Definition at line 233 of file NewMSSimulator.h.

Definition at line 232 of file NewMSSimulator.h.

Definition at line 239 of file NewMSSimulator.h.

Referenced by setMaxData().

Definition at line 227 of file NewMSSimulator.h.

Definition at line 235 of file NewMSSimulator.h.

Definition at line 224 of file NewMSSimulator.h.

Definition at line 237 of file NewMSSimulator.h.

Definition at line 237 of file NewMSSimulator.h.

Definition at line 228 of file NewMSSimulator.h.

Definition at line 223 of file NewMSSimulator.h.

Definition at line 225 of file NewMSSimulator.h.


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