|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
[fitsbits] WCSLIB 3.5
Greetings, WCSLIB 3.5 is now available from http://www.atnf.csiro.au/~mcalabre. Although the change notes (appended) are fairly lengthy, the main developments are that of a new FITS WCS parser for image headers, and the extension of the wcsprm struct to include all WCS keywords defined in Papers I, II, & III. A FORTRAN wrapper is provided for the parser. The parser accepts a complete FITS header in a character array as may conveniently be extracted by fits_hdr2str() in the latest release of CFITSIO. However, note that in CFITSIO 2.490, line 2541 of getkey.c must be changed from realloc(header, (*nkeys *80) + 1); to realloc(*header, (*nkeys *80) + 1); This will be fixed in the next release. A version of the parser that understands BINTABLE WCS keywords will be produced in future. Mark Calabretta ATNF WCSLIB version 3.5 (2004/06/28) ------------------------------- * WCSLIB now provides a function, wcspih() implemented as a Flex description, that parses a FITS image header, either that of a primary HDU or an image extension. Given a character array containing the header it identifies and reads all WCS cards for the primary coordinate description and up to 26 alternate descriptions and returns this information as an array of wcsprm structs. A service routine, wcsvfree(), is provided to free the memory allocated by wcspih(). The relevant header file for these functions is wcshdr.h. Test programs, tpih1 and tpih2, are provided to verify wcspih. The first simply prints the contents of the structs using wcsprt(). The second uses cpgsbox() to draw coordinate graticules. A FITS WCS test header has been developed to provide input to these test programs. It is implemented as a list of card images, wcs.cards, one card per line, together with a program, tofits, that compiles these into a valid FITS file. tpih1 uses its own code to read this, whereas tpih2 uses the fits_hdr2str() function from CFITSIO. * Removed twcsprt, tpih exercises wcsprt() much more thoroughly than twcsprt ever did. Modified twcs1 to print the size of the various structs as twcsprt used to. * Although they are not used in any coordinate calculations, the wcsprm struct now provides data members for storing all of the auxiliary FITS WCS header cards defined in Papers I, II, and III, such as WCSNAMEa, EQUINOXa, and CNAMEia. Members are also provided for storing the alternate descriptor code (the "a" in CTYPEia), and the binary table column number. These are supported by the high level WCSLIB routines, wcsini(), wcscopy(), wcsfree(), and wcsprt(). Refer to wcs.h for details. * The number of PVi_ma cards for which wcsini() allocates memory is now set by a global variable, NPVMAX (previously a C-preprocessor macro). This defaults to 64 but may be changed by a new function, wcsnpv(). The wcsprm struct contains a new member, npvmax, that records the value of this number at the time the struct was initialized. This is in addition to npv which records the actual number of cards that were encountered. Similarly, NPSMAX (default 8) is used for the number of PSi_ma cards, and it may be changed via wcsnps(). The axis number, i, in the pvcard struct used for storing PVi_ma cards may now be set to 0 to indicate the latitude axis. * calloc() is now used in place of malloc() in allocating memory for arrays, and inclusion of malloc.h has been replaced with stdlib.h for all platforms. wcsfree() checks that wcs.flag != -1 before testing wcs.m_flag when freeing memory allocated by wcsini() in case the struct is uninitialized. Similarly for linfree(). * In prj.h, renamed C-preprocessor macros INI, PRT, SET, X2S and S2X to PRJINI, PRJPRT, PRJSET, PRJX2S and PRJS2X to reduce the likelihood of namespace clashes. Similarly in spc.h. Also, in prj.c, changed the name of helper routine offset() to prjoff() to reduce the likelihood of global namespace conflicts. * In line with bonx2s() and bons2x(), bonset() now recognizes the equatorial case of Bonne's projection as Sanson-Flamsteed, mainly so that the auxiliary information in the prjprm struct more accurately reflects the truth. Modified tcel2 to exercise this by using an equatorial Bonne projection in place of the Hammer-Aitov. * zpns2x() used prj.w[0] for bounds checking, though this had not been set by zpnset() for polynomials of degree N 3. Consequently, bounds checking for N 3 was unreliable (reported by David Berry, STARLINK). * Changed some variable names in tscs2x(), cscx2s(), cscs2x(), qscx2s(), and qscs2x() to match Paper II, and likewise changed some inequality tests in qscs2x() without changing the results. * Minor tidying up of output formatting in prjprt(). * Added the alternate version code to FITS WCS keywords mentioned in comments, e.g. CTYPEi changed to CTYPEia. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[fitsbits] Updated FITS-WCS visualisation page | David Berry | FITS | 4 | March 17th 04 04:09 PM |
[fitsbits] (fwd) Windows Explorer Fits Viewer | Eddie Trimarchi | FITS | 0 | February 24th 04 06:46 PM |
[fitsbits] [fitswcs] WCSLIB 3.3 | Mark Calabretta | FITS | 8 | October 29th 03 06:08 PM |
[fitsbits] [fitswcs] WCSLIB 3.3 | Stephen Walton | FITS | 0 | October 22nd 03 07:38 PM |
[fitsbits] WCSLIB 3.3 | Mark Calabretta | FITS | 0 | October 22nd 03 10:24 AM |