| Astro-WCS-LibWCS documentation | view source | Contained in the Astro-WCS-LibWCS distribution. |
Astro::WCS::LibWCS - Perl interface to WCSTools libwcs
use Astro::WCS::LibWCS; # export nothing by default use Astro::WCS::LibWCS qw( :functions ); # export function names use Astro::WCS::LibWCS qw( :constants ); # export constant names
This module is a Perl interface to the routines in the WCSTools libwcs C library, by Doug Mink. WCSTools is a package of programs and a library for using the World Coordinate System (WCS). See http://tdc-www.harvard.edu/software/wcstools/ for more information on WCSTools.
By default nothing is exported into your name-space when you use
this package. Instead, Astro::WCS::LibWCS uses the Exporter
module's support for name-space tags. The available tags are
:functions and :constants.
pix2wcst() does not require the final $lstr argument.
hgetm() and hgets() limit the length of the returned string to
the $lstr argument given. If $lstr is less than or equal to
zero, a maximum length of 2880 characters is used.
A few libwcs functions require an array of doubles representing matrices. These functions should be handed a Perl array reference (multi-dimensional arrays are fine) with enough elements, once completely unpacked, to satisfy the input demands of the function in question. If one is using a module such as PDL, then direct passing of the machine-formatted data is possible by using a scalar reference which points to the information (e.g., $piddle->get_dataref).
Astro::WCS::LibWCS provides, in addition to the normal libwcs
functions, an OO interface. One obtains an "object" by calling one of
wcsinit(), wcsninit(), wcsinitn(), wcsninitn(),
wcsinitc(), wcsninitc(), wcsxinit() or wcskinit(). The
actual object class is WCSPtr. Any libwcs routines which expect the
first argument to be of type struct WorldCoor * are blessed into
this class. As an added bonus, any of these routines which begin with
the string "wcs" can be called shorthand without the prefix.
The following routines are blessed into the WCSPtr class (along
with their shorthand names):
These are available to retrieve the members of the WCSPtr struct.
Likely many! Very little of the module has been tested. If you find something that looks like a bug, please send a report.
Pete Ratzlaff <pratzlaff@cfa.harvard.edu>
Contributors include:
perl(1).
| Astro-WCS-LibWCS documentation | view source | Contained in the Astro-WCS-LibWCS distribution. |