Astro::FITS::HdrTrans::CGS4 - Translate FITS headers into generic headers and back again
Converts information contained in CGS4 FITS headers to and from generic headers. See Astro::FITS::HdrTrans for a list of generic headers.
$Id: CGS4.pm,v 1.19 2003/09/16 02:51:11 bradc Exp $
These methods provide an interface to the class, allowing the base class to determine if this class is the appropriate one to use for the given headers.
$valid = valid_class( \%headers );
This method takes one argument: a reference to a hash containing the untranslated headers.
This method returns true (1) or false (0) depending on if the headers can be translated by this method.
For this class, the method will return true if the INSTRUME header exists, and its value matches the regular expression /^cgs4/i, or if the INSTRUMENT header exists, and its value matches the regular expression /^cgs4$/i.
/^cgs4/i
/^cgs4$/i
These methods provide many-to-one mappings between FITS headers and generic headers. An example of a method defined in this section would be one that converts UT date and UT hour FITS headers into one combined UT datetime generic header. These mappings can also use calculations, for example converting a zenith distance to airmass.
These methods are named backwards from the translate_from_FITS and translate_to_FITS methods in that we are translating to and from generic headers. As an example, a method to convert to a generic airmass header would be named to_AIRMASS.
translate_from_FITS
translate_to_FITS
to_AIRMASS
The format of these methods is to_HEADER and from_HEADER. to_ methods accept a hash reference as an argument and return a scalar value (typically a string). from_ methods accept a hash reference as an argument and return a hash.
to_HEADER
from_HEADER
to_
from_
Sets the INST_DHS header.
Converts the EQUINOX FITS header into B1950 or J2000, depending on equinox value, and sets the COORDINATE_TYPE generic header.
EQUINOX
COORDINATE_TYPE
Sets the COORDINATE_UNITS generic header to "degrees".
COORDINATE_UNITS
Checks the FILTER FITS header keyword for the existance of 'prism'. If 'prism' is found, then the POLARIMETRY generic header is set to 1, otherwise 0.
FILTER
POLARIMETRY
Converts FITS header values in DETINCR and DETNINCR to a single descriptive string.
DETINCR
DETNINCR
Converts FITS header values into Time::Piece object.
Time::Piece
Converts UT date in Time::Piece object into yyyymmdd format for IDATE header.
yyyymmdd
Converts FITS header UT date/time values for the start of the observation into a Time::Piece object.
Converts a Time::Piece object into two FITS headers for CGS4: IDATE (in the format YYYYMMDD) and RUTSTART (decimal hours).
Converts FITS header UT date/time values for the end of the observation into a Time::Piece object.
Converts a Time::Piece object into two FITS headers for CGS4: IDATE (in the format YYYYMMDD) and RUTEND (decimal hours).
Converts the decimal hours in the FITS header RABASE into decimal degrees for the generic header RA_BASE.
RABASE
RA_BASE
Converts the decimal degrees in the generic header RA_BASE into decimal hours for the FITS header RABASE.
Contains one-to-one mappings between FITS headers and generic headers. Keys are generic headers, values are FITS headers.
Brad Cavanagh <b.cavanagh@jach.hawaii.edu>
Copyright (C) 2003 Particle Physics and Astronomy Research Council. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Astro::FITS::HdrTrans, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Astro::FITS::HdrTrans
CPAN shell
perl -MCPAN -e shell install Astro::FITS::HdrTrans
For more information on module installation, please visit the detailed CPAN module installation guide.