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.
use
Astro::WCS::LibWCS
Exporter
:functions
:constants
pix2wcst() does not require the final $lstr argument.
pix2wcst()
$lstr
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.
hgetm()
hgets()
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.
wcsinit()
wcsninit()
wcsinitn()
wcsninitn()
wcsinitc()
wcsninitc()
wcsxinit()
wcskinit()
WCSPtr
struct WorldCoor *
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).
To install Astro::WCS::LibWCS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Astro::WCS::LibWCS
CPAN shell
perl -MCPAN -e shell install Astro::WCS::LibWCS
For more information on module installation, please visit the detailed CPAN module installation guide.