SDM UVW engine: compute the uvw these being not present in the SDM but required to build casacore::MS main table.
More...
#include <UvwCoords.h>
|
struct | ArrayParam |
| (Sub-)array parameters constraining order and size of the output vector of 3D UVW coords triplets. More...
|
|
|
| UvwCoords (asdm::ASDM *const datasetPtr) |
| Constructor. More...
|
|
| ~UvwCoords () |
| Destructor. More...
|
|
void | uvw_bl (asdm::Tag configDescriptionId, const std::vector< std::vector< asdm::Angle > > &phaseDir, double timeCentroid, Enum< CorrelationModeMod::CorrelationMode > correlationMode, bool reverse, bool autoTrailing, std::vector< casacore::Vector< casacore::Double > > &v_uvw, casacore::MSFieldColumns *msfc_p=0) |
| Determine the baseline-based uvw in case timeCentroid is baseline-based, spw-based and bin-based invariant within a dump (i.e. More...
|
|
void | uvw_bl (asdm::Tag configDescriptionId, const std::vector< std::vector< asdm::Angle > > &phaseDir, const std::vector< double > &v_timeCentroid, Enum< CorrelationModeMod::CorrelationMode > correlationMode, bool reverse, bool autoTrailing, std::vector< casacore::Vector< casacore::Double > > &v_uvw, casacore::MSFieldColumns *msfc_p=0) |
| Determine the baseline-based uvw in case timeCentroid may change vs baseline, spw or bin within a dump. More...
|
|
void | uvw_bl (asdm::MainRow *mainRow, std::vector< std::pair< unsigned int, double > > v_tci, Enum< CorrelationModeMod::CorrelationMode > correlationMode, std::pair< bool, bool > dataOrder, std::vector< casacore::Vector< casacore::Double > > &v_uvw) |
| Determine the baseline-based uvw for a sequence of epochs. More...
|
|
void | uvw_bl (asdm::MainRow *mainRow, std::vector< double > v_timeCentroid, Enum< CorrelationModeMod::CorrelationMode > correlationMode, std::pair< bool, bool > dataOrder, std::vector< casacore::Vector< casacore::Double > > &v_uvw, casacore::MSFieldColumns *msfc_p=0) |
| Determine the baseline-based uvw for a sequence of epochs. More...
|
|
|
std::vector< double > | antPos (const std::vector< double > &stationPos, const std::vector< double > &antOffset) |
| ITRF coordinates of an ITRF point on which is added an offset defined in a ASCS. More...
|
|
void | uvw_an (double timeCentroid, const std::vector< std::vector< asdm::Angle > > &phaseDir, const std::vector< asdm::Tag > &v_antId) |
| Determine antenna-based uvw for every member of the sequence of antennas defining a (sub)array. More...
|
|
void | uvw_bl (const std::vector< asdm::Tag > &v_antennaId, unsigned int nrep, bool reverse, std::vector< casacore::Vector< casacore::Double > > &v_uvw) |
| Determine the baseline-based uvw for a sequence of antenna defining a (sub)array. More...
|
|
SDM UVW engine: compute the uvw these being not present in the SDM but required to build casacore::MS main table.
This UvwCoords class is an engine to determine the UVW coordinates at any time for any antenna (sub)array. It is based on the casacore::Measure classes in CASA and the ASDM classes. It requires as input the casacore::MS timeCentroids item which is an output in the ASDM DAMs.
- Todo:
- apply the chain of offsets for the reference point in the antenna to the position of the station
- correlationMode filter
- Note
- The current limitations are set by the status of the ASDM. Not supported:
- phase direction not in J2000
- OTF due to a limitation in the model of the phase direction item in the field table.
Definition at line 38 of file UvwCoords.h.
UvwCoords::UvwCoords |
( |
asdm::ASDM *const |
datasetPtr | ) |
|
Constructor.
- Parameters
-
datasetPtr | A pointer to a SDM dataset |
- Postcondition
- The following static informations have been set:
- The positions for all the antennas in the Antenna table have been determined by applying the chain of offsets from the IERS station positions
- All the (sub-)arrays present in the ConfigDescription table have been identified
UvwCoords::~UvwCoords |
( |
| ) |
|
std::vector<double> UvwCoords::antPos |
( |
const std::vector< double > & |
stationPos, |
|
|
const std::vector< double > & |
antOffset |
|
) |
| |
|
private |
ITRF coordinates of an ITRF point on which is added an offset defined in a ASCS.
- Parameters
-
stationPos | ITRF position of a station |
antPos | x,y,z offset in the ASCS |
- Returns
- resulting ITRF position by adding the offset
- Note
- The ASCS is the cartesian coordinate system the XY plane behing horizontal and Z defining the the local vertical.
- its X axis points to the East
- its Y axis points to the North direction
- its Z axis is in the direction parallel to the local gravity and points upward.
This method is used to determine the position of the phase reference point in an antenna in IERS by applying the chain of offsets up to the station position which is defined in the IERS. ITRF is also a cartesian coordinates system, its origin at the Earth center of mass, In right-handed frame. X towards the intersection of the equator and the Greenwich meridian, Z towards the pole.
void UvwCoords::uvw_an |
( |
double |
timeCentroid, |
|
|
const std::vector< std::vector< asdm::Angle > > & |
phaseDir, |
|
|
const std::vector< asdm::Tag > & |
v_antId |
|
) |
| |
|
private |
Determine antenna-based uvw for every member of the sequence of antennas defining a (sub)array.
- Parameters
-
timeCentroid | An epoch, the 'when' characterization. |
phaseDir | The (sub)array phase direction |
v_antId | The sequence of antenna identifiers defining the (sub)array |
- Note
- this method is temporary given the fact that the SDM is waiting for its version 2 to implement adequately not only timeCentroid but also phaseDir (will be required for OTF)
- Warning
- The current implementation assumes that
- timeCentroid is MJD in TAI, the unit in second. Futhermore the accuracy is limited because there is no extra precision attribute (see Main table of casacore::MS v2)
- phaseDir is in J2000, the unit of the coordinates in radian
- Todo:
- remove this note and all these warnings (to be coordinated with the release of SDM vers. 2)
Determine the baseline-based uvw in case timeCentroid is baseline-based, spw-based and bin-based invariant within a dump (i.e.
in an integration or a subintegration)
- Parameters
-
configDescriptionId | ConigDescription identifier |
phaseDir | Phase direction assumed to be J2000 |
timeCentroid | casacore::Time centroid (unit second) assumed to be MJD TAI |
correlationMode | Correlation mode defined by the client (a user query) to filter out data. |
reverse | Parameter characterizing the order of the resulting baselines. |
autoTrailing | true if the cross baselines come first, the zero baselines trailing in the output v_uvw sequence |
v_uvw | The returned UVW coordinates for all the pair of antenna and, for each pair, for all the spectral windows and, for each spectral window, for each bin. |
- Warning
- With this method the approximation is made that all these baselines share the same time centroid. This approximation which should be adequate in most of the use-cases is obviously more efficient than when the timCentroid changes from one baseline to the next, this because of blanking, whithin a dump.
- This method will destroy the previous content of v_uvw.
- Note
- The implementation is optimized to avoid to re-compute the uvw when the same antenna (sub-)array is reused for the same timeCentroid and phaseDir in consecutive updates. In practice this means, for ALMA, that when there is one sub-integration per integration the UVW are not determined twice.
Determine the baseline-based uvw in case timeCentroid may change vs baseline, spw or bin within a dump.
- Parameters
-
configDescriptionId | ConigDescription identifier |
phaseDir | Phase direction assumed to be J2000 |
v_timeCentroid | casacore::Sequence of time centroids (unit second) assumed to be MJD TAI. The order of these in the sequence is described by two parameters, the attributes reverse and autoTrailing. |
correlationMode | Correlation mode defined by the client (his/her query) to filter out data. |
reverse | Parameter characterizing the order of the resulting baselines. |
autoTrailing | true if the cross baselines come first, the zero baselines trailing in the output v_uvw sequence |
v_uvw | The returned UVW coordinates for all the pairs of antenna and, for each pair, for all the spectral windows and, for each spectral window, for all the bins. There is a ono-to-one association between the uvw ccordinates and the time centroids v_uvw v_timeCentroid having the same size (the number of casacore::MS rows per SDM row in the Main table) and the same sequence order. |
- Warning
- With this method every baseline,spectral window,bin triplet has its own time centroid. Because this generality is expensive in term of computation, this method must be avoided when the time centroid does not change vs baseline, spw or bin within a dump.
- This method will destroy the previous content of v_uvw.
void UvwCoords::uvw_bl |
( |
asdm::MainRow * |
mainRow, |
|
|
std::vector< std::pair< unsigned int, double > > |
v_tci, |
|
|
Enum< CorrelationModeMod::CorrelationMode > |
correlationMode, |
|
|
std::pair< bool, bool > |
dataOrder, |
|
|
std::vector< casacore::Vector< casacore::Double > > & |
v_uvw |
|
) |
| |
Determine the baseline-based uvw for a sequence of epochs.
- Parameters
-
mainRow | Pointer to a SDM main table row |
v_tci | Indexed sequence of time centroids. Every spectral window, bin, (sub)integration and baseline has a time centroid. This sequence, a vector, is provided by the method timeSequence() in the class SDMBinData. Every element is a pair, the first corresponding to the index in the output sequenve of UVW coordinate triplets and the second the time centroid for the current index in this input vector. |
correlationMode | Correlation mode defined by the client (a use-query) to filter out data. |
dataOrder | A pair of booleans characterizing the order of the time centroids meta-data in the sequence v_timeCentroid. The first member of this pair is for the order of the baselines and the second to tell if the cross-data come first or not relative to the auto data. This dataOrder attribute is available via a static method of the class SDMBinData. |
v_uvw | The returned sequence UVW coordinates. The order in this sequence is controlled by the attributes v_tci and dataOrder. There are two cases:
- the root axis is the natural native TIM axis. In this case for all the pairs of antenna and, for each pair, for all the spectral windows and, for each spectral window, for each bin. This case is encountered when the method setPriorityDataDescription() in the class SDMBinData has not been used.
- the root axis is a spectralWindow axis. In this case the order in the sequence is for all the spectral windows and, for each spectral window, for each bin, for all (sub)integration and, for each (sub)integration, for all the pair of antenna and, for each pair. This case is encountered when the method setPriorityDataDescription() in the class SDMBinData has been used.
|
Whatever the case the returned size will be equal to the size of the input sequence defined by v_ci.
- Warning
- This function will destroy the previous content of v_uvw.
- Note
- correlationMode must be identical to the one used with the DAMs.
- v_tci is a product of the DAMs. Its size is the number of casacore::MS rows per SDM row in the Main tables. It is available using the method timeSequence() of the DAMs (SDMBinData).
- for dataOrder (reverse and autoTrailing) it is available using a static method of the DAMs (SDMBinData).
Determine the baseline-based uvw for a sequence of epochs.
- Parameters
-
mainRow | Pointer to a SDM main table row |
v_timeCentroid | casacore::Time centroid for every (sub)integration, baseline, spectral window and bin |
correlationMode | Correlation mode defined by the client (a use-query) to filter out data. |
dataOrder | A pair of booleans characterizing the order of the time centroids meta-data in the sequence v_timeCentroid. The first member of this pair is for the order of the baselines and the second to tell if the cross-data come first or not relative to the auto data. This dataOrder attribute is available via a static method of the class SDMBinData. |
v_uvw | The returned sequence UVW coordinates for all the pair of antenna and, for each pair, for all the spectral windows and, for each spectral window, for each bin. Hence the returned size will be equal to the size of the input sequence v_timeCentroid. |
- Warning
- This function will destroy the previous content of v_uvw. Note that this method must be used only if the natural (native) TIM axis has been kept to define the root of the axis hierarchy. In that case it is more efficient than when the timeCentroid sequence is defined in a map.
- Note
- correlationMode must be identical to the one used with the DAMs.
- v_timeCentroid is a product of the DAMs. Its size is the number of casacore::MS rows per SDM row in the Main tables
- for dataOrder (reverse and autoTrailing) it is available using a static method of the DAMs (SDMBinData).
Determine the baseline-based uvw for a sequence of antenna defining a (sub)array.
- Parameters
-
v_antennaId | The sequence of antenna identifiers defining the (sub)array |
nrep | The number of repeats per baseline (i.e. SUM_k(nstep_k) where k is the spectral window index ) In case of no BIN axis nstep_k=1 and this sum is simply equal to the number of spectral windows. |
reverse | Parameter charcterising the order of the baselines. Let consider v_antennaId={1,2,3,4}.
- With reverse=true the resulting order is (1,2) (1,3) (2,3) (1,4) (2,4) and (3,4)
- with reverse=false the resulting order is (1,2) (1,3) (1,4) (2,3) (2,4) and (3,4)
|
v_uvw | The resulting sequence of uvw 'points' |
- Note
- A resulting baseline is defined using the first member of the pair as a the reference and the second as relative. The pair (a,b) means a |-—> b i.e. u_ab = u_b - u_a.
- The SDM BDF is defined with reverse=true. The current implementation of the DAM produces a sequence corresponding to reverse=false.
- Warning
- This function will destroy the previous content of v_uvw.
std::vector<std::vector<asdm::Angle> > UvwCoords::phaseDir_ |
|
private |
double UvwCoords::timeCentroid_ |
|
private |
the 3 fundamental attributes of the state machine
Definition at line 224 of file UvwCoords.h.
The documentation for this class was generated from the following file: