NAME

Astro::FITS::HdrTrans::ACSIS - class for translation of JCMT ACSIS headers

SYNOPSIS

use Astro::FITS::HdrTrans::ACSIS;

DESCRIPTION

This class provides a set of translations for ACSIS at JCMT.

METHODS

can_translate

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

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

For this class, the method will return true if the BACKEND header exists and matches 'ACSIS'.

Can also match translated GSD files.

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_DR_RECIPE

Usually simply copies the "RECIPE" header. If the observation type is skydip and the RECIPE header is "REDUCE_SCIENCE" we actually use REDUCE_SKYDIP. If a skydip is not being done and the STANDARD header is true, then the recipe is set to REDUCE_STANDARD. If the INBEAM header is "POL", the recipe name has "_POL" appended if it is a science observation. "REDUCE_SCIENCE" is translated to "REDUCE_SCIENCE_GRADIENT".

from_DR_RECIPE

Returns DR_RECIPE unless we have a skydip.

to_POLARIMETER

If the polarimeter is in the beam, as denoted by the INBEAM header containing "POL", then this returns true. Otherwise, return false.

from_POLARIMETER

If the POLARIMETER header is true, then return "POL" for the INBEAM header. Otherwise, return undef.

to_SAMPLE_MODE

If the SAM_MODE value is either 'raster' or 'scan', return 'scan'. Otherwise, return the value in lowercase.

to_SURVEY

Checks the value of the SURVEY header and uses that. If it's undefined, then use the PROJECT header to determine an appropriate survey.

to_EXPOSURE_TIME

Uses the to_UTSTART and to_UTEND functions to calculate the exposure time. Returns the exposure time as a scalar, not as a Time::Seconds object.

to_INSTRUMENT

Converts the INSTRUME header into the INSTRUMENT header. If the INSTRUME header begins with "HARP" or "FE_HARP", then the INSTRUMENT header will be set to "HARP".

to_OBSERVATION_ID

Converts the OBSID header directly into the OBSERVATION_ID generic header, or if that header does not exist, converts the BACKEND, OBSNUM, and DATE-OBS headers into OBSERVATION_ID.

to_OBSERVATION_MODE

Concatenates the SAM_MODE, SW_MODE, and OBS_TYPE header keywords into the OBSERVATION_MODE generic header, with spaces removed and joined with underscores. For example, if SAM_MODE is 'jiggle ', SW_MODE is 'chop ', and OBS_TYPE is 'science ', then the OBSERVATION_MODE generic header will be 'jiggle_chop_science'.

to_OBSERVATION_TYPE

Returns the type of observation that was done. If the OBS_TYPE header matches /science/, the SAM_MODE header is used: if SAM_MODE matches /raster/, then return 'raster'. If SAM_MODE matches /grid/, then return 'grid'. If SAM_MODE matches /jiggle/, then return 'jiggle'.

If the OBS_TYPE header matches /focus/, then return 'focus'. If the OBS_TYPE header matches /pointing/, then return 'pointing'.

If none of the above options hold, then return undef.

to_REST_FREQUENCY

Uses an Starlink::AST::FrameSet object to determine the frequency. If such an object is not passed in, then the rest frequency is set to zero.

Returns the rest frequency in Hz.

to_SYSTEM_VELOCITY

Converts the DOPPLER and SPECSYS headers into one combined SYSTEM_VELOCITY header. The first three characters of each specific header are used and concatenated. For example, if DOPPLER is 'radio' and SPECSYS is 'LSR', then the resulting SYSTEM_VELOCITY generic header will be 'RADLSR'. The results are always returned in capital letters.

to_VELOCITY

Converts the ZSOURCE header into an appropriate system velocity, depending on the value of the DOPPLER header. If the DOPPLER header is 'redshift', then the VELOCITY generic header will be returned as a redshift. If the DOPPLER header is 'optical', then the VELOCITY generic header will be returned as an optical velocity. If the DOPPLER header is 'radio', then the VELOCITY generic header will be returned as a radio velocity. Note that calculating the radio velocity from the zeropoint (which is the ZSOURCE header) gives accurates results only if the radio velocity is a small fraction (~0.01) of the speed of light.

to_SUBSYSTEM_IDKEY
_is_FSW

Helper function to determine if we are doing frequency switch.

REVISION

$Id$

SEE ALSO

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

AUTHORS

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

COPYRIGHT

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