Astro::FITS::HdrTrans::ACSIS - class for translation of JCMT ACSIS headers
This class provides a set of translations for ACSIS at JCMT.
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.
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)
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".
Returns DR_RECIPE unless we have a skydip.
If the polarimeter is in the beam, as denoted by the INBEAM header containing "POL", then this returns true. Otherwise, return false.
If the POLARIMETER header is true, then return "POL" for the INBEAM header. Otherwise, return undef.
If the SAM_MODE value is either 'raster' or 'scan', return 'scan'. Otherwise, return the value in lowercase.
Checks the value of the SURVEY header and uses that. If it's undefined, then use the PROJECT header to determine an appropriate survey.
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.
INSTRUMEheader into the
INSTRUMENTheader. If the
INSTRUMEheader begins with "HARP" or "FE_HARP", then the
INSTRUMENTheader will be set to "HARP".
OBSIDheader directly into the
OBSERVATION_IDgeneric header, or if that header does not exist, converts the
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'.
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.
Starlink::AST::FrameSetobject 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.
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.
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.
Helper function to determine if we are doing frequency switch.
Tim Jenness <firstname.lastname@example.org>, Brad Cavanagh <email@example.com>.
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