|
ERIS Pipeline Reference Manual 1.8.15
|
Functions | |
| cpl_error_code | eris_ifu_resample_save_cube (hdrl_resample_result *aCube, const char *procatg, const char *recipe, const char *filename, const cpl_parameterlist *parlist, cpl_frameset *frameset, cpl_boolean gen_phase3) |
| Save resampled cube to FITS file in DEQ (Data-Error-Quality) format. | |
| cpl_error_code | eris_ifu_cube_collapse_mean_and_save (const char *pro_catg, cpl_frameset *frameset, const cpl_parameterlist *parlist, const char *recipe_name, cpl_boolean apply_flat, cpl_boolean is_pupil) |
| -------------------------------------------------------------------------—/ | |
| cpl_error_code | eris_ifu_combine (cubeType obj_type, cpl_frameset *frameset, const cpl_parameterlist *parlist, const char *recipe_name, const char *pipefile_prefix) |
| Resample and combine multiple IFU cubes into a single cube. | |
| cpl_error_code | eris_ifu_resample_trim_edge (hdrl_image *himg, int edge_trim) |
| Trim edge pixels from hdrl_image by rejecting them. | |
| cpl_error_code | eris_ifu_combine_pbp (cpl_frameset *frameset, const cpl_parameterlist *parlist, const char *input_cube_pro_catg, const char *filenameSpec, float *offsetx, float *offsety, const char *offunit, const char *recipe_name, const char *pipefile_prefix) |
| Resample and combine cubes plane-by-plane (2D spatial resampling per wavelength) | |
This module provides functions for resampling and combining IFU data cubes using the HDRL (High-level Data Reduction Library) resampling framework.
The module handles:
The resampling process transforms irregularly sampled IFU data onto a regular output grid defined by RA, DEC, and wavelength parameters. This is essential for combining observations with offsets (jitter/dithering) and for generating uniformly sampled data cubes.
| cpl_error_code eris_ifu_combine | ( | cubeType | obj_type, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parlist, | ||
| const char * | recipe_name, | ||
| const char * | pipefile_prefix | ||
| ) |
Resample and combine multiple IFU cubes into a single cube.
Main function for combining multiple offset IFU cubes using HDRL resampling. Converts cube data to resampling tables, sets up the output grid, applies the specified resampling method, and saves the result.
| obj_type | Cube type (OBJ, STD, PSF, etc.) |
| frameset | Input frameset containing cubes to combine |
| parlist | Recipe parameters |
| recipe_name | Recipe name |
| pipefile_prefix | Output filename prefix |
Definition at line 2142 of file eris_ifu_resample.c.
References eris_check_error_code(), eris_ifu_extract_frameset(), eris_ifu_free_propertylist(), eris_ifu_free_string(), eris_ifu_jitter_get_procatg_and_filename(), eris_ifu_resample_save_cube(), eris_ifu_save_image(), hdrl_image_delete(), hdrl_image_get_error(), hdrl_image_get_image(), hdrl_image_get_mask(), hdrl_imagelist_collapse_mean(), hdrl_parameter_delete(), hdrl_resample_compute(), and hdrl_resample_result_delete().
| cpl_error_code eris_ifu_combine_pbp | ( | cpl_frameset * | frameset, |
| const cpl_parameterlist * | parlist, | ||
| const char * | input_cube_pro_catg, | ||
| const char * | filenameSpec, | ||
| float * | offsetx, | ||
| float * | offsety, | ||
| const char * | offunit, | ||
| const char * | recipe_name, | ||
| const char * | pipefile_prefix | ||
| ) |
Resample and combine cubes plane-by-plane (2D spatial resampling per wavelength)
Combines multiple IFU cubes by resampling each wavelength plane independently in 2D spatial coordinates. This approach is used when full 3D resampling would exceed size limits or when spatial-only resampling is preferred.
| frameset | Input frameset containing cubes |
| parlist | Recipe parameters |
| input_cube_pro_catg | Product category of input cubes |
| filenameSpec | Output filename suffix |
| offsetx | User-defined X offsets (or NULL) |
| offsety | User-defined Y offsets (or NULL) |
| offunit | Offset units ("pix" or "arcsec") |
| recipe_name | Recipe name |
| pipefile_prefix | Output filename prefix |
Definition at line 2462 of file eris_ifu_resample.c.
References eris_check_error_code(), eris_ifu_extract_frameset(), eris_ifu_free_string(), eris_ifu_resample_save_cube(), eris_ifu_resample_trim_edge(), eris_ifu_save_deq_image(), eris_ifu_save_image_phase3(), eris_pfits_get_dit(), eris_pfits_get_ndit(), hdrl_image_create(), hdrl_image_delete(), hdrl_image_duplicate(), hdrl_image_get_error(), hdrl_image_get_image(), hdrl_image_get_mask(), hdrl_image_get_median(), hdrl_image_reject_from_mask(), hdrl_image_sub_scalar(), hdrl_imagelist_collapse_mean(), hdrl_imagelist_delete(), hdrl_imagelist_get_const(), hdrl_imagelist_new(), hdrl_imagelist_set(), hdrl_parameter_delete(), hdrl_resample_compute(), hdrl_resample_image_to_table(), and hdrl_resample_result_delete().
Referenced by eris_stdstar_reduction_common().
| cpl_error_code eris_ifu_cube_collapse_mean_and_save | ( | const char * | pro_catg, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parlist, | ||
| const char * | recipe_name, | ||
| cpl_boolean | apply_flat, | ||
| cpl_boolean | is_pupil | ||
| ) |
-------------------------------------------------------------------------—/
** **
Collapse cube along wavelength axis to mean image and save with QC parameters
Loads a cube from frameset, performs mean collapse along the wavelength (Z) axis, and saves the resulting 2D image in DEQ format. For pupil frames, computes QC parameters for pupil centering shifts. Optionally creates an exposure map at the central wavelength plane.
| pro_catg | Cube product category tag |
| frameset | Input frameset containing the cube |
| parlist | Recipe parameters |
| recipe_name | Recipe name for output file naming |
| apply_flat | If TRUE, creates exposure map at central wavelength |
| is_pupil | If TRUE, computes and adds pupil shift QC parameters |
Definition at line 1752 of file eris_ifu_resample.c.
References eris_check_error_code(), eris_ifu_free_propertylist(), eris_ifu_resample_trim_edge(), eris_ifu_save_deq_image(), eris_ifu_save_image_phase3(), eris_pfits_get_dit(), eris_pfits_get_ndit(), eris_pfits_put_qc(), eris_qclog_add_double_f(), eris_qclog_init(), hdrl_image_create(), hdrl_image_delete(), hdrl_image_get_error(), hdrl_image_get_image(), hdrl_image_get_mask(), hdrl_image_get_size_x(), hdrl_image_get_size_y(), hdrl_image_reject_from_mask(), hdrl_imagelist_collapse_mean(), hdrl_imagelist_create(), and hdrl_imagelist_delete().
Referenced by eris_stdstar_reduction_common().
| cpl_error_code eris_ifu_resample_save_cube | ( | hdrl_resample_result * | aCube, |
| const char * | procatg, | ||
| const char * | recipe, | ||
| const char * | filename, | ||
| const cpl_parameterlist * | parlist, | ||
| cpl_frameset * | frameset, | ||
| cpl_boolean | gen_phase3 | ||
| ) |
Save resampled cube to FITS file in DEQ (Data-Error-Quality) format.
Saves the resampled cube produced by HDRL to a multi-extension FITS file with:
The function handles proper header construction including WCS, PRODCATG keywords, and optional Phase 3 metadata.
| aCube | HDRL resampling result containing cube and header |
| procatg | FITS product category (e.g., "OBJ_CUBE_COMBINED") |
| recipe | Recipe name |
| filename | Output FITS filename |
| parlist | Input recipe parameters |
| frameset | Input frameset for DFS product saving |
| gen_phase3 | If TRUE, add ESO Phase 3 compliant keywords |
Definition at line 900 of file eris_ifu_resample.c.
References eris_check_error_code(), eris_ifu_free_propertylist(), eris_ifu_heades_add_hduclass_common(), eris_ifu_heades_add_hduclass_data(), eris_ifu_heades_add_hduclass_errs(), eris_ifu_heades_add_hduclass_qual(), eris_ifu_sdp_properties_collect(), eris_ifu_sdp_properties_delete(), eris_ifu_sdp_properties_update(), and eris_ifu_split3_hdrl_imagelist().
Referenced by eris_ifu_combine(), and eris_ifu_combine_pbp().
| cpl_error_code eris_ifu_resample_trim_edge | ( | hdrl_image * | himg, |
| int | edge_trim | ||
| ) |
Trim edge pixels from hdrl_image by rejecting them.
Rejects edge_trim pixels from all four edges of the image by marking them as bad pixels in the hdrl_image bad pixel mask.
| himg | HDRL image to be trimmed (modified in place) |
| edge_trim | Number of pixels to trim from each edge |
Definition at line 2387 of file eris_ifu_resample.c.
References eris_check_error_code(), hdrl_image_get_size_x(), hdrl_image_get_size_y(), and hdrl_image_reject().
Referenced by eris_ifu_combine_pbp(), and eris_ifu_cube_collapse_mean_and_save().