21#ifndef ERISP_ERIS_ERIS_IFU_JITTER_INTERFACE_H_
22#define ERISP_ERIS_ERIS_IFU_JITTER_INTERFACE_H_
37#include "eris_ifu_functions.h"
38#include "eris_ifu_extract_spec_static.h"
43typedef enum {M_UNSET, M_SCIENCE, M_STDSTAR, M_PUPIL, M_TELLURIC} jitterModes;
45typedef enum {NONE=0, DAVIES=1, AUSTRIAN=2} skyTweakModes;
47typedef enum {LINEAR=1, SPLINE=2} stretchResamplingModes;
49typedef enum {UNSET, DISTANCES, EDGES, GRID } slitletDetectionModes;
52 skyTweakModes skyTweak;
53 bool skip_sky_oh_align;
58 stretchResamplingModes stretch_resampling;
60 double velocityOffset;
62 slitletDetectionModes slitletDetectionMode;
70 bool resampleExposureMap;
93 cpl_propertylist *hdr;
97 double centeredObsDate;
102 hdrl_image *rawImage;
104 hdrl_imagelist *cube;
105 cpl_imagelist *cubeBpm;
106 cpl_propertylist *cubeHdr;
107 cpl_mask *badPixelMask;
108 hdrl_image *darkSubtrImage;
110 hdrl_image *skySubtrImage;
114typedef enum {NODATA, SCIENCE, PSF, STD, STD_FLUX, MODE_PUPIL, IGNORE_SOF_MODE
120 ifsPreopticsScale scale;
121 ifsInstrument instrument;
122 int exposureTableCnt;
123 int exposureTableSize;
125 struct exposureEntry *exposureTable;
127 hdrl_image *masterDark;
128 hdrl_image *masterFlat;
130 cpl_mask *badPixelMask;
132 cpl_polynomial **distortion;
133 cpl_vector *oh_ref_peaks;
134 cpl_frame *oh_ref_frame;
136 cpl_polynomial *poly_u;
137 cpl_polynomial *poly_v;
138 cpl_vector *distances;
139 cpl_bivector *positions;
148 const char *recipeName,
149 jitterModes jitterMode,
150 cpl_parameterlist *pl);
153 const char *recipeName,
154 jitterModes jitterMode,
155 cpl_parameterlist *pl);
159 const char* recipe_name,
160 const cpl_parameterlist * parlist,
161 struct stdParamStruct *stdParams,
162 struct paramStruct *params);
166 cpl_frameset* frames,
167 struct stdParamStruct stdParams,
168 struct paramStruct params,
169 struct sofStruct *sof);
172 cpl_frameset *frames,
173 ifsInstrument *instrument,
175 ifsPreopticsScale *scale);
178 cpl_frameset *frames,
179 struct stdParamStruct params,
180 struct sofStruct *sof);
182cpl_error_code eris_ifu_jitter_get_objsky_pairs(
183 struct sofStruct *sof);
185void eris_free_exposureEntry(
struct exposureEntry* ee);
188 jitterModes jitterMode,
189 cpl_parameterlist *pl);
cpl_error_code eris_ifu_jitter_processSof(cpl_frameset *frames, struct stdParamStruct stdParams, struct paramStruct params, struct sofStruct *sof)
Process SOF (Set of Frames) file and load all calibration data.
cpl_error_code eris_ifu_stdstar_fill_common_parameterlist(const char *recipeName, jitterModes jitterMode, cpl_parameterlist *pl)
Fill parameter list with standard star-specific parameters.
cpl_error_code eris_ifu_jitter_get_objsky_exposures(cpl_frameset *frames, struct stdParamStruct params, struct sofStruct *sof)
Load all object and sky exposures from frameset.
cpl_error_code eris_ifu_jitter_fetch_params(const char *context, const char *recipe_name, const cpl_parameterlist *parlist, struct stdParamStruct *stdParams, struct paramStruct *params)
Fetch and parse jitter recipe parameters from parameter list.
cpl_error_code eris_ifu_jitter_fill_extract_parameterlist(char *context, jitterModes jitterMode, cpl_parameterlist *pl)
Fill parameter list with source extraction parameters.
cpl_error_code eris_ifu_jitter_get_instrument_settings(cpl_frameset *frames, ifsInstrument *instrument, ifsBand *band, ifsPreopticsScale *scale)
Extract instrument configuration from frameset.
cpl_error_code eris_ifu_jitter_fill_common_parameterlist(const char *recipeName, jitterModes jitterMode, cpl_parameterlist *pl)
Fill parameter list with common jitter recipe parameters.