28 #if ! defined (MSVIS_SimplSimVi2_H)
29 #define MSVIS_SimplSimVi2_H
51 #define SSVi2NotPossible() ThrowCc("Not Possible in SimpleSimVi2");
52 #define SSVi2NotYetImplemented() ThrowCc("Not yet implemented in SimpleSimVi2");
57 class RecordInterface;
60 template <
typename T, Int n>
class SquareMatrix;
61 template <
typename T>
class Vector;
66 class VisImagingWeight;
162 virtual void origin ()
override;
164 virtual void next ()
override;
284 virtual std::pair<bool, casacore::MDirection>
getPointingAngle (
int ,
double )
const override
476 std::unique_ptr<VisBuffer2>
vb_;
548 #endif // ! defined (MSVIS_SimpleSimVi2_H)
A Vector of integers, for indexing into Array<T> objects.
const casacore::ROMSHistoryColumns & historySubtablecols() const override
Access to history subtable.
A Measure: astronomical direction.
virtual casacore::IPosition visibilityShape() const override
Return the visibility 4-vector of polarizations for each channel.
const casacore::ROMSDataDescColumns & dataDescriptionSubtablecols() const override
Access to dataDescription subtable.
virtual const casacore::Cube< casacore::RigidVector< casacore::Double, 2 > > & getBeamOffsets() const override
Return a cube containing pairs of coordinate offsets for each receptor of each feed (values are in ra...
A Measure: position on Earth.
const SimpleSimVi2Parameters pars_
casacore::Input parameters
virtual ViImplementation2 * createVi() const
std::vector< double > Vector
virtual casacore::Bool sigmaSpectrumExists() const override
Determine whether SIGMA_SPECTRUM exists.
casacore::Vector< casacore::Double > freqs(casacore::Int spw) const
Return frequencies for specified spw.
virtual const casacore::MeasurementSet & ms() const override
virtual void observationId(casacore::Vector< casacore::Int > &obsids) const override
Return the OBSERVATION_IDs.
virtual void writeSigmaSpectrum(const casacore::Cube< casacore::Float > &) override
Write/modify the sigmaSpectrum.
Object to hold type of imaging weight scheme to be used on the fly and to provide facilities to do th...
std::complex< Float > Complex
casacore::Vector< casacore::Double > df_
virtual void writeFlag(const casacore::Cube< casacore::Bool > &) override
Write/modify the flags in the data.
virtual casacore::Int nAntennas() const override
Return number of antennasm spws, polids, ddids.
virtual casacore::Vector< casacore::Float > getReceptor0Angle() override
virtual ~SimpleSimVi2LayerFactory()
virtual casacore::Int nRows() const override
Return the number of rows in the current iteration.
A class to provide easy access to MSField columns.
casacore::Vector< casacore::Stokes::StokesTypes > corrdef_
Correlation stuff.
virtual casacore::Int getReportingFrameOfReference() const override
std::unique_ptr< VisBuffer2 > vb_
The associated VB.
virtual casacore::Bool hasWeightScaling() const override
const SimpleSimVi2Parameters & pars_
virtual casacore::Bool isNewSpectralWindow() const override
virtual const SpectralWindowChannels & getSpectralWindowChannels(casacore::Int msId, casacore::Int spectralWindowId) const override
get back the selected spectral windows and spectral channels for current ms
A Table intended to hold a MeasurementSet DATADESCRIPTION table.
virtual casacore::Int nRowsInChunk() const override
SimpleSimVi2()
Make default ctor invisible.
virtual casacore::Bool existsColumn(VisBufferComponent2 id) const override
casacore::Double iChunkTime0_
virtual void writeVisObserved(const casacore::Cube< casacore::Complex > &) override
const casacore::ROMSWeatherColumns & weatherSubtablecols() const override
Access to weather subtable.
virtual casacore::MPosition getObservatoryPosition() const override
const casacore::ROMSStateColumns & stateSubtablecols() const override
Access to state subtable.
virtual void flagRow(casacore::Vector< casacore::Bool > &rowflags) const override
Return row flag.
SimpleSimVi2LayerFactory(const SimpleSimVi2Parameters &pars)
A class to provide easy read-only access to MSSource columns.
virtual const casacore::Vector< casacore::Float > & parang(casacore::Double) const override
Per antenna:
virtual void stateId(casacore::Vector< casacore::Int > &stateids) const override
Return the STATE_IDs.
virtual casacore::Bool isNewArrayId() const override
const casacore::ROMSSysCalColumns & sysCalSubtablecols() const override
Access to sysCal subtable.
virtual void getRowIds(casacore::Vector< casacore::uInt > &rowids) const override
Return the row ids as from the original root table.
casacore::MSAntenna antennaSubTable_p
Subtables.
const casacore::ROMSSourceColumns & sourceSubtablecols() const override
Access to source subtable.
virtual void setReportingFrameOfReference(casacore::Int) override
virtual void uvw(casacore::Matrix< casacore::Double > &uvwmat) const override
Return u,v and w (in meters)
void configureNewSubchunk()
Keep VB2 sync'd.
std::unique_ptr< casacore::MSPolarizationColumns > polSubTablecols_p
void addNoise(casacore::Cube< casacore::Complex > &vis) const
Generate noise on data.
virtual void setWeightScaling(casacore::CountedPtr< WeightScaling >) override
virtual casacore::Int nSpectralWindows() const override
virtual void initWeightSpectrum(const casacore::Cube< casacore::Float > &) override
Initialize the weightSpectrum.
void generateSubtables()
Generate the antenna, spw and DD subtables.
virtual casacore::Int nDataDescriptionIds() const override
virtual casacore::Double getInterval() const override
Return the time interval (in seconds) used for iteration.
virtual void arrayIds(casacore::Vector< casacore::Int > &) const override
Return the current ArrayId.
std::unique_ptr< casacore::MSDataDescColumns > ddSubTablecols_p
virtual void exposure(casacore::Vector< casacore::Double > &expo) const override
Return actual time interval.
const casacore::ROMSObservationColumns & observationSubtablecols() const override
Access to observation subtable.
casacore::Double thisTime_
virtual void slurp() const override
Call to use the slurp i/o method for all scalar columns.
virtual void originChunks(casacore::Bool forceRewind=false) override
Methods to control chunk iterator.
const casacore::ROMSSpWindowColumns & spectralWindowSubtablecols() const override
Access to spectralWindow subtable.
virtual void nextChunk() override
virtual casacore::Vector< casacore::Double > getFrequencies(casacore::Double time, casacore::Int frameOfReference, casacore::Int spectralWndow=-1, casacore::Int msId=-1) const override
A class to provide easy read-only access to MSProcessor columns.
virtual void writeBackChanges(VisBuffer2 *) override
Writeback methods are Irrelevant for non-disk-reading VI2.
casacore::Matrix< casacore::Float > stokes_
const casacore::ROMSPolarizationColumns & polarizationSubtablecols() const override
Access to polarization subtable.
A class to provide easy read-only access to MSWeather columns.
A class to provide easy read-only access to MSASpectralWindow columns.
A Measure: instant in time.
virtual casacore::Vector< casacore::Stokes::StokesTypes > getCorrelationTypesDefined() const override
A Table intended to hold a MeasurementSet ANTENNA table.
virtual void floatData(casacore::Cube< casacore::Float > &fcube) const override
Return FLOAT_DATA as a casacore::Cube (npol, nchan, nrow) if found in the MS.
virtual void feed2(casacore::Vector< casacore::Int > &fd2) const override
Return feed2.
A class to provide easy read-only access to MSFreqOffset columns.
virtual void visibilityCorrected(casacore::Cube< casacore::Complex > &vis) const override
Return the visibilities as found in the casacore::MS, casacore::Cube (npol,nchan,nrow).
A class to provide easy read-only access to MSState columns.
virtual void writeVisCorrected(const casacore::Cube< casacore::Complex > &) override
Write/modify the visibilities.
virtual const casacore::Vector< casacore::String > & antennaMounts() const override
+=========================+ | | | Chunk and casacore::MS Level casacore::Data | | | +================...
virtual const casacore::MDirection & phaseCenter() const override
Return the current phase center as an MDirection.
virtual void writeSigma(const casacore::Matrix< casacore::Float > &) override
Write/modify the Sigma.
casacore::Vector< casacore::Int > nChan_
virtual const VisImagingWeight & getImagingWeightGenerator() const override
Return imaging weight (a weight for each channel) virtual casacore::Matrix<casacore::Float> & imagin...
virtual void next() override
virtual void scan(casacore::Vector< casacore::Int > &scans) const override
Return scan number.
virtual void jonesC(casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > > &) const override
Return feed configuration matrix for specified antenna.
casacore::Matrix< casacore::Complex > vis0_
virtual void writeFlagCategory(const casacore::Array< casacore::Bool > &) override
casacore::MDirection phaseCenter_
Trivial (for now) MDirection, so phaseCenter() has something to return.
std::unique_ptr< casacore::MSSpWindowColumns > spwSubTablecols_p
virtual casacore::String ViiType() const override
Report the the ViImplementation type.
virtual void flag(casacore::Cube< casacore::Bool > &flags) const override
Return flag for each polarization, channel and row.
virtual void visibilityObserved(casacore::Cube< casacore::Complex > &vis) const override
Referenced counted pointer for constant data.
virtual const casacore::Float & parang0(casacore::Double) const override
Return nominal parallactic angle at specified time (does not include feed position angle offset–see f...
virtual casacore::Bool allBeamOffsetsZero() const override
+---------------------—+ | | | Angular casacore::Data Providers | | | +---------------------—+ ...
Fast Square Matrix class with fixed (templated) size.
virtual const vi::SubtableColumns & subtableColumns() const override
Access the current casacore::ROMSColumns object in MSIter – NOT POSSIBLE.
virtual casacore::Int getNMs() const override
A class to provide easy read-only access to MSPointing columns.
virtual casacore::CountedPtr< WeightScaling > getWeightScaling() const override
virtual casacore::Bool isNewFieldId() const override
A class to provide easy read-only access to MSDoppler columns.
virtual casacore::Bool isWritable() const override
virtual casacore::Int msId() const override
reference to actual ms in interator (TRIVIAL returns
std::unique_ptr< casacore::MSAntennaColumns > antennaSubTablecols_p
virtual void visibilityModel(casacore::Cube< casacore::Complex > &vis) const override
virtual const casacore::Vector< casacore::MDirection > & azel(casacore::Double) const override
virtual const SortColumns & getSortColumns() const override
virtual VisBuffer2 * getVisBuffer() const override
virtual Subchunk getSubchunkId() const override
virtual casacore::MDirection azel0(casacore::Double) const override
Return the antenna AZ/EL casacore::Vector (nant)
A class to provide easy read-only access to MSHistory columns.
virtual void writeWeight(const casacore::Matrix< casacore::Float > &) override
Write/modify the weights.
virtual casacore::Vector< casacore::Int > getChannels(casacore::Double time, casacore::Int frameOfReference, casacore::Int spectralWndow=-1, casacore::Int msId=-1) const override
virtual void fieldIds(casacore::Vector< casacore::Int > &) const override
Return the current FieldId.
A Table intended to hold a MeasurementSet POLARIZATION table.
virtual casacore::Int polFrame() const override
Return frame for polarization (returns PolFrame enum)
casacore::MSDataDescription ddSubTable_p
A class to provide easy read-only access to MSDataDesc columns.
virtual void antenna2(casacore::Vector< casacore::Int > &ant2) const override
Return antenna2.
bool Bool
Define the standard types used by Casacore.
virtual casacore::Vector< casacore::Stokes::StokesTypes > getCorrelationTypesSelected() const override
virtual void flagCategory(casacore::Array< casacore::Bool > &) const override
Return flags for each polarization, channel, category, and row.
virtual ViImplementation2 * createInstance(ViImplementation2 *vii0) const
SimpleSimVi2-specific layer-creater.
casacore::MSSpectralWindow spwSubTable_p
virtual void sigmaSpectrum(casacore::Cube< casacore::Float > &wtsp) const override
Return sgimaspectrum (a sigma for each channel)
const casacore::ROMSProcessorColumns & processorSubtablecols() const override
Access to processor subtable.
casacore::Vector< casacore::Float > feedpa_
Trivial (for now) parang.
virtual void corrType(casacore::Vector< casacore::Int > &corrTypes) const override
Return the correlation type (returns casacore::Stokes enums)
virtual void setFrequencySelections(const FrequencySelections &selection) override
Select the channels to be returned.
SimpleSimVi2Parameters & operator=(const SimpleSimVi2Parameters &other)
virtual casacore::String fieldName() const override
Return the current Field Name.
void corruptByParang(casacore::Cube< casacore::Complex > &vis) const
Corrupt by (ad hoc) parang factors.
virtual std::pair< bool, casacore::MDirection > getPointingAngle(int, double) const override
const casacore::ROMSAntennaColumns & antennaSubtablecols() const override
virtual void writeVisModel(const casacore::Cube< casacore::Complex > &) override
virtual casacore::Vector< casacore::Int > getCorrelations() const override
virtual casacore::Int nRowsViWillSweep() const override
casacore::Int nChunk_
Derived parameters.
virtual void writeWeightSpectrum(const casacore::Cube< casacore::Float > &) override
Write/modify the weightMat virtual void writeWeightMat (const casacore::Matrix<casacore::Float> & wt...
virtual ~SimpleSimVi2()
Destructor.
A Table intended to hold astronomical data (a set of Measurements).
virtual void useImagingWeight(const VisImagingWeight &) override
assign a VisImagingWeight object to this iterator
virtual casacore::Bool isNewMs() const override
SimpleSimVi2 & operator=(const SimpleSimVi2 &)=delete
casacore::String polBasis_
virtual casacore::String sourceName() const override
Return the current Source Name.
virtual casacore::MFrequency::Types getObservatoryFrequencyType() const override
virtual casacore::MEpoch getEpoch() const override
virtual casacore::Vector<casacore::MPosition> antennaPositions () const; casacore::MSDerivedValues m...
virtual void antenna1(casacore::Vector< casacore::Int > &ant1) const override
+=========================+ | | | Subchunk casacore::Data Accessors | | | +=========================+...
virtual void origin() override
+==================================+ | | | Iteration Control and Monitoring | | | +==================...
virtual casacore::Bool more() const override
A class to provide easy read-only access to MSObservation columns.
virtual casacore::Int nPolarizationIds() const override
VisBuffer2s encapsulate one chunk of visibility data for processing.
A class to provide easy read-only access to MSPolarization columns.
const casacore::ROMSFieldColumns & fieldSubtablecols() const override
Access to field subtable.
SimpleSimVi2Factory(const SimpleSimVi2Parameters &pars)
casacore::Int iChunk_
Counters.
void initialize(const casacore::Vector< casacore::Int > &nTimePerField, const casacore::Vector< casacore::Int > &nChan, const casacore::Vector< casacore::Double > &refFreq, const casacore::Vector< casacore::Double > &df, const casacore::Matrix< casacore::Float > &stokes, const casacore::Matrix< casacore::Float > &gain, const casacore::Matrix< casacore::Float > &tsys)
A class to provide easy read-only access to MSFeed columns.
const casacore::ROMSDopplerColumns & dopplerSubtablecols() const override
Access to doppler subtable.
VisibilityIterator2 iterates through one or more readonly MeasurementSets.
virtual casacore::Bool weightSpectrumExists() const override
Determine whether WEIGHT_SPECTRUM exists.
virtual void setRowBlocking(casacore::Int) override
Set the 'blocking' size for returning data.
virtual void feed1(casacore::Vector< casacore::Int > &fd1) const override
Return feed1.
virtual casacore::String keyChange() const override
Detecting the key change isn't possible (yet?)
const casacore::ROMSFlagCmdColumns & flagCmdSubtablecols() const override
Access to flagCmd subtable.
A class to provide easy read-only access to MSAntenna columns.
virtual casacore::Double hourang(casacore::Double) const override
Return the hour angle for the specified time.
virtual casacore::Int spectralWindow() const override
Return current SpectralWindow.
const casacore::ROMSPointingColumns & pointingSubtablecols() const override
Access to pointing subtable.
String: the storage and methods of handling collections of characters.
virtual void sigma(casacore::Matrix< casacore::Float > &sigmat) const override
Return sigma.
virtual void timeInterval(casacore::Vector< casacore::Double > &ti) const override
Return nominal time interval.
const casacore::ROMSFeedColumns & feedSubtablecols() const override
Access to feed subtable.
casacore::MSPolarization polSubTable_p
virtual void writeFlagRow(const casacore::Vector< casacore::Bool > &) override
Write/modify the flag row column = 0; dimension casacore::Vector (nrow)
virtual void weight(casacore::Matrix< casacore::Float > &wtmat) const override
Return weight.
casacore::Int thisScan_
Meta-info.
virtual const casacore::Cube< casacore::Double > & receptorAngles() const override
Return receptor angles for all antennae and feeds First axis of the cube is a receptor number...
#define SSVi2NotPossible()
SimpleSimVi2Parameters()
Default ctor (sets default values, useful for self-testing)
casacore::Matrix< casacore::Float > tsys_
virtual casacore::String msName() const override
Name of the MS in the interator.
virtual casacore::Int polarizationId() const override
Return current Polarization Id.
virtual casacore::Bool flagCategoryExists() const override
Determine whether FLAG_CATEGORY is valid.
virtual casacore::Int dataDescriptionId() const override
Return current DataDescription Id.
Abstract base class for Record classes.
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
casacore::Matrix< casacore::Float > gain_
casacore::Vector< casacore::Int > nTimePerField_
virtual void time(casacore::Vector< casacore::Double > &t) const override
Return MJD midpoint of interval.
virtual void setInterval(casacore::Double) override
casacore::Vector< casacore::Float > wt0_
A class to provide easy read-only access to MSFlagCmd columns.
~SimpleSimVi2Parameters()
A class to provide easy read-only access to MSSysCal columns.
virtual casacore::Bool moreChunks() const override
casacore::Vector< casacore::Double > refFreq_
const SimpleSimVi2Parameters pars_
Store a copy of the parameters.
virtual void flag(casacore::Matrix< casacore::Bool > &) const override
Return flag for each channel & row.
virtual void spectralWindows(casacore::Vector< casacore::Int > &spws) const override
virtual void timeCentroid(casacore::Vector< casacore::Double > &t) const override
Return MJD centroid of interval.
virtual const casacore::Vector< casacore::Float > & feed_pa(casacore::Double t) const override
Return feed parallactic angles casacore::Vector (nant) (1 feed/ant)
virtual void processorId(casacore::Vector< casacore::Int > &procids) const override
Return the PROCESSOR_IDs.
virtual void writeModel(const casacore::RecordInterface &, casacore::Bool, casacore::Bool) override
Write/modify the ncorr x nrow SigmaMat.
virtual void weightSpectrum(casacore::Cube< casacore::Float > &wtsp) const override
Return weightspectrum (a weight for each channel)
const casacore::ROMSFreqOffsetColumns & freqOffsetSubtablecols() const override
Access to freqOffset subtable.
A Table intended to hold a MeasurementSet SPECTRAL_WINDOW table.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
virtual void dataDescriptionIds(casacore::Vector< casacore::Int > &ddis) const override