We can illustrate an important point if we swap the axis order of either SkyFrameSkyFrame in the example above (§12.1) before identifying the conversion. Let's assume we use astPermAxesastPermAxes (§7.9) to do this to the second SkyFrame, before applying astConvertastConvert, as follows:
Now, the destination SkyFrame system no longer represents the coordinate system:
(ecliptic longitude, ecliptic latitude)
but instead represents the transposed system:
(ecliptic latitude, ecliptic longitude)
As a consequence, when we use the FrameSetFrameSet returned by astConvert to apply a coordinate transformation, we obtain something like the following:
When compared to the original (§12.1), the output coordinate order has been swapped to compensate for the different destination SkyFrame axis order.
In all, there are four possible axis combinations, corresponding to two possible axis orders for each of the source and destination SkyFrames, and astConvert will convert correctly between any of these. The point to note is that a SkyFrame contains knowledge about how to convert to and from other SkyFrames. Since its two axes (longitude and latitude) are distinguishable, the conversion is able to take account of the axis order.
If you need to identify the axes of a SkyFrame explicitly, taking into account any axis permutations, the LatAxisLatAxis and LonAxisLonAxis attributes can be used. These are read-only attributes which give the indices of the latitude and longitude axes respectively.