Note, FrameFrame descriptions created using AST V2.0 will not be readable by
applications linked with earlier versions of AST. This applies to Frame
descriptions created using:
- the ChannelChannel class
- the FitsChanFitsChan class if the NATIVE EncodingEncoding is used
- the astShowastShow function
Applications must be re-linked with AST V2.0 in order to be able to read
Frame descriptions created by AST v2.0.
The following describes the most significant changes which have
occurred in the AST library between versions V1.8-13 and V2.0 (the
current version):
- The default value for the DomainDomain attribute provided by the CmpFrameCmpFrame
class has been changed from “CMP” to a string formed by concatenating
the Domain attributes of the two component Frames, separated by a minus
sign. If both component Domains are blank, then the old default of
“CMP” is retained for the CmpFrame Domain.
- The implementation of the
astWriteastWrite function
within the FitsChan class has been modified. It will now attempt to
produce a set of FITS header cards to describe a FrameSetFrameSet even if the
number of axes in the CurrentCurrent Frames is greater than the number in the
BaseBase Frame (that is, if there are more WCS axes than pixel axes). This
has always been possible with NATIVE encoding, but has not previously
been possible for foreign encodings. The WCSAXES keyword is used to store
the number of WCS axes in the FITS header.
- Another change to the
astWrite function
within the FitsChan class is that the ordering of “foreign” axes
(i.e. CTYPE keywords) is now chosen to make the CD (or PC) matrix
as diagonal as possible - any element of axis transposition is removed by
this re-ordering as recommended in FITS-WCS paper I. Previously the
ordering was determined by the order of the axes in the Current Frame of
the supplied FrameSet. This change does not affect NATIVE encoding.
- Support for spectral coordinate systems has been introduced
throught the addition of two new classes, SpecFrameSpecFrame and SpecMapSpecMap.
The SpecFrame is a 1-dimensional Frame which can be used to describe
positions within an electromagnetic spectrum in various systems
(wavelength, frequency, various forms of velocity, etc.) and referred
to various standards of rest (topocentric, geocentric, heliocentric
LSRK, etc.). The SpecMap is a MappingMapping which can transform spectral
axis values between these various systems and standards of rest. Note,
FitsChans which have a foreign encoding (i.e. any encoding other
than NATIVE) are not yet able to read or write these new classes.
- Facilities have been added to the Frame class which allow
differences in axis units to be taken into account when finding a Mapping
between two Frames. In previous versions of AST, the Unit attribute was a
purely descriptive item intended only for human readers - changing the
value of Unit made no difference to the behaviour of the Frame. As of
version 2.0, the Unit attribute can influence the nature of the Mappings
between Frames. For instance, if the
astFindrame or astConvertastConvert
method is used to find the Mapping between an AxisAxis with Unit set to “m”
and another Axis with Unit set to “km”, then the method will return a
ZoomMapZoomMap which introduces a scaling factor of 0.001 between the two axes.
These facilities assume that units are specified following the rules
included in FITS-WCS paper I (Representation of World
Coordinates in FITS, Greisen & Calabretta).
In order to minimise the risk of breaking existing software, the default
behaviour for simple Frames is to ignore the Unit attribute (i.e.
to retain the previous behaviour). However, the new Frame method
astSetActiveUnitastSetActiveUnit
may be used to “activate” (or deactivate) the new facilities within a
specific Frame. Note, the new SpecFrame class is different to the simple
Frame class in that the new facilities for handling units are always active
within a SpecFrame.
- The SystemSystem and EpochEpoch attributes fo the SkyFrameSkyFrame class have been
moved to the parent Frame class. This enables all sub-classes of Frame
(such as the new SpecFrame class) to share these attributes, and to provide
suitable options for each class.
- The Frame class has a new attribute called AlignSystemAlignSystem, which allows
control over the alignment process performed by the methods
astFindFrameastFindFrame and astConvert.
- The CmpFrame class has been modified so that attributes of a
component Frame can be accessed without needing to extract the Frame first.
To do this, append an axis index to the end of the attribute name. For
instance, if a CmpFrame contains a SpecFrame and a SkyFrame (in that order),
then the StdOfRestStdOfRest attribute of the SpecFrame can be referred to as the
“StdOfRest(1)” attribute of the CmpFrame. Likewise, the EquinoxEquinox attribute
of the SkyFrame can be accessed as the “Equinox(2)” (or equivalently
“Equinox(3)”) attribute of the CmpFrame. The “System(1)” attribute of the
CmpFrame will refer to the System attribute of the SpecFrame, whereas the
“System(2)” and “System(3)” attributes of the CmpFrame will refer to the
System attribute of the SkyFrame (the “System” attribute without an axis
specifier will refer to the System attribute of the CmpFrame as a whole,
since System is an attribute of all Frames, and a CmpFrame is a Frame and
so has its own System value which is independant of the System attributes
of its component Frames).
- The algorithms used by the PlotPlot class for determining when to omit
overlapping axis labels, and the abbreviation of redundant leading fields
within sexagesimal axis labels, have been improved to avoid some anomolous
behaviour in previous versions.
- The curve drawing algorithm used by the Plot class has been
modified to reduce the chance of it “missing” small curve sections,
such as may be produced if a grid line cuts across the plot very close to
a corner. Previously, these missed sections could sometimes result in
axis labels being omitted.
- A new function
(astVersionastVersion)
has been added to return the version of the AST library in use.
- Bugs have been fixed in the Plot class which caused serious problems
when plotting high precision data. These problems could range from the
omission of some tick marks to complete failure to produce a plot.
Programs which are statically linked will need to be re-linked in
order to take advantage of these new facilities.