NAME

Astro::FITS::CFITSIO::Simple::PDL - support routines for using CFITSIO and PDL

VERSION

version 0.20

SYNOPSIS

use Astro::FITS::CFITSIO::PDL;

DESCRIPTION

This module provides utility routines to make CFITSIO and PDL more friendly to each other.

Functions

pdl2cfitsio
$cfitsio_type = pdl2fits_type($piddle);
$cfitsio_type = pdl2fits_type(long); # or short, or float, etc.

PDL datatypes are always guaranteed to be the same size on all architectures, whereas CFITSIO datatypes (TLONG, for example), will vary on some architectures since they correspond to the C datatypes on that system. This poses a problem for Perl scripts which wish to read FITS data into piddles, and do so in a manner portable to 64-bit architectures, for example. This routine takes a PDL object or PDL::Types token (returned by float() and friends when given no arguments), and returns the same-sized CFITSIO datatype, suitable for passing to routines such as fits_read_col().

It croak()'s upon error.

fits2pdl_coltype
$pdl_type = fits2pdl_type( TLONG );
$pdl_type = fits2pdl_type( 'D' );

Given a supported FITS or CFITSIO column datatype, return the PDL type which is the closest functional match (i.e. TDOUBLE => double). It croak()'s if the passed type is not supported.

fits2pdl_imgtype
$pdl_type = fits2pdl_type( FLOAT_IMG );

Given a supported CFITSIO table datatype, return the PDL type which is the closest functional match (i.e. DOUBLE_IMG => double). It croak()'s if the passed type is not supported.

EXPORT

None by default.

SUPPORT

Bugs

Please report any bugs or feature requests to bug-astro-fits-cfitsio-simple@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=Astro-FITS-CFITSIO-Simple

Source

Source is available at

https://gitlab.com/djerius/astro-fits-cfitsio-simple

and may be cloned from

https://gitlab.com/djerius/astro-fits-cfitsio-simple.git

SEE ALSO

Please see those modules/websites for more information related to this module.

AUTHORS

  • Diab Jerius <djerius@cpan.org>

  • Pete Ratzlaff

COPYRIGHT AND LICENSE

This software is Copyright (c) 2008 by Smithsonian Astrophysical Observatory.

This is free software, licensed under:

The GNU General Public License, Version 3, June 2007