NAME

Astro::FITS::HdrTrans::ClassicCam - Magellan ClassicCam translations

SYNOPSIS

use Astro::FITS::HdrTrans::ClassicCam;

%gen = Astro::FITS::HdrTrans::ClassicCam->translate_from_FITS( %hdr );

DESCRIPTION

This class provides a generic set of translations that are specific to Magellan ClassicCam observations.

METHODS

this_instrument

The name of the instrument required to match (case insensitively) against the CHIP keyword to allow this class to translate the specified headers. Called by the default can_translate method.

$inst = $class->this_instrument();

Returns "ClassicCam".

can_translate

Returns true if the supplied headers can be handled by this class.

$cando = $class->can_translate( \%hdrs );

For this class, in the absence of an INSTRUME keyword, the method will return true if the CHIP header exists and matches 'C-CAM'. It is not clear how robust this is, or over what range of epochs this keyword was written.

COMPLEX CONVERSIONS

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).

to_AIRMASS_START

Sets a default airmass at the start of the observation if the AIRMASS keyword is not defined.

to_DEC_BASE

Converts the base declination from sexagesimal d:m:s to decimal degrees using the DEC keyword, defaulting to 0.0.

to_DEC_SCALE

Sets the declination scale in arcseconds per pixel. It has a fixed absolute value of 0.115 arcsec/pixel, but its sign depends on the declination. The scale increases with pixel index, i.e. has north to the top, for declinations south of -29 degrees. It is flipped north of -29 degrees. The default scale assumes north is up.

to_DR_RECIPE

Returns the data-reduction recipe name. The selection depends on the value of the OBJECT keyword. The default is "QUICK_LOOK". A dark returns "REDUCE_DARK", a sky flat "SKY_FLAT_MASKED", a dome flat "SKY_FLAT", and an object's recipe is "JITTER_SELF_FLAT".

to_NUMBER_OF_OFFSETS

Stores the number of offsets using the UKIRT convention, i.e. adding one to the number of dither positions, and a default dither pattern of 5.

to_NUMBER_OF_READS

Stores the number of reads of the detector, with a default of 2, from the sum of keywords REASDS_EP and PRE_EP.

to_OBSERVATION_TYPE

Determines the observation type from the OBJECT keyword provided it is "DARK" for a dark frame, or "FLAT" for a flat-field frame. All other values of OBJECT return a value of "OBJECT", i.e. of a source.

to_RA_BASE

Converts the base right ascension from sexagesimal h:m:s to decimal degrees using the RA keyword, defaulting to 0.0.

to_RA_SCALE

Sets the right-ascension scale in arcseconds per pixel. It has a fixed absolute value of 0.115 arcsec/pixel, but its sign depends on the declination. The scale increases with pixel index, i.e. has east to the right, for declinations south of -29 degrees. It is flipped north of -29 degrees. The default scale assumes east is to the right.

to_UTDATE

Returns the UT date as Time::Piece object. It copes with non-standard format in DATE-OBS.

to_UTEND

Returns the UT time of the end of the observation as a Time::Piece object.

from_UTEND

Returns the UT time of the end of the observation in HH:MM:SS format and stores it in the UTEND keyword.

to_UTSTART

Returns an estimated UT time of the start of the observation as a Time::Piece object. The start time is derived from the end time, less the EXPTIME exposure time and some allowance for the read time.

to_X_LOWER_BOUND

Returns the lower bound along the X-axis of the area of the detector as a pixel index.

to_X_REFERENCE_PIXEL

Specifies the X-axis reference pixel near the frame centre.

to_X_UPPER_BOUND

Returns the upper bound along the X-axis of the area of the detector as a pixel index.

to_Y_LOWER_BOUND

Returns the lower bound along the Y-axis of the area of the detector as a pixel index.

to_Y_REFERENCE_PIXEL

Specifies the Y-axis reference pixel near the frame centre.

to_Y_UPPER_BOUND

Returns the upper bound along the Y-axis of the area of the detector as a pixel index.

HELPER ROUTINES

These are ClassicCam-specific helper routines.

dms_to_degrees

Converts a sky angle specified in d:m:s format into decimal degrees. The argument is the sexagesimal-format angle.

get_speed_sec

Returns the detector speed in seconds. It uses the SPEED to derive a time in decimal seconds. The default is 0.743.

get_UT_date

Returns the UT date in YYYYMMDD format. It parses the non-standard ddMmmyy DATE-OBS keyword.

get_UT_hours

Returns the UT time of the end of observation in decimal hours from the UT keyeword.

hms_to_degrees

Converts a sky angle specified in h:m:s format into decimal degrees. It takes no account of latitude. The argument is the sexagesimal format angle.

quad_bounds

Returns the detector bounds in pixels of the region of the detector used. The region will be one of the four quadrants or the full detector. We guess for the moment that keword QUAD values of 1, 2, 3, 4 correspond to lower-left, lower-right, upper-left, upper-right quadrants respectively, and 5 is the whole 256x256-pixel array.

SEE ALSO

Astro::FITS::HdrTrans, Astro::FITS::HdrTrans::UKIRT.

AUTHOR

Malcolm J. Currie <mjc@jach.hawaii.edu> Tim Jenness <t.jenness@jach.hawaii.edu>.

COPYRIGHT

Copyright (C) 2008 Science and Technology Facilities Council. Copyright (C) 1998-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.