The constructors need an input MDirection to specify the input UVW coordinates reference direction and coordinate system. An EW flag can be specified to indicate the different type of UVW coordinates. I.e. projection along polar axis rather than towards observing direction (not implemented yet). A project flag, if set, will re-project the resulting UV plane onto the in-direction reference plane.
The constructors also need an output coordinate system (MDirection::Ref) or an output MDirection (including the reference coordinate system). The first case indicates that the real position on the sky does not change (only the coordinate system used); the second indicates that the UVW should be for a new position on the sky (in addition to maybe a different coordinate system). In the first case only the UVW coordinates will change, in the second the UVW positions will change, but also the phase of the observed data will have to change. For some conversions a reference frame is needed (to indicate e.g. the position or time). This frame can be part of one of the constructor references, but can also be specified separately in the constructor. A change in the frame parameter can be made outside the UVWMachine by e.g. frame.reset(anMEpoch).
If the frame is changed by the user of the conversion machine, the machine has to be reinitialised before using it for output by using reCalculate().Projection entails a rotation. For changes to a fixed frame (i.e. not changing with e.g. time), the rotation matrix is calculated only once. In other cases it has to be calculated per series of uvw conversions. The latter case can hence be time consuming.
If either the input or output direction/reference specifies a planet, action is special. Planets are assumed to be in J2000 positions, since that is the only way to carry them from conversion to conversion (and also have a variable phase-center; which can, btw, always be obtained by the phaseCenter() member).If no explicit output coordinate is given (i.e. no phase shift necessary), and the conversion from input to output is an essential NOP, and no reprojection to the input plane is required, the machine will bypass all calculations. This state can be inspected by the isNOP() method.
Note that a reCalculate() is necessary between calls of the engine, since the planetary position will change from time to time (i.e. with the Frame).
If you want to convert to say an azimuth/elevation map of the Sun, this can be done to have either two conversion engines (original to Sun, then Sun to AzEl), or by conversion of the Sun to AzEl before entering the engine. The output of the machine is either a set of rotation matrices that can be used to convert UVW coordinates (and, if necessary, phases); or the UVW conversion and actual phase can be calculated from a given UVW coordinate (or set of coordinates).
Since e.g. in an EW interferometer (or any set of baselines on a line) the phase correction and UVW transform scales with the length of the baseline, conversion of a nominal (say 1m) baseline suffices to easily calculate others. The same is true for baselines in a plane, where a conversion of two orthogonal baselines in that plane will suffice.
// Given a current phase stopping Center MDirection indir(Quantity(3.25745692, "rad"), Quantity(0.040643336,"rad"), MDirection::Ref(MDirection::B1950)); // Conversion to J2000 is set by: UVWMachine uvm(MDirection::Ref(MDirection::J2000), indir); // The rotation matrix to go to new UVW is obtained by: RotMatrix rm(uvm.rotationUVM()); // If an UVW specified: MVPosition uvw(-739.048461, -1939.10604, 1168.62562); // This can be converted by e.g.: uvw *= rm; // Or, alternatively, by e.g.: uvm.convertUVW(uvw);
Construct a UVW conversion machine from the in coordinate and its system to the out coordinate system (output absolute direction remains the same)
Construct a UVW conversion machine from the in coordinate and its system to the out coordinate and its system
Return converted UVW coordinates
Return the new phase center coordinates
Recalculate the parameters for the machine after e.g. a frame change
default constructor: not implemented
Initialise machinery