In practice, when AST is asked to find a conversion between two Frames describing two different coordinate systems on a given physical domain, it uses an intermediate “alignment” system. Thus, when finding a conversion from system A to system B, AST first finds the MappingMapping from system A to some alignment system, system C, and then finds the Mapping from this system C to the required system B. It finally concatenates these two Mappings to get the Mapping from system A to system B.
One advantage of this is that it cuts down the number of conversion
algorithms required. If there are different Systems which may be used
to describe positions within the DomainDomain, then this approach requires
about
conversion algorithms to be written. The alternative approach
of going directly from system A to system B would require about
conversion algorithms.
In addition, the use of an intermediate alignment system highlights the nature of the conversion process. What do we mean by saying that a Mapping “converts a position in one coordinate system into the corresponding position in another”? In practice, it means that the input and output coordinates correspond to the same coordinates in some third coordinate system. The choice of this third coordinate system, the “alignment” system, can completely alter the nature of the Mapping. The FrameFrame class has an attribute called AlignSystemAlignSystem which can be used to specify the alignment system.
As an example, consider the case of aligning two spectra calibrated in radio velocity, but each with a different rest frequency (each spectrum will be described by a SpecFrameSpecFrame). Since the rest frequencies differ, a given velocity will correspond to different frequencies in the two spectra. So when we come to “align” these two spectra (that is, find a Mapping which converts positions in one SpecFrame to the corresponding positions in the other), we have the choice of aligning the frequencies or aligning the velocities. Different Mappings will be required to describe these two forms of alignment. If we set AlignSystem to “Freq” then the returned Mapping will align the frequencies described by the two SpecFrames. On the other hand, if we set AlignSystem to “Vradio” then the returned Mapping will align the velocities.
Some choices of alignment system are redundant. For instance, in the above example, changing the alignment system from frequency to wavelength has no effect on the returned Mapping: if two spectra are aligned in frequency they will also be aligned in wavelength (assuming the speed of light doesn't change).
The default value for AlignSystem depends on the class of Frame. For a SpecFrame, the default is wavelength (or equivalently, frequency) since this is the system in which observations are usually made. The SpecFrame class also has an attribute called AlignStdOfRestAlignStdOfRest which allows the standard of rest of the alignment system to be specified. Similarly, the TimeFrameTimeFrame class has an attribute called AlignTimeScaleAlignTimeScale which allows the time scale of the alignment system to be specified. Currently, the SkyFrameSkyFrame uses ICRS as the default for AlignSystem, since this is a close approximation to an inertial frame of rest.