/*-------------------------------------------------------------------------*/ /** @file dicbkeys.h @author Y. Jung @date July 2000 @version $Revision: 1.3 $ @brief ISAAC functions using FITS header keywords */ /*--------------------------------------------------------------------------*/ /* $Id: dicbkeys.h,v 1.3 2001/11/28 16:31:51 yjung Exp $ $Author: yjung $ $Date: 2001/11/28 16:31:51 $ $Revision: 1.3 $ */ #ifndef _IS_DICB_KEYS_H_ #define _IS_DICB_KEYS_H_ /*---------------------------------------------------------------------------- Defines ---------------------------------------------------------------------------*/ #define ISAAC_SW_MODE 1 #define ISAAC_LW_MODE 2 #define ISAAC_UNRECOGNIZED -1 #define ISAAC_INT 0 #define ISAAC_HALF_CYCLE_1 1 #define ISAAC_HALF_CYCLE_2 2 /*--------------------------------------------------------------------------- Function prototypes ---------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/ /** @brief find out the arcfile @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_arcfile(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the origfile @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_origfile(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the date @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_date(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the date of observation @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_date_obs(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the template id @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_templateid(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief get the string describing the frame type @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*-------------------------------------------------------------------------*/ char *isaac_get_detector_frame_type(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief get the frame id @param filename ISAAC FITS file name @return the frame id */ /*-------------------------------------------------------------------------*/ int isaac_get_frame_type(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief Get the read out mode name. @param filename ISAAC FITS file name @return pointer to statically allocated char string, or NULL. */ /*-------------------------------------------------------------------------*/ char * isaac_get_detector_readout_mode(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the first dispersion coefficient in HISTORY fields @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_hist_disp1(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the second dispersion coefficient in HISTORY fields @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_hist_disp2(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the current exposure number @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char *isaac_get_current_exp_nb(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the number of expositions @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_numbexp(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the working mode @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_mode(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the mjd-obs keyword @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_mjdobs(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the OBS TARG NAME keyword @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_obs_targ_name(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the name of the readout-mode used for a frame. @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_romode_name(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the ID of the readout-mode used for a frame. @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_romode_id(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the OBS ID keyword @param filename ISAAC FITS file name @return pointer to statically allocated character string */ /*--------------------------------------------------------------------------*/ char * isaac_get_obs_id(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out which wave band is active in long wavelength @param filename ISAAC FITS file name @return pointer to statically allocated character string Similar to isaac_get_filter, but checks FILT3,4 instead of FILT1,2 */ /*--------------------------------------------------------------------------*/ char * isaac_get_filter_lw(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out which wave band is active in short wavelength @param filename ISAAC FITS file name @return pointer to statically allocated character string Similar to isaac_get_filter_lw, but checks FILT1,2 instead of FILT3,4 */ /*--------------------------------------------------------------------------*/ char * isaac_get_filter_sw(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out which wave band is active @param filename ISAAC FITS file name @return pointer to statically allocated character string Detects which wave length mode is active (SW/LW) and checks relevant instrument filters accordingly */ /*--------------------------------------------------------------------------*/ char * isaac_get_filter(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief return an associated broad band filter @param filter ISAAC filter name as found in the header. @return pointer to statically allocated character string This function associates a broadband filter to an ISAAC filter, to allow e.g. zero point computations with the right star magnitude. The current list of associations is implemented: \begin{tabular}{ll} ISAAC filter & Broad band \\ \\ NB_1.06 & J \\ NB_1.08 & J \\ NB_1.19 & J \\ NB_1.21 & J \\ NB_1.26 & J \\ NB_1.28 & J \\ Z & J \\ SZ & J \\ Js & J \\ J & J \\ NB_1.64 & H \\ NB_1.71 & H \\ SH & H \\ H & H \\ SK & K \\ K & K \\ Ks & Ks \\ NB_2.07 & Ks \\ NB_2.09 & Ks \\ NB_2.13 & Ks \\ NB_2.17 & Ks \\ NB_2.19 & Ks \\ NB_2.25 & Ks \\ NB_2.29 & Ks \\ NB_2.34 & Ks \\ NB_3.21 & L \\ NB_3.28 & L \\ NB_3.80 & L \\ NB_4.07 & L \\ SL & L \\ L & L \\ M_NB & M \\ M & M \end{tabular} */ /*--------------------------------------------------------------------------*/ char * isaac_get_broadband_filter(char * filter) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the RA keyword in an ISAAC header @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_ra(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the DEC keyword in an ISAAC header @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_dec(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the DIT keyword in an ISAAC header @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_dit(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the NDIT keyword in an ISAAC header @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_ndit(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the CUMOFFSETX keyword in an ISAAC header @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_cumoffsetx(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the CUMOFFSETY keyword in an ISAAC header @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_cumoffsety(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief Find out all header offsets for a frame list. @param filename Name of the ASCII list to parse. @return 1 newly allocated double3 array. This function calls iteratively get_cumoffsetx and get_cumoffsety on each file name in the input ASCII frame list, and stores the results into a newly allocated double3 array. If an error occurs, this function returns NULL. The returned list must be deallocated using double3_del(). */ /*--------------------------------------------------------------------------*/ double3 * isaac_get_offsets(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the PIXSCALE keyword in an ISAAC header @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_pixscale(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated with the ISAAC default keyword used to store the central wavelength in spectroscopic modes @param filename ISAAC FITS file name @return central wavelength in angstroms, -1 in error case History support for various conventions Returned wavelength is in angstroms, is stored in microns in the header. */ /*--------------------------------------------------------------------------*/ double isaac_get_central_wavelength(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the ISAAC default keyword used to store the objective name @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_objective(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the ISAAC default keyword used to store the optical ID @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_optical_id(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the instrument @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_instrument(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the ISAAC default keyword used to store order. @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_order(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the ISAAC default keyword used to store the resolution name. Should be 'MR' or 'LR' @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_resolution(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the ISAAC default keyword used to store the first lamp status. @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_lamp1_status(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the ISAAC default keyword used to store the first lamp name. @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_lamp1_name(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the ISAAC default keyword used to store the second lamp status. @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_lamp2_status(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the ISAAC default keyword used to store the second lamp name. @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_lamp2_name(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the character string associated to the ISAAC default keyword used to store the third lamp intensity. @param filename ISAAC FITS file name @return pointer to statically allocated character string History support for various conventions The returned string is statically allocated, no need to free() it! */ /*--------------------------------------------------------------------------*/ char * isaac_get_lamp3_intensity(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out for a given ISAAC file, if the Argon lamp was active @param filename ISAAC FITS file name @return 1 if the lamp is active, 0 if not, -1 in error case Based on the status of keyword INS.LAMP1.ST */ /*--------------------------------------------------------------------------*/ int isaac_is_argon_lamp_active(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out for a given ISAAC file, if the Xenon lamp was active @param filename ISAAC FITS file name @return 1 if the lamp is active, 0 if not, -1 in error case Based on the status of keyword INS.LAMP2.ST */ /*--------------------------------------------------------------------------*/ int isaac_is_xenon_lamp_active(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief get airmass start or end from an ISAAC FITS file @param filename source FITS file @param when 0 to get start, 1 to get end @return Char string containing what was found in header, NULL if error. */ /*--------------------------------------------------------------------------*/ char * isaac_get_airmass(char * filename, int when) ; /*-------------------------------------------------------------------------*/ /** @brief find out the ambient humidity level as defined in the relevant ambient monitor dictionary @param filename source FITS file @return statically allocated char string, no need to free() it returns NULL if keyword cannot be found */ /*--------------------------------------------------------------------------*/ char * isaac_get_humidity_level(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the data category as defined by the DataFlow @param filename source FITS file @return statically allocated char string, no need to free() it returns NULL if error occurred */ /*--------------------------------------------------------------------------*/ char * isaac_get_dpr_catg(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the data type as defined by the DataFlow @param filename source FITS file @return statically allocated char string, no need to free() it returns NULL if error occurred */ /*--------------------------------------------------------------------------*/ char * isaac_get_dpr_type(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the data tech as defined by the DataFlow @param filename source FITS file @return statically allocated char string, no need to free() it returns NULL if error occurred */ /*--------------------------------------------------------------------------*/ char * isaac_get_dpr_tech(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the pro catg as defined by the DataFlow @param filename Name of a FITS or PAF file. @return statically allocated char string, no need to free() it returns NULL if error occurred */ /*--------------------------------------------------------------------------*/ char * isaac_get_pro_catg(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief find out the pro catalog as defined by the DataFlow @param filename source FITS file @return statically allocated char string, no need to free() it returns NULL if error occurred */ /*--------------------------------------------------------------------------*/ char * isaac_get_pro_catalog(char * filename) ; /*---------------------------------------------------------------------------*/ /** @brief Get chopping status @param filename Input FITS file. @return statically allocated char string, no need to free() it History support for various conventions. Returns NULL if error occurred. */ /*---------------------------------------------------------------------------*/ char *isaac_get_chopping_status(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief Get chopping throw. @param filename Name of the file to query. @return statically allocated char string, no need to free() it. History support for various conventions. Returns NULL if error occurred. */ /*--------------------------------------------------------------------------*/ char * isaac_get_chopping_throw(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief Get chopping cycle. @param filename Name of the file to query. @return statically allocated char string, no need to free() it. History support for various conventions. Returns NULL if error occurred. */ /*--------------------------------------------------------------------------*/ char * isaac_get_chopping_cycle(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief Get chopping frequency. @param filename Name of the file to query. @return statically allocated char string, no need to free() it. History support for various conventions. Returns NULL if error occurred. */ /*--------------------------------------------------------------------------*/ char * isaac_get_chopping_frequency(char * filename) ; /*-------------------------------------------------------------------------*/ /** @brief Get instrument mode: SW or LW @param filename Name of the file to query @return int for wavelength mode. This function analyses a header and tries to identify whether the frame has been taken by the SW or LW arm. The symbol value is currently: \begin{itemize} \item -1 an error occurred while getting this information. \item 0 unknown mode \item ISAAC_SW_MODE SW \item ISAAC_LW_MODE LW \end{itemize} */ /*--------------------------------------------------------------------------*/ int isaac_get_wavelength_mode(char * filename) ; #endif