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

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>

List of all members.

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.
LogIOlogSink ()

Private Attributes

MSColumnsmsc_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 ROMSAntennaColumnsantColumns_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< MVBaselinebl_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< DoublephaseDir_p
Double offset_tolerance
 Int subarrayId_p;.
Bool adj_uvw_for_ptg_err

Detailed Description

Generates and inserts the (u, v, w)s of a MS that may or may not already have them. Includes antenna offsets when known.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

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.

Synopsis

(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.

Motivation

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.


Constructor & Destructor Documentation

casa::MSUVWGenerator::MSUVWGenerator ( MSColumns ms_ref,
const MBaseline::Types  bltype,
const Muvw::Types  uvwtype 
)

Constructor.

Parameters:
ms_refReference to the MS's columns.
Postcondition:
- The relative positions for all the antennas in the Antenna table are in bl_an_p.
  • timeRes_p has been conservatively calculated using rough estimates of the maximum baseline length and field of view.

Destructor.


Member Function Documentation

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.

Calculate the uvws for the field IDs in flds that are not -1, and set those phase directions according to phaseDirs.

Parameters:
fldsA 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.

Parameters:
timeCentroidAn epoch, the 'when' characterization.
fldIDThe row number in the FIELD table which gives the phase tracking center.
WSRTConventionIf 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.
Note:
This function only calculates UVWs for a single time and a single phase center. Fields can potentially have multiple phase directions, so be prepared to call this function from within a loop that also takes care of setting timeCentroid and phaseDir.
Warning:
timeCentroid can be initialized like MEpoch timeCentroid(Quantity(<double>, "s"), MEpoch::TAI); but the accuracy is limited since there is no extra precision attribute (see Main table of MS v2).
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).

Parameters:
ant1Row number in the ANTENNA table of the 1st antenna.
feed1Row number in the FEED table of the 1st feed.
ant1Row number in the ANTENNA table of the 2nd antenna.
feed2Row number in the FEED table of the 2nd feed.
uvwThe returned UVW coordinates.

Member Data Documentation

Definition at line 285 of file MSUVWGenerator.h.

Definition at line 175 of file MSUVWGenerator.h.

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.

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.

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.

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.

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.

(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.

Definition at line 216 of file MSUVWGenerator.h.

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.

Definition at line 242 of file MSUVWGenerator.h.

The position of the first antenna.

Definition at line 200 of file MSUVWGenerator.h.

Definition at line 211 of file MSUVWGenerator.h.

Definition at line 227 of file MSUVWGenerator.h.

Referenced by logSink().

the 3 fundamental attributes of the state machine

Definition at line 241 of file MSUVWGenerator.h.

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.

Definition at line 173 of file MSUVWGenerator.h.


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