|
ERIS Pipeline Reference Manual 1.8.15
|
Functions | |
| cpl_error_code | eris_ifu_dfs_set_groups (cpl_frameset *self) |
| Set the frame group (RAW, CALIB, or PRODUCT) for all frames in a frameset. | |
| cpl_frameset * | eris_ifu_extract_frameset (const cpl_frameset *in, const char *tag) |
| Extract frames with a specific tag from a frameset. | |
| cpl_error_code | eris_ifu_heades_add_hduclass_common (cpl_propertylist *plist, const char *deq_hduclas) |
| Add common HDU classification properties to FITS header. | |
| cpl_error_code | eris_ifu_heades_add_hduclass_data (cpl_propertylist *plist) |
| Add data extension classification properties to FITS header. | |
| cpl_error_code | eris_ifu_heades_add_hduclass_errs (cpl_propertylist *plist, deqErrorType errorType) |
| Add error extension classification properties to FITS header. | |
| cpl_error_code | eris_ifu_heades_add_hduclass_qual (cpl_propertylist *plist, deqQualityType qualityType) |
| Add quality extension classification properties to FITS header. | |
| cpl_error_code | eris_ifu_save_deq_image (cpl_frameset *allframes, cpl_propertylist *header, const cpl_parameterlist *parlist, const cpl_frameset *usedframes, const cpl_frame *inherit, const char *recipe, const cpl_propertylist *applist, const char *remregexp, const char *filename, const cpl_image *image, const cpl_image *error, deqErrorType errorType, const cpl_image *dataQualityMask, deqQualityType dataQualityType, const char *unit) |
| Save a DFS-compliant image product with data, error, and quality extensions. | |
| cpl_error_code | eris_ifu_save_deq_cube (cpl_frameset *allframes, cpl_propertylist *header, const cpl_parameterlist *parlist, const cpl_frameset *usedframes, const cpl_frame *inherit, const char *recipe, cpl_propertylist *applist, const char *remregexp, const char *filename, cpl_imagelist *data, cpl_imagelist *error, deqErrorType errorType, const cpl_imagelist *dataQualityMask, deqQualityType qualityType) |
| Save a DFS-compliant cube product with data, error, and quality extensions. | |
| cpl_error_code | eris_ifu_save_image_phase3 (cpl_frameset *allframes, const cpl_parameterlist *parlist, const cpl_frameset *usedframes, const char *recipe, const cpl_propertylist *applist, const char *remregexp, const char *filename, const cpl_image *image, cpl_type type, const char *unit) |
| Save a DFS-compliant Phase 3 image product. | |
| cpl_error_code | eris_ifu_save_table (cpl_frameset *allframes, cpl_propertylist *header, const cpl_parameterlist *parlist, const cpl_frameset *usedframes, const cpl_frame *inherit, const char *recipe, const char *procatg, cpl_propertylist *applist, const char *remregexp, const char *filename, const cpl_table *table) |
| Save a DFS-compliant table product. | |
| cpl_error_code | eris_ifu_load_deq_image (const char *filename, cpl_propertylist **primaryHeader, cpl_image **dataImage, cpl_image **errImage, cpl_image **qualImage, deqErrorType *errorType, deqQualityType *qualityType) |
| ** Function to write a DFS compliant pipeline product with a badpixel map | |
| cpl_error_code | eris_ifu_load_deq_imagelist (const char *filename, cpl_propertylist **primaryHeader, cpl_imagelist **dataImagelist, cpl_imagelist **errImagelist, cpl_imagelist **qualImagelist, deqErrorType *errorType, deqQualityType *qualityType) |
| Load a DEQ-format imagelist (cube) with data, error, and quality extensions. | |
| hdrl_image * | eris_ifu_load_deq_hdrl_image (const char *filename, cpl_propertylist **primaryHeader, cpl_image **qualImage, deqQualityType *qualityType) |
| Load a DEQ-format file into an HDRL image structure. | |
| hdrl_imagelist * | eris_ifu_load_deq_hdrl_imagelist (const char *filename, cpl_propertylist **primaryHeader, cpl_imagelist **qualImagelist, deqQualityType *qualityType) |
| Load a DEQ-format cube into an HDRL imagelist structure. | |
| hdrl_image * | eris_ifu_load_cal_image_frame (const cpl_frame *frame, ifsBand band, ifsPreopticsScale scale, cpl_image **qualImage, deqQualityType *qualType) |
| Load a calibration image from a frame. | |
| hdrl_image * | eris_ifu_load_cal_image_file (const char *filename, ifsBand band, ifsPreopticsScale scale, cpl_image **qualImage, deqQualityType *qualType) |
| Load a calibration image from a filename. | |
| cpl_error_code | eris_ifu_load_distortion_polynomials_old (const char *filename, cpl_polynomial **poly_u, cpl_polynomial **poly_v) |
| Load old-format distortion polynomials from a table. | |
| cpl_error_code | eris_ifu_load_distortion_polynomials (const char *filename, cpl_polynomial ***polynomials, cpl_table **borders) |
| Load distortion polynomials and slitlet borders from a table. | |
| cpl_vector * | eris_ifu_load_distances (const char *filename) |
| Load slitlet distance vector from a table. | |
| cpl_bivector * | eris_ifu_load_slit_positions (const char *filename) |
| Load slitlet position bivector from a table. | |
| cpl_error_code | eris_ifu_append_qc_int (cpl_propertylist *pl, const char *name, int val, const char *comment) |
| Append a QC parameter of type INT to a property list. | |
| cpl_error_code | eris_ifu_append_qc_double (cpl_propertylist *pl, const char *name, double val, const char *comment) |
| Append a QC parameter of type DOUBLE to a property list. | |
| cpl_error_code | eris_ifu_append_qc_float (cpl_propertylist *pl, const char *name, float val, const char *comment) |
| Append a QC parameter of type FLOAT to a property list. | |
| cpl_error_code | eris_ifu_set_qc_int (cpl_propertylist *pl, const char *name, int val, const char *comment) |
| Set (or update) a QC parameter of type INT in a property list. | |
| bool | eris_ifu_frame_is_on (const cpl_frame *fr) |
| Determine if a frame has calibration lamps ON or OFF. | |
| bool | eris_ifu_frame_is_sky (const cpl_frame *fr) |
| Determine if a frame is a sky frame. | |
| float | eris_ifu_get_dit (cpl_propertylist *header) |
| Get the detector integration time (DIT) from FITS header. | |
| int | eris_ifu_get_callamp_status (cpl_propertylist *header) |
| Return a bit mask indicating which calibration lamps are turned on. | |
| ifsBand | eris_ifu_get_band (const cpl_propertylist *header) |
| Determine preoptic band. | |
| ifsInstrument | eris_ifu_get_instrument (const cpl_propertylist *header) |
| Return the used instrument of the FITS file header. | |
| ifsPreopticsScale | eris_ifu_get_spiffier_preoptics_scale (const char *scaleId) |
| Determine observing scale on Sky. | |
| ifsPreopticsScale | eris_ifu_get_spiffi_preoptics_scale (const char *scaleId) |
| Determine observing scale on Sky. | |
| ifsPreopticsScale | eris_ifu_get_preopticsScale (cpl_propertylist *header) |
| Return the the pre-optics scaling. | |
| double | eris_get_cumoffs_ra (cpl_frame *frame) |
| find out the ESO OCS CUMOFFS RA of the observation | |
| double | eris_get_cumoffs_dec (cpl_frame *frame) |
| find out the ESO OCS CUMOFFS DEC of the observation | |
| double | eris_get_mjd_obs (cpl_frame *frame) |
| find out the Julian Date of the observation | |
| cpl_boolean | eris_ifu_tag_is_cdb (char *tag) |
| check if input frame tag is a static of master calibration | |
| cpl_boolean | eris_ifu_tag_is_sky (const char *tag) |
| check if input frame tag is a static of master calibration | |
| cpl_boolean | eris_ifu_tag_is_obj (const char *tag) |
| Add PRO* keywords to a SINFONI FITS header. | |
| cpl_error_code | eris_ifu_extract_obj_frames (const cpl_frameset *sof, cpl_frameset *obj) |
| extract object raw frames from frame set and put them in a new one | |
| cpl_error_code | eris_ifu_extract_sky_frames (const cpl_frameset *sof, cpl_frameset *sky) |
| extract sky raw frames from frame set and put them in a new one | |
| cpl_error_code | eris_ifu_extract_mst_frames (const cpl_frameset *sof, cpl_frameset *cdb) |
| extract master and ref frames from input set and put them in a new one | |
This module provides Data Flow System (DFS) compliant I/O functions for ERIS IFU pipeline products, including functions for:
All save functions create products compliant with ESO's Data Exchange Qualifiers (DEQ) standard (VLT-SPE-ESO-19500-5667), which defines the structure of data products with separate extensions for data, errors, and data quality information.
| double eris_get_cumoffs_dec | ( | cpl_frame * | frame | ) |
find out the ESO OCS CUMOFFS DEC of the observation
| frame | input frame |
Queries FITS header ESO OCS CUMOFFS DEC
Definition at line 2423 of file eris_ifu_dfs.c.
References eris_check_error_code().
| double eris_get_cumoffs_ra | ( | cpl_frame * | frame | ) |
find out the ESO OCS CUMOFFS RA of the observation
| frame | input frame |
Queries FITS header ESO OCS CUMOFFS RA
Definition at line 2381 of file eris_ifu_dfs.c.
References eris_check_error_code().
| double eris_get_mjd_obs | ( | cpl_frame * | frame | ) |
find out the Julian Date of the observation
| frame | input frame |
Queries FITS header MJD-OBS
Definition at line 2463 of file eris_ifu_dfs.c.
References eris_check_error_code(), and eris_pfits_get_mjdobs().
| cpl_error_code eris_ifu_append_qc_double | ( | cpl_propertylist * | pl, |
| const char * | name, | ||
| double | val, | ||
| const char * | comment | ||
| ) |
Append a QC parameter of type DOUBLE to a property list.
| pl | Property list |
| name | QC parameter name (without "ESO QC " prefix) |
| val | QC parameter double value |
| comment | Comment string to attach |
Adds a quality control parameter with automatic "ESO QC " prefix to the property list with the specified value and comment.
Definition at line 1769 of file eris_ifu_dfs.c.
References CATCH, eris_check_error_code(), eris_ifu_free_string(), and TRY.
Referenced by eris_ifu_dark_qc(), eris_ifu_get_badpix_qc_from_ima(), and eris_ifu_get_badpix_qc_from_mask().
| cpl_error_code eris_ifu_append_qc_float | ( | cpl_propertylist * | pl, |
| const char * | name, | ||
| float | val, | ||
| const char * | comment | ||
| ) |
Append a QC parameter of type FLOAT to a property list.
| pl | Property list |
| name | QC parameter name (without "ESO QC " prefix) |
| val | QC parameter float value |
| comment | Comment string to attach |
Adds a quality control parameter with automatic "ESO QC " prefix to the property list with the specified value and comment.
Definition at line 1813 of file eris_ifu_dfs.c.
References CATCH, eris_check_error_code(), eris_ifu_free_string(), and TRY.
Referenced by eris_ifu_dark_qc(), and eris_ifu_jitter_process_exposures().
| cpl_error_code eris_ifu_append_qc_int | ( | cpl_propertylist * | pl, |
| const char * | name, | ||
| int | val, | ||
| const char * | comment | ||
| ) |
Append a QC parameter of type INT to a property list.
| pl | Property list |
| name | QC parameter name (without "ESO QC " prefix) |
| val | QC parameter integer value |
| comment | Comment string to attach |
Adds a quality control parameter with automatic "ESO QC " prefix to the property list with the specified value and comment.
Definition at line 1725 of file eris_ifu_dfs.c.
References CATCH, eris_check_error_code(), eris_ifu_free_string(), and TRY.
Referenced by eris_ifu_dark_qc(), eris_ifu_get_badpix_qc_from_ima(), and eris_ifu_get_badpix_qc_from_mask().
| cpl_error_code eris_ifu_dfs_set_groups | ( | cpl_frameset * | self | ) |
Set the frame group (RAW, CALIB, or PRODUCT) for all frames in a frameset.
| self | The frameset to process |
Iterates through all frames in the frameset and assigns the appropriate group based on the frame's tag:
Definition at line 89 of file eris_ifu_dfs.c.
References BRK_IF_ERROR, BRK_IF_NULL, BRK_WITH_ERROR_MSG, CATCH, eris_check_error_code(), eris_ifu_get_instrument_frame(), and TRY.
Referenced by eris_ifu_jitter_processSof().
| cpl_frameset * eris_ifu_extract_frameset | ( | const cpl_frameset * | in, |
| const char * | tag | ||
| ) |
Extract frames with a specific tag from a frameset.
| in | Input non-empty frameset |
| tag | The tag of the frames to extract |
Creates a new frameset containing duplicates of all frames from the input frameset that match the specified tag. If no frames match, NULL is returned.
Definition at line 201 of file eris_ifu_dfs.c.
References eris_check_error_code().
Referenced by eris_ifu_combine(), eris_ifu_combine_pbp(), and eris_ifu_jitter_process_cubes().
| cpl_error_code eris_ifu_extract_mst_frames | ( | const cpl_frameset * | sof, |
| cpl_frameset * | cdb | ||
| ) |
extract master and ref frames from input set and put them in a new one
| sof | input frame set |
| cdb | output frame set |
Definition at line 2654 of file eris_ifu_dfs.c.
References eris_check_error_code(), and eris_ifu_tag_is_cdb().
| cpl_error_code eris_ifu_extract_obj_frames | ( | const cpl_frameset * | sof, |
| cpl_frameset * | obj | ||
| ) |
extract object raw frames from frame set and put them in a new one
| sof | input frame set |
| obj | output frame set |
Definition at line 2581 of file eris_ifu_dfs.c.
References eris_check_error_code(), and eris_ifu_tag_is_obj().
| cpl_error_code eris_ifu_extract_sky_frames | ( | const cpl_frameset * | sof, |
| cpl_frameset * | sky | ||
| ) |
extract sky raw frames from frame set and put them in a new one
| sof | input frame set |
| sky | output frame set |
Definition at line 2620 of file eris_ifu_dfs.c.
References eris_check_error_code(), and eris_ifu_tag_is_sky().
| bool eris_ifu_frame_is_on | ( | const cpl_frame * | fr | ) |
Determine if a frame has calibration lamps ON or OFF.
| fr | Input frame |
Checks the DPR.TYPE keyword and calibration lamp status keywords to determine if the frame is an "on" frame. Science frames (STD, PSF, SKY, OBJECT) and frames with any calibration lamp turned on are considered "on" frames.
Definition at line 1899 of file eris_ifu_dfs.c.
References BRK_WITH_ERROR_MSG, CATCH, eris_check_error_code(), eris_ifu_file_exists(), eris_ifu_free_propertylist(), eris_ifu_free_string(), eris_ifu_get_callamp_status(), and TRY.
Referenced by eris_compute_gain(), and eris_ifu_detlin_load_frames().
| bool eris_ifu_frame_is_sky | ( | const cpl_frame * | fr | ) |
Determine if a frame is a sky frame.
| fr | Input frame |
Checks the DPR.TYPE keyword to determine if the frame contains a sky observation (calibration or science).
Definition at line 1960 of file eris_ifu_dfs.c.
References BRK_WITH_ERROR_MSG, CATCH, eris_check_error_code(), eris_ifu_file_exists(), eris_ifu_free_propertylist(), eris_ifu_free_string(), and TRY.
| ifsBand eris_ifu_get_band | ( | const cpl_propertylist * | header | ) |
Determine preoptic band.
| header | input FITS header |
Definition at line 2141 of file eris_ifu_dfs.c.
References BRK_WITH_ERROR, CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_get_instrument(), and TRY.
Referenced by eris_ifu_jitter_get_instrument_settings(), eris_ifu_jitter_process_exposures(), eris_ifu_lcorr_get(), eris_ifu_load_cal_image_file(), eris_ifu_sdp_properties_collect(), and eris_ifu_wave_get_arc_images().
| int eris_ifu_get_callamp_status | ( | cpl_propertylist * | header | ) |
Return a bit mask indicating which calibration lamps are turned on.
| header | of the FITS file as property list |
The bit values for the lamps are defined in the AR_LAMP, KR_LAMP, NE_LAMP, XE_LAMP and QTH_LAMP macros.
Possible cpl_error_code set in this function:
Definition at line 2053 of file eris_ifu_dfs.c.
References CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_get_instrument(), and TRY.
Referenced by eris_ifu_frame_is_on(), and eris_ifu_wave_get_arc_images().
| float eris_ifu_get_dit | ( | cpl_propertylist * | header | ) |
Get the detector integration time (DIT) from FITS header.
| header | FITS header property list |
Extracts the DET.SEQ1.DIT keyword value from the header. The keyword name differs between SPIFFIER and SPIFFI instruments.
Definition at line 2013 of file eris_ifu_dfs.c.
References CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_get_instrument(), and TRY.
Referenced by eris_ifu_detlin_load_frames(), eris_ifu_jitter_get_objsky_exposures(), and eris_ifu_wave_get_arc_images().
| ifsInstrument eris_ifu_get_instrument | ( | const cpl_propertylist * | header | ) |
Return the used instrument of the FITS file header.
| header | of the FITS file as property list |
Possible cpl_error_code set in this function:
Definition at line 2220 of file eris_ifu_dfs.c.
References BRK_WITH_ERROR, CATCH, CHECK_ERROR_STATE_MSG, eris_check_error_code(), SET_ERROR_MSG, and TRY.
Referenced by eris_ifu_get_band(), eris_ifu_get_callamp_status(), eris_ifu_get_dit(), eris_ifu_get_instrument_frame(), eris_ifu_get_preopticsScale(), eris_ifu_load_exposure_file(), and eris_ifu_wave_get_arc_images().
| ifsPreopticsScale eris_ifu_get_preopticsScale | ( | cpl_propertylist * | header | ) |
Return the the pre-optics scaling.
| header | of the FITS file as property list |
Possible cpl_error_code set in this function:
Definition at line 2336 of file eris_ifu_dfs.c.
References CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_get_instrument(), eris_ifu_get_spiffi_preoptics_scale(), eris_ifu_get_spiffier_preoptics_scale(), and TRY.
Referenced by eris_ifu_jitter_get_instrument_settings(), eris_ifu_load_cal_image_file(), and eris_ifu_wave_get_arc_images().
| ifsPreopticsScale eris_ifu_get_spiffi_preoptics_scale | ( | const char * | scaleId | ) |
Determine observing scale on Sky.
| scaleId | scale ID |
Definition at line 2304 of file eris_ifu_dfs.c.
References eris_check_error_code().
Referenced by eris_ifu_get_preopticsScale().
| ifsPreopticsScale eris_ifu_get_spiffier_preoptics_scale | ( | const char * | scaleId | ) |
Determine observing scale on Sky.
| scaleId | scale ID |
Definition at line 2279 of file eris_ifu_dfs.c.
References eris_check_error_code().
Referenced by eris_ifu_get_preopticsScale().
| cpl_error_code eris_ifu_heades_add_hduclass_common | ( | cpl_propertylist * | plist, |
| const char * | deq_hduclas | ||
| ) |
Add common HDU classification properties to FITS header.
| plist | FITS header property list to modify |
| deq_hduclas | Value for HDUCLAS1 keyword |
Adds standard ESO Data Exchange Qualifier (DEQ) classification keywords: HDUCLASS, HDUDOC, HDUVERS, and HDUCLAS1 to the property list.
Definition at line 248 of file eris_ifu_dfs.c.
References eris_check_error_code().
Referenced by eris_ifu_resample_save_cube(), eris_ifu_save_deq_cube(), eris_ifu_save_deq_image(), and eris_ifu_save_table().
| cpl_error_code eris_ifu_heades_add_hduclass_data | ( | cpl_propertylist * | plist | ) |
Add data extension classification properties to FITS header.
| plist | FITS header property list to modify |
Adds DEQ keywords specific to data extensions, including HDUCLAS2, EXTNAME, ERRDATA, and QUALDATA references.
Definition at line 273 of file eris_ifu_dfs.c.
References eris_check_error_code().
Referenced by eris_ifu_resample_save_cube(), eris_ifu_save_deq_cube(), and eris_ifu_save_deq_image().
| cpl_error_code eris_ifu_heades_add_hduclass_errs | ( | cpl_propertylist * | plist, |
| deqErrorType | errorType | ||
| ) |
Add error extension classification properties to FITS header.
| plist | FITS header property list to modify |
| errorType | Error type (MSE, RMSE, INVMSE, or INVRMSE) |
Adds DEQ keywords specific to error extensions, including HDUCLAS2, HDUCLAS3 (error type), EXTNAME, and references to SCIDATA and QUALDATA.
Definition at line 297 of file eris_ifu_dfs.c.
References eris_check_error_code().
Referenced by eris_ifu_resample_save_cube(), eris_ifu_save_deq_cube(), and eris_ifu_save_deq_image().
| cpl_error_code eris_ifu_heades_add_hduclass_qual | ( | cpl_propertylist * | plist, |
| deqQualityType | qualityType | ||
| ) |
Add quality extension classification properties to FITS header.
| plist | FITS header property list to modify |
| qualityType | Quality type (MASKZERO, MASKONE, FLAG32BIT, or FLAG16BIT) |
Adds DEQ keywords specific to quality/bad pixel extensions, including HDUCLAS2, HDUCLAS3 (quality type), EXTNAME, and references to SCIDATA and ERRDATA.
Definition at line 324 of file eris_ifu_dfs.c.
References eris_check_error_code().
Referenced by eris_ifu_resample_save_cube(), eris_ifu_save_deq_cube(), and eris_ifu_save_deq_image().
| hdrl_image * eris_ifu_load_cal_image_file | ( | const char * | filename, |
| ifsBand | band, | ||
| ifsPreopticsScale | scale, | ||
| cpl_image ** | qualImage, | ||
| deqQualityType * | qualType | ||
| ) |
Load a calibration image from a filename.
| filename | Input FITS filename |
| band | Expected instrument band (or UNDEFINED_BAND to skip check) |
| scale | Expected pre-optics scale (or UNDEFINED_SCALE to skip check) |
| qualImage | Output quality image (pointer to pointer, can be NULL) |
| qualType | Output quality type detected (pointer, can be NULL) |
Loads a calibration image file and verifies that its band and scale match the expected values. Automatically handles both DEQ format (3 extensions) and old format (single image) files.
Definition at line 1399 of file eris_ifu_dfs.c.
References BRK_WITH_ERROR_MSG, CATCH, eris_check_error_code(), eris_ifu_free_image(), eris_ifu_free_propertylist(), eris_ifu_get_band(), eris_ifu_get_preopticsScale(), eris_ifu_load_deq_hdrl_image(), hdrl_image_create(), hdrl_image_delete(), and TRY.
Referenced by eris_ifu_load_cal_image_frame().
| hdrl_image * eris_ifu_load_cal_image_frame | ( | const cpl_frame * | frame, |
| ifsBand | band, | ||
| ifsPreopticsScale | scale, | ||
| cpl_image ** | qualImage, | ||
| deqQualityType * | qualType | ||
| ) |
Load a calibration image from a frame.
| frame | Input frame |
| band | Expected instrument band (or UNDEFINED_BAND to skip check) |
| scale | Expected pre-optics scale (or UNDEFINED_SCALE to skip check) |
| qualImage | Output quality image (pointer to pointer, can be NULL) |
| qualType | Output quality type detected (pointer, can be NULL) |
Loads a calibration image frame and verifies that its band and scale match the expected values. Automatically handles both DEQ format (3 extensions) and old format (single image) files.
Definition at line 1353 of file eris_ifu_dfs.c.
References CATCH, eris_check_error_code(), eris_ifu_load_cal_image_file(), hdrl_image_delete(), and TRY.
Referenced by eris_ifu_jitter_processSof().
| hdrl_image * eris_ifu_load_deq_hdrl_image | ( | const char * | filename, |
| cpl_propertylist ** | primaryHeader, | ||
| cpl_image ** | qualImage, | ||
| deqQualityType * | qualityType | ||
| ) |
Load a DEQ-format file into an HDRL image structure.
| filename | Input FITS filename |
| primaryHeader | Output primary header property list (pointer to pointer, can be NULL) |
| qualImage | Output quality image (pointer to pointer, can be NULL) |
| qualityType | Output quality type detected (pointer, can be NULL) |
Loads a DEQ-format FITS file and creates an HDRL image structure containing the data and error planes with proper bad pixel masking from the quality extension. The error type is automatically converted to RMSE format required by HDRL.
Definition at line 1116 of file eris_ifu_dfs.c.
References BRK_WITH_ERROR_MSG, CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_load_deq_image(), hdrl_image_create(), hdrl_image_delete(), and TRY.
Referenced by eris_ifu_load_cal_image_file().
| hdrl_imagelist * eris_ifu_load_deq_hdrl_imagelist | ( | const char * | filename, |
| cpl_propertylist ** | primaryHeader, | ||
| cpl_imagelist ** | qualImagelist, | ||
| deqQualityType * | qualityType | ||
| ) |
Load a DEQ-format cube into an HDRL imagelist structure.
| filename | Input FITS filename |
| primaryHeader | Output primary header property list (pointer to pointer, can be NULL) |
| qualImagelist | Output quality imagelist (pointer to pointer, can be NULL) |
| qualityType | Output quality type detected (pointer, can be NULL) |
Loads a DEQ-format datacube FITS file and creates an HDRL imagelist structure with proper bad pixel masking. Each plane is processed individually to flag bad pixels from both the quality extension and NaN/Inf values in data or error.
Definition at line 1218 of file eris_ifu_dfs.c.
References BRK_IF_ERROR, BRK_WITH_ERROR_MSG, CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_is_nan_or_inf(), eris_ifu_load_deq_imagelist(), hdrl_imagelist_create(), hdrl_imagelist_delete(), and TRY.
Referenced by eris_ifu_jitter_extract_spec_processSof().
| cpl_error_code eris_ifu_load_deq_image | ( | const char * | filename, |
| cpl_propertylist ** | primaryHeader, | ||
| cpl_image ** | dataImage, | ||
| cpl_image ** | errImage, | ||
| cpl_image ** | qualImage, | ||
| deqErrorType * | errorType, | ||
| deqQualityType * | qualityType | ||
| ) |
** Function to write a DFS compliant pipeline product with a badpixel map
Load a DEQ-format image with data, error, and quality extensions
| filename | Input FITS filename |
| primaryHeader | Output primary header property list (pointer to pointer, can be NULL) |
| dataImage | Output data image (pointer to pointer) |
| errImage | Output error image (pointer to pointer, can be NULL) |
| qualImage | Output quality image (pointer to pointer, can be NULL) |
| errorType | Output error type detected (pointer, can be NULL) |
| qualityType | Output quality type detected (pointer, can be NULL) |
Loads a DEQ-format FITS file with separate data, error, and quality extensions. The file must have exactly 3 extensions. The error and quality types are determined from the HDUCLAS3 keyword in each extension.
Definition at line 889 of file eris_ifu_dfs.c.
References BRK_WITH_ERROR_MSG, CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_free_propertylist(), and TRY.
Referenced by eris_ifu_load_deq_hdrl_image().
| cpl_error_code eris_ifu_load_deq_imagelist | ( | const char * | filename, |
| cpl_propertylist ** | primaryHeader, | ||
| cpl_imagelist ** | dataImagelist, | ||
| cpl_imagelist ** | errImagelist, | ||
| cpl_imagelist ** | qualImagelist, | ||
| deqErrorType * | errorType, | ||
| deqQualityType * | qualityType | ||
| ) |
Load a DEQ-format imagelist (cube) with data, error, and quality extensions.
| filename | Input FITS filename |
| primaryHeader | Output primary header property list (pointer to pointer, can be NULL) |
| dataImagelist | Output data imagelist (pointer to pointer) |
| errImagelist | Output error imagelist (pointer to pointer, can be NULL) |
| qualImagelist | Output quality imagelist (pointer to pointer, can be NULL) |
| errorType | Output error type detected (pointer, can be NULL) |
| qualityType | Output quality type detected (pointer, can be NULL) |
Loads a DEQ-format datacube FITS file with separate data, error, and quality imagelist extensions. The file must have exactly 3 extensions.
Definition at line 1002 of file eris_ifu_dfs.c.
References BRK_WITH_ERROR_MSG, CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_free_propertylist(), and TRY.
Referenced by eris_ifu_load_deq_hdrl_imagelist().
| cpl_vector * eris_ifu_load_distances | ( | const char * | filename | ) |
Load slitlet distance vector from a table.
| filename | Input FITS table filename |
Loads the "slitlet_distance" column from the first extension of the specified FITS table file. Supports both DOUBLE and FLOAT column types.
Definition at line 1606 of file eris_ifu_dfs.c.
References BRK_IF_ERROR, CATCH, eris_check_error_code(), eris_ifu_free_table(), SET_ERROR, and TRY.
Referenced by eris_ifu_jitter_processSof().
| cpl_error_code eris_ifu_load_distortion_polynomials | ( | const char * | filename, |
| cpl_polynomial *** | polynomials, | ||
| cpl_table ** | borders | ||
| ) |
Load distortion polynomials and slitlet borders from a table.
| filename | Input FITS table filename |
| polynomials | Output array of polynomials (one per slitlet, pointer to pointer) |
| borders | Output table with slitlet border positions (pointer to pointer) |
Loads distortion correction polynomials for all slitlets. The file must contain SLITLET_CNT+1 extensions: one extension per slitlet with polynomial coefficients, plus a final extension with border positions.
Definition at line 1536 of file eris_ifu_dfs.c.
References CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_free_table(), and TRY.
Referenced by eris_ifu_jitter_processSof().
| cpl_error_code eris_ifu_load_distortion_polynomials_old | ( | const char * | filename, |
| cpl_polynomial ** | poly_u, | ||
| cpl_polynomial ** | poly_v | ||
| ) |
Load old-format distortion polynomials from a table.
| filename | Input FITS table filename |
| poly_u | Output polynomial for u direction (pointer to pointer) |
| poly_v | Output polynomial for v direction (pointer to pointer) |
Loads distortion correction polynomials from an old-format table with columns "degx", "degy", and "coeff". The v-direction polynomial is set to a simple identity (coefficient 1.0 for y^1 term).
Definition at line 1477 of file eris_ifu_dfs.c.
References CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_free_table(), and TRY.
Referenced by eris_ifu_jitter_processSof().
| cpl_bivector * eris_ifu_load_slit_positions | ( | const char * | filename | ) |
Load slitlet position bivector from a table.
| filename | Input FITS table filename |
Loads slitlet edge positions from a table. Supports both new format (edge_left/edge_right columns) and old SINFONI format (pos1/pos2 columns).
Definition at line 1659 of file eris_ifu_dfs.c.
References CATCH, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_free_table(), RECOVER, and TRY.
Referenced by eris_ifu_jitter_processSof().
| cpl_error_code eris_ifu_save_deq_cube | ( | cpl_frameset * | allframes, |
| cpl_propertylist * | header, | ||
| const cpl_parameterlist * | parlist, | ||
| const cpl_frameset * | usedframes, | ||
| const cpl_frame * | inherit, | ||
| const char * | recipe, | ||
| cpl_propertylist * | applist, | ||
| const char * | remregexp, | ||
| const char * | filename, | ||
| cpl_imagelist * | data, | ||
| cpl_imagelist * | error, | ||
| deqErrorType | errorType, | ||
| const cpl_imagelist * | dataQualityMask, | ||
| deqQualityType | qualityType | ||
| ) |
Save a DFS-compliant cube product with data, error, and quality extensions.
| allframes | List of all input frames for the recipe |
| header | NULL or property list with additional properties for product header |
| parlist | List of recipe input parameters |
| usedframes | List of raw/calibration frames used for this product |
| inherit | NULL or frame from which product inherits header keywords |
| recipe | Recipe name |
| applist | Property list to append to primary header (must contain PRO.CATG) |
| remregexp | NULL or regexp of properties not to put in main header |
| filename | Output filename for created product |
| data | Data cube (imagelist) to save |
| error | Error cube (imagelist) |
| errorType | Error type: MSE, RMSE, INVMSE, or INVRMSE |
| dataQualityMask | Data quality cube (imagelist) |
| qualityType | Quality type: MASKZERO, MASKONE, FLAG32BIT, or FLAG16BIT |
Creates a DFS-compliant 3D datacube FITS file with:
Definition at line 516 of file eris_ifu_dfs.c.
References CATCH, eris_check_error_code(), eris_ifu_heades_add_hduclass_common(), eris_ifu_heades_add_hduclass_data(), eris_ifu_heades_add_hduclass_errs(), eris_ifu_heades_add_hduclass_qual(), and TRY.
| cpl_error_code eris_ifu_save_deq_image | ( | cpl_frameset * | allframes, |
| cpl_propertylist * | header, | ||
| const cpl_parameterlist * | parlist, | ||
| const cpl_frameset * | usedframes, | ||
| const cpl_frame * | inherit, | ||
| const char * | recipe, | ||
| const cpl_propertylist * | applist, | ||
| const char * | remregexp, | ||
| const char * | filename, | ||
| const cpl_image * | image, | ||
| const cpl_image * | error, | ||
| deqErrorType | errorType, | ||
| const cpl_image * | dataQualityMask, | ||
| deqQualityType | dataQualityType, | ||
| const char * | unit | ||
| ) |
Save a DFS-compliant image product with data, error, and quality extensions.
| allframes | List of all input frames for the recipe |
| header | NULL or property list with additional properties for product header |
| parlist | List of recipe input parameters |
| usedframes | List of raw/calibration frames used for this product |
| inherit | NULL or frame from which product inherits header keywords |
| recipe | Recipe name |
| applist | Property list to append to primary header (must contain PRO.CATG) |
| remregexp | NULL or regexp of properties not to put in main header |
| filename | Output filename for created product |
| image | Data image to save (required) |
| error | Error image (optional, can be NULL) |
| errorType | Error type: MSE, RMSE, INVMSE, or INVRMSE |
| dataQualityMask | Data quality/bad pixel image (optional, can be NULL) |
| dataQualityType | Quality type: MASKZERO, MASKONE, FLAG32BIT, or FLAG16BIT |
| unit | Physical unit string for BUNIT keyword |
Creates a DFS-compliant FITS file according to VLT-SPE-ESO-19500-5667 with:
Definition at line 367 of file eris_ifu_dfs.c.
References CATCH, eris_check_error_code(), eris_ifu_free_propertylist(), eris_ifu_free_string(), eris_ifu_heades_add_hduclass_common(), eris_ifu_heades_add_hduclass_data(), eris_ifu_heades_add_hduclass_errs(), eris_ifu_heades_add_hduclass_qual(), and TRY.
Referenced by eris_ifu_combine_pbp(), eris_ifu_cube_collapse_mean_and_save(), and eris_ifu_jitter_extract().
| cpl_error_code eris_ifu_save_image_phase3 | ( | cpl_frameset * | allframes, |
| const cpl_parameterlist * | parlist, | ||
| const cpl_frameset * | usedframes, | ||
| const char * | recipe, | ||
| const cpl_propertylist * | applist, | ||
| const char * | remregexp, | ||
| const char * | filename, | ||
| const cpl_image * | image, | ||
| cpl_type | type, | ||
| const char * | unit | ||
| ) |
Save a DFS-compliant Phase 3 image product.
| allframes | List of all input frames for the recipe |
| parlist | List of recipe input parameters |
| usedframes | List of raw/calibration frames used for this product |
| recipe | Recipe name |
| applist | Property list to append to primary header (must contain PRO.CATG) |
| remregexp | NULL or regexp of properties not to put in main header |
| filename | Output filename for created product |
| image | Data image to save (required) |
| type | CPL data type for saving the image |
| unit | Physical unit string for BUNIT keyword |
Creates a Phase 3 compliant FITS file with the image in the primary HDU (not as an extension). This format is used for certain simple products.
Definition at line 666 of file eris_ifu_dfs.c.
References CATCH, eris_check_error_code(), eris_ifu_free_propertylist(), eris_ifu_free_string(), and TRY.
Referenced by eris_ifu_combine_pbp(), and eris_ifu_cube_collapse_mean_and_save().
| cpl_error_code eris_ifu_save_table | ( | cpl_frameset * | allframes, |
| cpl_propertylist * | header, | ||
| const cpl_parameterlist * | parlist, | ||
| const cpl_frameset * | usedframes, | ||
| const cpl_frame * | inherit, | ||
| const char * | recipe, | ||
| const char * | procatg, | ||
| cpl_propertylist * | applist, | ||
| const char * | remregexp, | ||
| const char * | filename, | ||
| const cpl_table * | table | ||
| ) |
Save a DFS-compliant table product.
| allframes | List of all input frames for the recipe |
| header | NULL or property list with additional properties for product header |
| parlist | List of recipe input parameters |
| usedframes | List of raw/calibration frames used for this product |
| inherit | NULL or frame from which product inherits header keywords |
| recipe | Recipe name |
| procatg | Output product category string |
| applist | Property list to append to primary header |
| remregexp | NULL or regexp of properties not to put in main header |
| filename | Output filename for created product |
| table | Data table to save |
Creates a DFS-compliant FITS file with:
Definition at line 745 of file eris_ifu_dfs.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), eris_ifu_free_propertylist(), eris_ifu_free_string(), eris_ifu_heades_add_hduclass_common(), and TRY.
| cpl_error_code eris_ifu_set_qc_int | ( | cpl_propertylist * | pl, |
| const char * | name, | ||
| int | val, | ||
| const char * | comment | ||
| ) |
Set (or update) a QC parameter of type INT in a property list.
| pl | Property list |
| name | QC parameter name (without "ESO QC " prefix) |
| val | QC parameter integer value |
| comment | Comment string to attach |
Sets or updates a quality control parameter with automatic "ESO QC " prefix. If the parameter already exists, its value is updated.
Definition at line 1857 of file eris_ifu_dfs.c.
References CATCH, eris_check_error_code(), eris_ifu_free_string(), and TRY.
| cpl_boolean eris_ifu_tag_is_cdb | ( | char * | tag | ) |
check if input frame tag is a static of master calibration
| tag | input tag |
Definition at line 2501 of file eris_ifu_dfs.c.
Referenced by eris_ifu_extract_mst_frames().
| cpl_boolean eris_ifu_tag_is_obj | ( | const char * | tag | ) |
Add PRO* keywords to a SINFONI FITS header.
| tag | input tag |
Definition at line 2553 of file eris_ifu_dfs.c.
Referenced by eris_ifu_extract_obj_frames().
| cpl_boolean eris_ifu_tag_is_sky | ( | const char * | tag | ) |
check if input frame tag is a static of master calibration
| tag | input tag |
Definition at line 2526 of file eris_ifu_dfs.c.
Referenced by eris_ifu_extract_sky_frames().