casa
$Rev:20696$
|
Generates and inserts the (u, v, w)s of a MS that may or may not already have them. Includes antenna offsets when known. More...
#include <MSUVWGenerator.h>
Public Member Functions | |
MSUVWGenerator (MSColumns &ms_ref, const MBaseline::Types bltype, const Muvw::Types uvwtype) | |
Constructor. | |
~MSUVWGenerator () | |
Destructor. | |
void | uvw_bl (const uInt ant1, const uInt feed1, const uInt ant2, const uInt feed2, Array< Double > &uvw) |
Determine the uvw for a single phaseDir and timeCentroid, and pair of feeds (which may be the same). | |
Bool | make_uvws (const Vector< Int > flds) |
Calculate the uvws for the field IDs in flds that are not -1, and set those phase directions according to phaseDirs. | |
Private Member Functions | |
void | fill_bl_an (Vector< MVBaseline > &bl_an_p) |
Sets up the antenna positions as baselines (bl_an_p), the number of antennas (nant_p), and timeRes_p. | |
void | uvw_an (const MEpoch &timeCentroid, const Int fldID, const Bool WSRTConvention=false) |
Determine antUVW_p for every member of the sequence of antennas defining a (sub)array. | |
LogIO & | logSink () |
Private Attributes | |
MSColumns & | msc_p |
(Sub-)array parameters constraining order and size of the output vector of UVW coords triplets. | |
MBaseline::Ref | bl_csys_p |
Coordinate system selectors. | |
Muvw::Types | uvw_csys_p |
const ROMSAntennaColumns & | antColumns_p |
const ROScalarMeasColumn < MPosition > & | antPositions_p |
The antenna positions of ms_p in ITRF. | |
const ROScalarMeasColumn < 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. | |
MPosition | refpos_p |
The position of the first antenna. | |
const ROScalarMeasColumn < MPosition > & | feedOffset_p |
Ditto for feed. | |
MBaseline::Types | refposref_p |
Vector< MVBaseline > | bl_an_p |
The antenna positions - refpos_p.getValue(). | |
uInt | nant_p |
Double | timeRes_p |
The minimum time difference for forcing an update of the UVWs. | |
LogIO | sink_p |
Vector< Vector< Double > > | antUVW_p |
map<Tag, ArrayParam> m_array_p; // FIX: Tag | |
Double | timeCentroid_p |
the 3 fundamental attributes of the state machine | |
ROArrayColumn< Double > | phaseDir_p |
Double | offset_tolerance |
Int subarrayId_p;. | |
Bool | adj_uvw_for_ptg_err |
Generates and inserts the (u, v, w)s of a MS that may or may not already have them. Includes antenna offsets when known.
Public interface
It generates a UVW column for the 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 85 of file MSUVWGenerator.h.
casa::MSUVWGenerator::MSUVWGenerator | ( | MSColumns & | ms_ref, |
const MBaseline::Types | bltype, | ||
const Muvw::Types | uvwtype | ||
) |
Constructor.
ms_ref | Reference to the MS's columns. |
Destructor.
void casa::MSUVWGenerator::fill_bl_an | ( | Vector< MVBaseline > & | bl_an_p | ) | [private] |
Sets up the antenna positions as baselines (bl_an_p), the number of antennas (nant_p), and timeRes_p.
LogIO& casa::MSUVWGenerator::logSink | ( | ) | [inline, private] |
Definition at line 228 of file MSUVWGenerator.h.
References sink_p.
Bool casa::MSUVWGenerator::make_uvws | ( | const Vector< 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 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]. |
void casa::MSUVWGenerator::uvw_an | ( | const MEpoch & | timeCentroid, |
const Int | fldID, | ||
const Bool | WSRTConvention = false |
||
) | [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 uInt | ant1, |
const uInt | feed1, | ||
const uInt | ant2, | ||
const uInt | feed2, | ||
Array< 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. |
Definition at line 285 of file MSUVWGenerator.h.
const ROMSAntennaColumns& casa::MSUVWGenerator::antColumns_p [private] |
Definition at line 175 of file MSUVWGenerator.h.
const ROScalarMeasColumn<MPosition>& casa::MSUVWGenerator::antOffset_p [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 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 197 of file MSUVWGenerator.h.
const ROScalarMeasColumn<MPosition>& casa::MSUVWGenerator::antPositions_p [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 181 of file MSUVWGenerator.h.
Vector<Vector<Double> > casa::MSUVWGenerator::antUVW_p [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 238 of file MSUVWGenerator.h.
Vector<MVBaseline> casa::MSUVWGenerator::bl_an_p [private] |
The antenna positions - refpos_p.getValue().
Definition at line 214 of file MSUVWGenerator.h.
Coordinate system selectors.
Definition at line 172 of file MSUVWGenerator.h.
const ROScalarMeasColumn<MPosition>& casa::MSUVWGenerator::feedOffset_p [private] |
Ditto for feed.
const 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 209 of file MSUVWGenerator.h.
MSColumns& casa::MSUVWGenerator::msc_p [private] |
(Sub-)array parameters constraining order and size of the output vector of UVW coords triplets.
struct ArrayParam{ public: Int subarrayId; // (sub)array identifier vector<Tag> v_ant; //<! sequence of antennas unsigned int nrepeat; //<! number of 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 169 of file MSUVWGenerator.h.
uInt casa::MSUVWGenerator::nant_p [private] |
Definition at line 216 of file MSUVWGenerator.h.
Double casa::MSUVWGenerator::offset_tolerance [private] |
Int subarrayId_p;.
The number of wavelengths by which a feed may move relative to the corresponding feed in another antenna of the array without requiring the offset to be included in uvw calculations. If < 0 the offset will always be included.
Offsets include: ant_offset: OFFSET in the ANTENNA table of an MS. The separation between an antenna's "phase reference point" and its closest point (usu. an axis) fixed rel to its position.
feed_offset: POSITION in the FEED table of an MS. The separation between a feed and ant_pos + ant_offset. Just another offset to add to ant_offset, but unlike ant_offset it is likely to change when the band is changed.
rec_offset: Not found in MSes, acc. to vers. 2 of of the MeasurementSet definition (http://aips2.nrao.edu/docs/notes/229/229.html). The separation between a receptor and its feed. Only needed for feed arrays. The above URL defines a feed (incl. feed arrays) as a set of receptors that should be calibrated as a single entity. Predicting how observers will decide to calibrate feed arrays is difficult, especially since there are no interferometers with feed arrays yet, but it can be argued that rec_offset can be ignored in many cases. If a feed array's output is combined before leaving the feed (i.e. a beamforming array), it may as well be treated as a single feed. If the receptor outputs are kept separate longer, they likely need to be calibrated separately and get their own FEED tables.
They affect how the baselines of heterogeneous arrays vary with phase tracking direction, and make the baselines of any array depend on pointing errors. The latter effect is often neglected, and the offsets are written as sets of zeroes, even though they really are not.
Definition at line 282 of file MSUVWGenerator.h.
ROArrayColumn<Double> casa::MSUVWGenerator::phaseDir_p [private] |
Definition at line 242 of file MSUVWGenerator.h.
MPosition casa::MSUVWGenerator::refpos_p [private] |
The position of the first antenna.
Definition at line 200 of file MSUVWGenerator.h.
Definition at line 211 of file MSUVWGenerator.h.
LogIO casa::MSUVWGenerator::sink_p [private] |
Definition at line 227 of file MSUVWGenerator.h.
Referenced by logSink().
Double casa::MSUVWGenerator::timeCentroid_p [private] |
the 3 fundamental attributes of the state machine
Definition at line 241 of file MSUVWGenerator.h.
Double casa::MSUVWGenerator::timeRes_p [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 222 of file MSUVWGenerator.h.
Muvw::Types casa::MSUVWGenerator::uvw_csys_p [private] |
Definition at line 173 of file MSUVWGenerator.h.