casa
5.7.0-16
|
Generates and inserts the (u, v, w)s of a casacore::MS that may or may not already have them. Includes antenna offsets when known. More...
#include <MSUVWGenerator.h>
Public Member Functions | |
MSUVWGenerator (casacore::MSColumns &ms_ref, const casacore::MBaseline::Types bltype, const casacore::Muvw::Types uvwtype) | |
Constructor. More... | |
~MSUVWGenerator () | |
Destructor. More... | |
void | uvw_bl (const casacore::uInt ant1, const casacore::uInt feed1, const casacore::uInt ant2, const casacore::uInt feed2, casacore::Array< casacore::Double > &uvw) |
Determine the uvw for a single phaseDir and timeCentroid, and pair of feeds (which may be the same). More... | |
casacore::Bool | make_uvws (const casacore::Vector< casacore::Int > flds) |
Calculate the uvws for the field IDs in flds that are not -1, and set those phase directions according to phaseDirs. More... | |
Private Member Functions | |
void | fill_bl_an (casacore::Vector< casacore::MVBaseline > &bl_an_p) |
Sets up the antenna positions as baselines (bl_an_p), the number of antennas (nant_p), and timeRes_p. More... | |
void | uvw_an (const casacore::MEpoch &timeCentroid, const casacore::Int fldID, const casacore::Bool WSRTConvention=false) |
Determine antUVW_p for every member of the sequence of antennas defining a (sub)array. More... | |
casacore::LogIO & | logSink () |
Private Attributes | |
casacore::MSColumns & | msc_p |
(Sub-)array parameters constraining order and size of the output vector of UVW coords triplets. More... | |
casacore::MBaseline::Ref | bl_csys_p |
casacore::Coordinate system selectors. More... | |
const casacore::ROMSAntennaColumns & | antColumns_p |
const casacore::ROScalarMeasColumn < casacore::MPosition > & | antPositions_p |
The antenna positions of ms_p in ITRF. More... | |
const casacore::ROScalarMeasColumn < casacore::MPosition > & | antOffset_p |
The offsets between the phase reference point (see feed_offsets below for clarification) of each antenna and the closest point which is fixed relative to the antenna position (i.e. More... | |
casacore::MPosition | refpos_p |
The position of the first antenna. More... | |
const casacore::ROScalarMeasColumn < casacore::MPosition > & | feedOffset_p |
Ditto for feed. More... | |
casacore::MBaseline::Types | refposref_p |
casacore::Vector < casacore::MVBaseline > | bl_an_p |
The antenna positions - refpos_p.getValue(). More... | |
casacore::uInt | nant_p |
casacore::Double | timeRes_p |
The minimum time difference for forcing an update of the UVWs. More... | |
casacore::LogIO | sink_p |
casacore::Vector < casacore::Vector < casacore::Double > > | antUVW_p |
map<Tag, ArrayParam> m_array_p; // FIX: Tag More... | |
casacore::ArrayColumn < casacore::Double > | phaseDir_p |
the 3 fundamental attributes of the state machine More... | |
Generates and inserts the (u, v, w)s of a casacore::MS that may or may not already have them. Includes antenna offsets when known.
Public interface
It generates a UVW column for the casacore::MS, whether or not it already has one. It is an adaptation of alma/apps/asdm2MS/UvwCoords to work with MSes instead of ASDMs.
(u, v, w)s are needed for imaging, but some data sets may not come with them included, or the (u, v, w)s may need correction.
Currently (10/30/2008), ASDMs from either the ALMA Test Facility or the EVLA do not come with (u, v, w)s, and need to be processed with the UVFIX task in AIPS. It would be preferable to process them entirely inside CASA.
Definition at line 88 of file MSUVWGenerator.h.
casa::MSUVWGenerator::MSUVWGenerator | ( | casacore::MSColumns & | ms_ref, |
const casacore::MBaseline::Types | bltype, | ||
const casacore::Muvw::Types | uvwtype | ||
) |
Constructor.
ms_ref | Reference to the casacore::MS's columns. |
casa::MSUVWGenerator::~MSUVWGenerator | ( | ) |
Destructor.
|
private |
Sets up the antenna positions as baselines (bl_an_p), the number of antennas (nant_p), and timeRes_p.
|
inlineprivate |
Definition at line 230 of file MSUVWGenerator.h.
References sink_p.
casacore::Bool casa::MSUVWGenerator::make_uvws | ( | const casacore::Vector< casacore::Int > | flds | ) |
Calculate the uvws for the field IDs in flds that are not -1, and set those phase directions according to phaseDirs.
flds | A map from row numbers in the FIELD table to indices in phaseDirs. For example, if the casacore::MS has 5 fields, and the user wants to (re)calculate the UVWs of only 0, 2, and 4, phaseDirs will have 3 entries and flds will be [0, -1, 1, -1, 2]. |
|
private |
Determine antUVW_p for every member of the sequence of antennas defining a (sub)array.
timeCentroid | An epoch, the 'when' characterization. |
fldID | The row number in the FIELD table which gives the phase tracking center. |
WSRTConvention | If true (WSRT only?), the l in the ul + vm phase calculation decreases toward increasing RA. If false (VLA), it increases with increasing RA. See the code for more info. |
void casa::MSUVWGenerator::uvw_bl | ( | const casacore::uInt | ant1, |
const casacore::uInt | feed1, | ||
const casacore::uInt | ant2, | ||
const casacore::uInt | feed2, | ||
casacore::Array< casacore::Double > & | uvw | ||
) |
Determine the uvw for a single phaseDir and timeCentroid, and pair of feeds (which may be the same).
ant1 | Row number in the ANTENNA table of the 1st antenna. |
feed1 | Row number in the FEED table of the 1st feed. |
ant1 | Row number in the ANTENNA table of the 2nd antenna. |
feed2 | Row number in the FEED table of the 2nd feed. |
uvw | The returned UVW coordinates. |
|
private |
Definition at line 177 of file MSUVWGenerator.h.
|
private |
The offsets between the phase reference point (see feed_offsets below for clarification) of each antenna and the closest point which is fixed relative to the antenna position (i.e.
an axis). Since no one else has defined it yet, I am defining it as the offset when the antenna is pointing at zenith, oriented so that if it slewed down, it would move toward the north. (x, y, z) = (east, north, up).
This appears to be a required column of the ANTENNA table in version 2.0 of the casacore::MeasurementSet definition (http://aips2.nrao.edu/docs/notes/229/229.html), so it is assumed to be present. However, it is usually a set of zeroes, based on the common belief that it is only needed for heterogeneous arrays, since the receivers of homogeneous arrays move in concert. That is not true when there are independent pointing errors.
Definition at line 199 of file MSUVWGenerator.h.
|
private |
The antenna positions of ms_p in ITRF.
It cannot be const because of the need to update satellite positions. antPositions_p and antOffset_p are references and must therefore be initialized in the initialization list.
Definition at line 183 of file MSUVWGenerator.h.
|
private |
map<Tag, ArrayParam> m_array_p; // FIX: Tag
The UVW "positions" of each antenna being used during a time bin, i.e. the (u, v, w) of the baseline between antennas m and n is antUVW_p[n] - antUVW_p[m].
Definition at line 240 of file MSUVWGenerator.h.
|
private |
The antenna positions - refpos_p.getValue().
Definition at line 216 of file MSUVWGenerator.h.
|
private |
casacore::Coordinate system selectors.
Definition at line 175 of file MSUVWGenerator.h.
|
private |
Ditto for feed.
const casacore::ROMSFeedColumns *feedColumns_;
The offset between the feed and the phase reference point of each antenna in the same frame as ant_offsets. Therefore the feed position is ant_positions_p(ant) + [rotation matrix](pointing) (ant_offsets_p[ant] + feed_offsets_p[ant])
Definition at line 211 of file MSUVWGenerator.h.
|
private |
(Sub-)array parameters constraining order and size of the output vector of UVW coords triplets.
struct ArrayParam{ public: casacore::Int subarrayId; // (sub)array identifier vector<Tag> v_ant; //<! sequence of antennas unsigned int nrepeat; //<! number of casacore::MS main table rows per antenna baseline Enum<CorrelationMode> e_correlationMode; //<! correlation mode (original mode passed through the user filter) (FOLLOWUP: is this needed?) string show(){ ostringstream os; os << " nrepeat " << nrepeat; return os.str(); } };
Member variables ******************************** Initialized by ctor, ****************************** so they should appear ****************************** here in the same order ****************************** as they do in the ctor. ******************************
Definition at line 172 of file MSUVWGenerator.h.
|
private |
Definition at line 218 of file MSUVWGenerator.h.
|
private |
the 3 fundamental attributes of the state machine
Definition at line 243 of file MSUVWGenerator.h.
|
private |
The position of the first antenna.
Definition at line 202 of file MSUVWGenerator.h.
|
private |
Definition at line 213 of file MSUVWGenerator.h.
|
private |
Definition at line 229 of file MSUVWGenerator.h.
Referenced by logSink().
|
private |
The minimum time difference for forcing an update of the UVWs.
We're not trying to do time averaging here, so it should be small, but not so small that uvw_an() is called for every baseline, even when the times are practically the same.
Definition at line 224 of file MSUVWGenerator.h.