Astro::FITS::HdrTrans module
----------------------------
What is it?
-----------
Astro::FITS::HdrTrans and associated sub-classes are tools for translating
instrument-specific FITS headers into generically named headers.
Requirements
------------
The Astro::FITS::HdrTrans module has minimal requirements on other
modules; only Carp and Time::Piece are required. Instrument-specific
sub-classes of Astro::FITS::HdrTrans may require other modules to be
installed, depending on the transformations those sub-classes make.
As an example, the translation sub-class for IRIS2 (an imaging
spectrometer used at the Anglo-Australian Telescope) requires
Math::Trig in order to do zenith distance to airmass translations.
Adding Subclasses
-----------------
Adding subclasses to do translations for other instruments should
be fairly straight-forward. The first step is writing an appropriate
valid_class function that returns true or false depending on the
contents of the header passed to it. You must come up with a unique
way of figuring out if the header is one that your subclass will
translate; using the instrument name should usually be enough.
After you have done that it comes time to write the actual translations.
One-to-one translations are handled in the %hdr hash, with the generic
headers being the keys and the instrument-specific headers being the
values. For many-to-one translations, set up the to_ and from_
methods.
UTDATE, UTSTART, and UTEND be returned as Time::Piece objects when
translating to generic headers, and must be passed as Time::Piece
objects when translating to instrument-specific headers. Keep this
in mind when writing translations for these three.
Examples of translations can be found in the Astro::FITS::HdrTrans::IRCAM
subclass.
Don't forget to return a true value from your subclass by putting "1;"
on the last line!
Where can I get it?
-------------------
The package is available from CPAN .
Installation
------------
Installation is automated using the ExtUtils::MakeMaker library
% perl Makefile.PL
% make
% make test
% make install
Authors
-------
The module was written by Brad Cavanagh of
the Joint Astronomy Centre (JAC) in Hawaii.
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.
Maintainer
----------
The package is currently maintained by Brad Cavanagh
.
Changes
-------
v0.01 - initial test release to CPAN
v0.02 - Change licence in README to be same as Perl.
Add copyright statement.
Add requirement on Test::More and Time::Piece to Makefile.PL.