[fitsbits] WCSLIB 4.1

Mark Calabretta mcalabre at atnf.CSIRO.AU
Wed Aug 31 01:14:53 EDT 2005


Greetings,

WCSLIB 4.1 is now available from http://www.atnf.csiro.au/~mcalabre.

This release contains much added functionality, particularly for parsing
FITS headers and constructing coordinate systems from them, including a
full implementation of -TAB coordinates (Paper III); units conversion
(Paper I); and translation of non-standard constructs.  The README file
now provides an introduction and overview of the library for new
programmers, and as previously, all functions are fully documented in
the header files.

In summary, FITS WCS Papers I, II, and III are now fully implemented in
WCSLIB 4.1 except for:

   1) Parsing of WCS cards for image arrays in binary tables and for
      pixel lists (Paper I, Sect. 3).

   2) VELANGLa (Paper III, Appendix A).

Change notes for the C library are appended.  The first part of this
provides a summary of the main changes.

Mark Calabretta
ATNF

>>>

WCSLIB version 4.1 (2005/08/31)
-------------------------------

Summary of added functionality:

  + -TAB coordinate axes are now fully implemented in the WCSLIB driver
    functions (in wcs.{h,c}); multiple -TAB axes are supported.  A new
    function, wcstab(), which is automatically invoked by wcspih(), parses
    -TAB-related header cards and sets up structs for a separate routine
    that reads the necessary arrays from a FITS binary table extension.

    An implementation of this routine in CFITSIO, fits_read_wcstab(), is
    provided.  Note however that the interface of this function is
    experimental, and the code itself must be considered beta-release in
    WCSLIB 4.1.

  + Units specifications, either from CNAMEia or inline comments (with
    brackets), of arbitrary complexity are now fully implemented via a parser,
    wcsulex(), and converter, wcsunits().  This is invoked automatically by
    wcsset().
    
  + Translators for non-standard WCS constructs are provided.  These cover
    date formats, units specifications, defunct celestial projection types,
    AIPS spectral axis types, and the repair of malformed cylindrical
    coordinate systems.

  + wcspih() now has options to remove the WCS cards it has processed from the
    header and a new generic FITS header parser, fitshdr(), may be used to
    parse the remaining non-WCS cards.  In addition to the more basic types,
    it handles 64-bit and 'very long' (70 digit) integer keyvalues, and also
    continued string keyvalues.  It also does keyword matching and extracts
    units specifications in inline comments.  
    
  + -LOG coordinates are now implemented independently of spectral coordinate
    types.  Multiple -LOG axes are supported.

  + New function wcssptr() translates the spectral axis in a wcsprm struct to
    the required type.

  + The README file now gives an introduction to, and complete overview of,
    WCSLIB.  It provides a point of entry to programming with WCSLIB.
    Complete descriptions and usage notes for all functions are contained in
    the header files.

  + The FORTRAN wrappers and test programs are now completely up-to-date with
    respect to the C implementation.

  + All code, including the FORTRAN wrappers, PGSBOX, and all test programs,
    now pass 'purify' without memory leaks, uninitialized memory reads, memory
    access violations, or other memory faults.

Change notes:

* Added options to wcspih() to remove WCS cards from the input header leaving
  only non-WCS cards behind.  Modified test programs tpih1.c and tpih2.c to
  use CFITSIO optionally via preprocessor macro DO_CFITSIO.

* New function wcstab() in wcshdr.{h,c} parses -TAB-related header cards and
  sets up structs for a separate routine that reads the necessary arrays from
  a FITS binary table extension.  New test/demo program twcstab.c using header
  defined in wcstab.cards.

* CFITSIO implementation, fits_read_wcstab() in getwcstab.{h,c}, of a
  function, independent of WCSLIB, for extracting arrays from a binary table
  as required in constructing -TAB coordinates.

* New units specification parser, wcsulex() in wcsunits.h and wcsulex.l, and
  converter, wcsunits() in wcsunits.{h,c}.  New test/demo program tunits.c.

* New parser for non-standard units specifications, wcsutrn() in wcsunits.h
  and wcsutrn.l, also tested by tunits.c.

* New functions datfix(), unitfix() (which applies wcsutrn()), celfix(), and
  spcfix() join cylfix() in wcsfix.{h,c} to translate various forms of non-
  standard or quasi-standard FITS WCS keyvalues in a wcsprm struct.  wcsfix()
  applies all of these in sequence.  New test/demo program twcsfix.c, with
  wcsfix() also now invoked by tpih1.c.

* New generic FITS header parser, fitshdr() in fitshdr.{h,l}.  New test/demo
  program tfitshdr.c uses wcs.cards with extra non-WCS cards added.

* -LOG coordinates are now treated as a coordinate type separate from spectral
  coordinates, implemented via log.{h,c} and test program tlog.c.  The
  logarithmic functions were removed from spx.{h,c}, and spc.c.

* Extensive changes to wcs.{h,c} to support multiple -TAB and -LOG coordinate
  axes and units conversion.  Substantially changed the test program, twcs.c,
  to test the more general functionality.

* New function wcssptr() in wcs.{h,c} translates the spectral axis in a wcsprm
  struct.

* Added DATE-AVG to wcsprm.  Also ntab, tab, nwtb, and wtb required for -TAB
  implementation.  Define struct wtbarr.

* Added a types[] member to the wcsprm struct to identify axis coordinate
  types using a four-digit code.

* Use memset() in wcsini() to null-fill character arrays in the wcsprm struct
  so that they don't appear to be padded with garbage when displayed by gdb.

* Do alias translation for AIPS-convention spectral types in wcsset() using
  spctyp().  If wcsset() finds a CTYPEia in "4-3" form with an unrecognized
  algorithm code it now returns an error rather than assume that it's a linear
  axis.  wcsset() now also resets lonpole and latpole to the values actually
  used.

* Modified spctyp() to translate AIPS-convention spectral ctypes, and modified
  the argument list to return the parsed spectral type and algorithm code.
  The return arguments will not be modified if CTYPEia is not a valid spectral
  type; zero-pointers may be specified for any that are not of interest.
  Removed the external const variables, spc_codes and spc_ncode, as their
  function is now fulfilled by spctyp().

* Fixed a bug in spctrn() in resolving ctypeS2 wildcarding.

* Added latpreq member to the celprm struct, set by celset() to indicate how
  LATPOLE is used.  Augmented tcel2.c to report it.

* New function tabmem() in tab.{h,c} takes control of user-allocated memory.

* tabini() allows K == 0 and also K[m] == 0 to initialize partially the tabprm
  struct (for wcstab()).  It now does fine-grained bookkeeping of memory
  allocation for the index arrays and allocates each individually.
  tabprm.index[] == 0x0 is recognized as default indexing in tabset(),
  tabx2s() and tabs2x().

* The *prt() functions report parameters to an extra decimal place.

* tabprt() prints the array index for elements of the coordinate and index
  vectors.

* Set the 0th element in all *_errmsg arrays to "Success".

* Extracted string utility functions used by WCSLIB into wcsutil.{h,c}.

* Removed support for K&R C.




More information about the fitsbits mailing list