Astro::FITS::HdrTrans::FITS - Standard FITS header translations
use Astro::FITS::HdrTrans::FITS; %gen = Astro::FITS::HdrTrans::FITS->translate_from_FITS( %hdr );
This class provides a generic set of translations that are specific to the (few) headers that are commonly standardised across most FITS files.
Mainly deals with World Coordinate Systems and headers defined in the FITS standards papers.
These methods are more complicated than a simple mapping. We have to provide both from- and to-FITS conversions All these routines are methods and the to_ routines all take a reference to a hash and return the translated value (a many-to-one mapping) The from_ methods take a reference to a generic hash and return a translated hash (sometimes these are many-to-many).
This determines the angle, in decimal degrees, of the declination or latitude axis with respect to the second axis of the data array, measured in the anticlockwise direction.
It first looks for the linear-transformation CD matrix, widely used including by IRAF and the precursor to the PC matrix. If this is absent, the routine attempts to find the standard transformation matrix PC defined in the FITS WCS Standard. Either matrix is converted into a single rotation angle.
In the absence of a PC matrix it looks for the CROTA2 keyword from the AIPS convention.
The evaluation from the CD matrix is based upon Micah Johnson's cdelrot.pl script supplied for use with XIMAGE, extended to average the two estimates using FITS-WCS Paper II Section 6.2 prescription.
Converts the DATE-OBS keyword into a number of form YYYYMMDD.
There is no corresponding
from_UTDATEmethod since there is no corresponding FITS keyword.
Converts UT date in
Returns the ending observation time in FITS restricted ISO8601 format: YYYY-MM-DDThh:mm:ss.
Converts UT date in
DATE-OBSheader into date object.
Returns the starting observation time in FITS restricted ISO8601 format: YYYY-MM-DDThh:mm:ss.
Brad Cavanagh <email@example.com>, Tim Jenness <firstname.lastname@example.org>. Malcolm J. Currie <email@example.com>
Copyright (C) 2007-2008 Science and Technology Facilities Council. Copyright (C) 2003-2007 Particle Physics and Astronomy Research Council. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either Version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.