Astro::FITS::CFITSIO::Simple::PDL - support routines for using CFITSIO and PDL
version 0.20
use Astro::FITS::CFITSIO::PDL;
This module provides utility routines to make CFITSIO and PDL more friendly to each other.
$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().
fits_read_col()
It croak()'s upon error.
$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.
TDOUBLE
double
$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.
DOUBLE_IMG
None by default.
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 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
Please see those modules/websites for more information related to this module.
Astro::FITS::CFITSIO::Simple
Astro::FITS::CFITSIO
PDL
Diab Jerius <djerius@cpan.org>
Pete Ratzlaff
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
To install Astro::FITS::CFITSIO::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Astro::FITS::CFITSIO::Simple
CPAN shell
perl -MCPAN -e shell install Astro::FITS::CFITSIO::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.