WCSLIB 8.4

Loading...
Searching...
No Matches
Limits

While the FITS WCS standard imposes a limit of 99 on the number of image coordinate axes, WCSLIB has a limit of 32 on the number it can handle – enforced by wcsset(), though allowed by wcsinit(). This arises in wcsp2s() and wcss2p() from the use of the stat[] vector as a bit mask to indicate invalid pixel or world coordinate elements.

In the unlikely event that it ever becomes necessary to handle more than 32 axes, it would be a simple matter to modify the stat[] bit mask so that bit 32 applies to all axes beyond 31. However, it was not considered worth introducing the various tests required just for the sake of pandering to unrealistic possibilities.

In addition, wcssub() has a hard-coded limit of 32 coordinate elements (matching the stat[] bit mask), and likewise for tabs2p() (via a static helper function, tabvox()). While it would be a simple matter to generalise this by allocating memory from the heap, since tabvox() calls itself recursively and needs to be as fast as possible, again it was not considered worth pandering to unrealistic possibilities.