
Astro::FITS::HdrTrans::SCUBA - JCMT SCUBA translations

Converts information contained in SCUBA FITS headers to and from generic headers. See Astro::FITS::HdrTrans for a list of generic headers.

The name of the instrument required to match (case insensitively) against the INSTRUME/INSTRUMENT keyword to allow this class to translate the specified headers.
Called by the default can_translate method.
$inst = $class->this_instrument();
Returns "SCUBA".
The database tables do not include an instrument field so we need to determine suitability by looking at other fields instead of using the base implementation.
$cando = $class->can_translate( \%hdrs );
For SCUBA we first check for BOLOMS and SCU# headers and then use the base implementation that will look at the INSTRUME field.

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)
Uses the CHOP_CRD FITS header to determine the chopper coordinate system, and then places that coordinate type in the CHOP_COORDINATE_SYSTEM generic header.
A FITS header value of 'LO' translates to 'Tracking', 'AZ' translates to 'Alt/Az', and 'NA' translates to 'Focal Plane'. Any other values will return undef.
Uses the CENT_CRD FITS header to determine the coordinate type (galactic, B1950, J2000) and then places that coordinate type in the COORDINATE_TYPE generic header.
Translates EQUINOX header into valid equinox value. The following translation is done:
Translates generic EQUINOX values into SCUBA FITS equinox values for the CENT_CRD header.
Returns photometry if the FITS header value for MODE is PHOTOM, otherwise returns imaging.
Converts the observation type. If the FITS header is equal to PHOTOM, MAP, POLPHOT, or POLMAP, then the generic header value is OBJECT. Else, the FITS header value is copied directly to the generic header value.
Sets the POLARIMETRY generic header to 'true' if the value for the FITS header MODE is 'POLMAP' or 'POLPHOT', otherwise sets it to 'false'.
Converts either the UTDATE or DATE header into a Time::Piece object.
Converts UT date in Time::Piece object into YYYY:MM:DD format for UTDATE header.
Combines UTDATE and UTSTART into a unified UTSTART generic header. If those headers do not exist, uses DATE.
Converts the unified UTSTART generic header into UTDATE and UTSTART FITS headers of the form YYYY:MM:DD and HH:MM:SS.
Converts the <UTDATE> and UTEND headers into a combined Time::Piece object.
Converts the unified UTEND generic header into UTDATE and UTEND FITS headers of the form YYYY:MM:DD and HH:MM:SS.
Converts the MSBID field to an MSBID. Complication is that the SCUBA header and database store a blank MSBID as a single space rather than an empty string and this causes difficulty in some subsystems.
This routine replaces a single space with a null string.

$Id$

Astro::FITS::HdrTrans, Astro::FITS::HdrTrans::Base

Brad Cavanagh <b.cavanagh@jach.hawaii.edu>, Tim Jenness <t.jenness@jach.hawaii.edu>

Copyright (C) 2007 Science and Technology Facilities Council. Copyright (C) 2003-2005 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