|
ERIS Pipeline Reference Manual 1.8.15
|
Modules | |
| IFU Error Macros | |
Functions | |
| cpl_vector * | eris_ifu_idl_where (const cpl_vector *data, double val, int op) |
| Implements the where-function known from IDL. | |
| cpl_vector * | eris_ifu_idl_values_at_indices (const cpl_vector *data, const cpl_vector *indices) |
| Returns a vector of given indices. | |
| cpl_error_code | eris_ifu_cut_endings (cpl_vector **vec, int *begin, int *end, int cut) |
| Cut leading and trailing -1 of a vector. | |
| hdrl_imagelist * | eris_ifu_get_hdrlimagelist_by_tag (cpl_frameset *frameset, const char *tag, int exposureCorrectionMode) |
| Return HDRL imagelist by searching tagged frames in frameset. | |
| cpl_frameset * | eris_ifu_get_frameset_by_tag (const cpl_frameset *frameset, const char *tag) |
| Get frames with given tag from frameset. | |
| cpl_error_code | eris_ifu_parameterlist_append_list (cpl_parameterlist *p1, const cpl_parameterlist *p2) |
| Append a parameterlist to another one. | |
| void | eris_ifu_free_hdrl_image (hdrl_image **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_hdrl_imagelist (hdrl_imagelist **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_image (cpl_image **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_imagelist (cpl_imagelist **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_mask (cpl_mask **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_matrix (cpl_matrix **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_propertylist (cpl_propertylist **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_vector (cpl_vector **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_ifu_vector (eris_ifu_vector **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_string (char **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_frameset (cpl_frameset **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_frame (cpl_frame **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_hdrl_parameter (hdrl_parameter **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_parameter (cpl_parameter **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_parameterlist (cpl_parameterlist **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_table (cpl_table **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_double_array (double **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_float_array (float **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_int_array (int **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_polynomial (cpl_polynomial **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_bivector (cpl_bivector **item) |
| Free memory and set pointer to null. | |
| void | eris_ifu_free_apertures (cpl_apertures **item) |
| Free memory and set pointer to null. | |
| cpl_error_code | eris_ifu_save_image (cpl_frameset *fs, const cpl_propertylist *plist, const cpl_parameterlist *parlist, const char *recipe, const char *procatg, const char *filename, cpl_type type, const cpl_image *image) |
| Save image with DFS compliance. | |
| cpl_error_code | eris_ifu_save_imagelist (cpl_frameset *fs, cpl_frame *inherit, const cpl_propertylist *plist, const cpl_parameterlist *parlist, const char *recipe, const char *procatg, const char *filename, cpl_type type, const cpl_imagelist *imglist) |
| Save imagelist with DFS compliance. | |
| cpl_error_code | eris_ifu_hdrl_image_reject_mask (hdrl_image *img, const cpl_mask *mask) |
| Add mask to HDRL image (reject masked pixels) | |
| cpl_error_code | eris_ifu_save_vector_dbg (const cpl_vector *vec, const char *filename, int create, const cpl_propertylist *pl) |
| Save vector for debugging (quick, no DFS overhead) | |
| cpl_error_code | eris_ifu_save_ifu_vector_dbg (const eris_ifu_vector *vec, const char *filename, int create) |
| Save eris_ifu_vector for debugging (quick, no DFS overhead) | |
| cpl_error_code | eris_ifu_save_bivector_dbg (const cpl_bivector *bivec, const char *filename, int col, int create) |
| Save bivector for debugging (as vector or table) | |
| cpl_error_code | eris_ifu_save_image_dbg (const cpl_image *img, const char *filename, int create, const cpl_propertylist *pl) |
| Save image for debugging (quick, no DFS overhead) | |
| cpl_error_code | eris_ifu_save_table_dbg (const cpl_table *tbl, const char *filename, int create) |
| Save table for debugging (quick, no DFS overhead) | |
| cpl_error_code | eris_ifu_save_mask_dbg (const cpl_mask *mask, const char *filename, int create, const cpl_propertylist *pl) |
| Save mask for debugging (quick, no DFS overhead) | |
| cpl_error_code | eris_ifu_save_imagelist_dbg (const cpl_imagelist *imglist, const char *filename, int create) |
| Save CPL imagelist for debugging (quick, no DFS overhead) | |
| cpl_error_code | eris_ifu_save_cpl_image_dbg (const cpl_image *img, const char *name, int singlefile, const cpl_propertylist *pl) |
| Save CPL image with mask for debugging. | |
| cpl_error_code | eris_ifu_save_cpl_imagelist_dbg (const cpl_imagelist *imglist, const char *name) |
| Save CPL imagelist for debugging. | |
| cpl_error_code | eris_ifu_save_hdrl_image_dbg (const hdrl_image *hdrl_img, const char *filename, int singlefile, const cpl_propertylist *pl) |
| Save HDRL image for debugging (data + error + mask) | |
| cpl_error_code | eris_ifu_save_hdrl_imagelist_dbg (const hdrl_imagelist *hdrl_img_list, const char *filename, int singlefile) |
| Save HDRL imagelist for debugging (data + error + mask planes) | |
| cpl_mask * | eris_ifu_load_badpixel_mask (const cpl_frameset *frameset, const char *category, int ext) |
| ** | |
| cpl_error_code | eris_ifu_file_exists (const char *filename) |
| ** | |
| cpl_imagelist * | eris_ifu_hdrl_get_imagelist (const hdrl_imagelist *hdrl_imglist, enum hdrl_t type) |
| Extract from an HDRL imagelist a specific CPL imagelist. | |
| char * | eris_ifu_get_lampString (int lampStatus) |
| Convert lamp status bitmask to string. | |
| const char * | eris_ifu_get_bandString (ifsBand band) |
| Convert band enum to string. | |
| double | eris_ifu_get_band_resolution (ifsBand band) |
| Get nominal spectral resolution for a given band. | |
| cpl_error_code | eris_ifu_get_plane_cut_min_max (ifsBand band, cpl_size *zmin, cpl_size *zmax) |
| Get band-specific plane indices for NaN trimming. | |
| cpl_error_code | eris_ifu_cube_set_values (hdrl_imagelist **iml) |
| Set specific pixel values in HDRL imagelist (debugging utility) | |
| cpl_error_code | eris_ifu_cube_trim_nans (const cpl_size zmin, const cpl_size zmax, hdrl_imagelist **iml, cpl_imagelist **bpm, cpl_propertylist *header) |
| Trim NaN-dominated planes from cube edges. | |
| const char * | eris_ifu_get_instrumentString (ifsInstrument instrument) |
| Convert instrument enum to string. | |
| const char * | eris_ifu_get_preopticsScaleString (ifsPreopticsScale scale) |
| Convert pre-optics scale enum to string. | |
| cpl_image * | eris_ifu_image_create_window (const cpl_image *img) |
| Create sub-image by removing bad pixel border. | |
| cpl_mask * | eris_ifu_mask_create_border (const cpl_mask *mask) |
| Add bad pixel border around mask. | |
| cpl_error_code | eris_ifu_mask_nans_in_hdrlimage (hdrl_image **hima) |
| Flag NaNs in HDRL image. | |
| cpl_error_code | eris_ifu_mask_nans_in_cube (cpl_imagelist *cube) |
| Mask NaNs and Infs in CPL imagelist (cube) | |
| cpl_mask * | eris_ifu_quality2bp_mask (const cpl_image *qualityMask, deqQualityType qualityType) |
| transform input image (quality mask) to output mask with given bit code | |
| cpl_imagelist * | eris_ifu_interpolatedMask_to_maskZero (cpl_imagelist *bpmCube, double threshold) |
| return cube flagging (as 1) pixels above a given threshold | |
| cpl_error_code | eris_ifu_split_hdrl_imagelist (hdrl_imagelist *cube, cpl_imagelist *dataCube, cpl_imagelist *errorCube) |
| extract from hdrl_imagelist the data and error information | |
| cpl_error_code | eris_ifu_split3_hdrl_imagelist (hdrl_imagelist *cube, cpl_imagelist *dataCube, cpl_imagelist *errorCube, cpl_imagelist *qualCube) |
| extract from hdrl_imagelist the data and error information | |
| cpl_table * | eris_qclog_init (void) |
| Initialize QC table. | |
| cpl_error_code | eris_qclog_add_int (cpl_table *table, const char *key_name, const int value, const char *key_help) |
| add QC int info to table | |
| cpl_error_code | eris_qclog_add_bool (cpl_table *table, const char *key_name, const char *key_help) |
| add QC boolean info to table | |
| cpl_error_code | eris_qclog_add_double (cpl_table *table, const char *key_name, const double value, const char *key_help) |
| add QC double info to table | |
| cpl_error_code | eris_qclog_add_double_f (cpl_table *table, const char *key_name, const double value, const char *key_help) |
| add QC float info to table | |
| cpl_error_code | eris_qclog_add_double_format (cpl_table *table, const char *key_name, const double value, const char *key_help) |
| add QC double (with format) info to table | |
| cpl_error_code | eris_qclog_add_string (cpl_table *table, const char *key_name, const char *value, const char *key_help) |
| add QC string info to table | |
| cpl_error_code | eris_pfits_put_qc (cpl_propertylist *plist, cpl_table *qclog) |
| convert table with QC parameter information to a propertylist | |
| cpl_error_code | eris_ifu_get_badpix_qc_from_ima (const cpl_image *image, cpl_propertylist *qc_list, const char *prefix) |
| compute QC keyword with number of bad pixels and fraction to total | |
| cpl_error_code | eris_ifu_get_badpix_qc_from_mask (const cpl_mask *bp_mask, cpl_propertylist *qc_list, const char *prefix) |
| compute QC keyword with number of bad pixels and fraction to total | |
| cpl_propertylist * | eris_compute_psf_qc (hdrl_image *hima, const cpl_parameterlist *parlist, const char *context) |
| compute QC parameters on a PSF STD image | |
| cpl_mask * | eris_ifu_hima_get_obj_mask_percent (hdrl_image *hima, const double percent) |
| find mask flagging pixels above percent(%) pixels with lower intensity | |
| cpl_mask * | eris_ifu_hima_get_obj_mask (hdrl_image *hima, const cpl_size niter, const double kappa) |
| find mask flagging pixels above a threshold set by ks-clip algorithm | |
| cpl_error_code | eris_get_pupil_shift (hdrl_imagelist *iml, const int n, cpl_table **qclog_tbl) |
| Get what object shift. | |
| cpl_mask * | eris_ifu_mask_from_image (const cpl_image *img_mask) |
| eris_ifu_mask_from_image | |
This module provides a comprehensive collection of utility functions for ERIS IFU data processing, organized into several categories:
where() function for conditional element selection| cpl_propertylist * eris_compute_psf_qc | ( | hdrl_image * | hima, |
| const cpl_parameterlist * | parlist, | ||
| const char * | context | ||
| ) |
compute QC parameters on a PSF STD image
| hima | input image |
| parlist | input parameters |
| context | parameter context (prefix+recipe name) |
Definition at line 3274 of file eris_ifu_utils.c.
References eris_check_error_code(), eris_ifu_is_nan_or_inf(), eris_parameters_get_double(), eris_pfits_put_qc(), eris_qclog_add_double(), eris_qclog_add_double_f(), eris_qclog_add_int(), eris_qclog_init(), hdrl_image_get_image(), hdrl_image_get_size_x(), and hdrl_image_get_size_y().
Referenced by eris_ifu_jitter_extract().
| cpl_error_code eris_get_pupil_shift | ( | hdrl_imagelist * | iml, |
| const int | n, | ||
| cpl_table ** | qclog_tbl | ||
| ) |
Get what object shift.
| iml | imagelist |
| n | imagelist sequence |
| qclog_tbl | qclog table |
Definition at line 3603 of file eris_ifu_utils.c.
References eris_check_error_code(), eris_qclog_add_double_f(), hdrl_image_delete(), hdrl_image_get_image(), hdrl_image_get_size_x(), hdrl_image_get_size_y(), and hdrl_imagelist_collapse_median().
Referenced by eris_stdstar_reduction_common().
| cpl_error_code eris_ifu_cube_set_values | ( | hdrl_imagelist ** | iml | ) |
Set specific pixel values in HDRL imagelist (debugging utility)
| iml | HDRL imagelist to modify (modified in-place) |
Development/debugging function that sets pixels [10:20, 10:20] in each plane to plane_index * 10.
Definition at line 1953 of file eris_ifu_utils.c.
References eris_check_error_code(), hdrl_image_set_pixel(), hdrl_imagelist_get(), and hdrl_imagelist_get_size().
| cpl_error_code eris_ifu_cube_trim_nans | ( | const cpl_size | zmin, |
| const cpl_size | zmax, | ||
| hdrl_imagelist ** | iml, | ||
| cpl_imagelist ** | bpm, | ||
| cpl_propertylist * | header | ||
| ) |
Trim NaN-dominated planes from cube edges.
| zmin | Planes in range [0,zmin) are removed |
| zmax | Planes in range (zmax,size-1] are removed |
| iml | HDRL imagelist (modified in-place) |
| bpm | Bad pixel map imagelist (modified in-place) |
| header | FITS header (CRVAL3, NAXIS3 updated) |
Removes spectral planes from both ends of a cube that are dominated by NaNs. Updates WCS keywords (CRVAL3, NAXIS3) to reflect the new spectral range.
Definition at line 2001 of file eris_ifu_utils.c.
References eris_check_error_code(), hdrl_imagelist_get_size(), and hdrl_imagelist_unset().
Referenced by eris_ifu_jitter_process_exposures().
| cpl_error_code eris_ifu_cut_endings | ( | cpl_vector ** | vec, |
| int * | begin, | ||
| int * | end, | ||
| int | cut | ||
| ) |
Cut leading and trailing -1 of a vector.
| vec | (Input) Vector to trim. (Output) Trimmed vector, if cut is TRUE. |
| begin | NULL or variable to hold determined beginning position (zero based). Set to zero in case of error. |
| end | NULL or variable to hold determined ending position (zero based). Set to zero in case of error. |
| cut | TRUE if vec should be trimmed, FALSE if just the start and end positions should be determined. Setting begin and end to NULL and cut to FALSE is senseless. |
This function only cuts -1. Other negative numbers are classified as ok.
Possible cpl_error_code set in this function:
vec is NULL. Definition at line 297 of file eris_ifu_utils.c.
References CATCH, eris_check_error_code(), eris_ifu_free_vector(), and TRY.
Referenced by eris_ifu_idl_where().
| cpl_error_code eris_ifu_file_exists | ( | const char * | filename | ) |
**
Check if file exists
| filename | Name of the file to look up. |
Simple file existence check using fopen(). Does not validate FITS format.
Definition at line 1668 of file eris_ifu_utils.c.
References CATCH, eris_check_error_code(), and TRY.
Referenced by eris_ifu_detlin_load_frames(), eris_ifu_frame_is_on(), eris_ifu_frame_is_sky(), and eris_ifu_get_hdrlimagelist_by_tag().
| void eris_ifu_free_apertures | ( | cpl_apertures ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_apertures pointer |
Definition at line 840 of file eris_ifu_utils.c.
| void eris_ifu_free_bivector | ( | cpl_bivector ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_bivector pointer |
Definition at line 826 of file eris_ifu_utils.c.
Referenced by eris_ifu_dist_wave(), eris_ifu_jitter_extract(), and eris_ifu_wave_get_calImg().
| void eris_ifu_free_double_array | ( | double ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to double array pointer |
Definition at line 768 of file eris_ifu_utils.c.
Referenced by eris_ifu_1d_interpolation(), and eris_ifu_wave_resampled_arc_image().
| void eris_ifu_free_float_array | ( | float ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to float array pointer |
Definition at line 783 of file eris_ifu_utils.c.
| void eris_ifu_free_frame | ( | cpl_frame ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_frame pointer |
Definition at line 697 of file eris_ifu_utils.c.
| void eris_ifu_free_frameset | ( | cpl_frameset ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_frameset pointer |
Definition at line 683 of file eris_ifu_utils.c.
Referenced by eris_ifu_get_hdrlimagelist_by_tag().
| void eris_ifu_free_hdrl_image | ( | hdrl_image ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to hdrl_image pointer |
Definition at line 542 of file eris_ifu_utils.c.
References hdrl_image_delete().
Referenced by eris_ifu_dark_qc(), eris_ifu_dark_static(), eris_ifu_jitter_build_cube(), eris_ifu_jitter_extract(), eris_ifu_jitter_process_exposures(), eris_ifu_load_exposure_file(), eris_ifu_warp_polynomial_image(), and eris_ifu_wave_collapse_arc_images().
| void eris_ifu_free_hdrl_imagelist | ( | hdrl_imagelist ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to hdrl_imagelist pointer |
Definition at line 556 of file eris_ifu_utils.c.
References hdrl_imagelist_delete().
Referenced by eris_ifu_detlin_load_frames(), eris_ifu_dist_wave(), eris_ifu_get_hdrlimagelist_by_tag(), eris_ifu_jitter_process_exposures(), and eris_ifu_wave_collapse_arc_images().
| void eris_ifu_free_hdrl_parameter | ( | hdrl_parameter ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to hdrl_parameter pointer |
Definition at line 711 of file eris_ifu_utils.c.
References hdrl_parameter_delete().
Referenced by eris_ifu_add_std_params(), eris_ifu_calc_bpm(), eris_ifu_detlin_compute_linearity(), eris_parlist_config_add_bpm(), and eris_parlist_config_add_flat().
| void eris_ifu_free_ifu_vector | ( | eris_ifu_vector ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to eris_ifu_vector pointer |
Definition at line 654 of file eris_ifu_utils.c.
References eris_ifu_vector_delete().
Referenced by eris_ifu_dist_calc_centers_fit(), eris_ifu_dist_calc_centers_profile(), and eris_ifu_dist_calc_distortion().
| void eris_ifu_free_image | ( | cpl_image ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_image pointer |
Definition at line 570 of file eris_ifu_utils.c.
Referenced by eris_ifu_calc_bpm(), eris_ifu_calc_centers_collapse_chunk(), eris_ifu_calc_noise_map(), eris_ifu_combine_build_mask_cube(), eris_ifu_combine_coadd_ks_clip(), eris_ifu_combine_jittered_images(), eris_ifu_combine_read_image_planes(), eris_ifu_combine_shift_image_kmos(), eris_ifu_dar_correction(), eris_ifu_dar_cpl_shift(), eris_ifu_dark_get_dqi(), eris_ifu_dark_qc(), eris_ifu_dark_static(), eris_ifu_detlin_compute_linearity(), eris_ifu_dist_wave(), eris_ifu_hdrl_get_imagelist(), eris_ifu_image_collapse(), eris_ifu_image_create_window(), eris_ifu_jitter_build_cube(), eris_ifu_jitter_extract(), eris_ifu_jitter_subtract_background(), eris_ifu_load_cal_image_file(), eris_ifu_load_exposure_file(), eris_ifu_save_resampled_arc_images(), eris_ifu_warp_polynomial_image(), and eris_ifu_wave_get_calImg().
| void eris_ifu_free_imagelist | ( | cpl_imagelist ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_imagelist pointer |
Definition at line 584 of file eris_ifu_utils.c.
Referenced by eris_ifu_calc_bpm(), eris_ifu_hdrl_get_imagelist(), eris_ifu_jitter_process_cubes(), eris_ifu_jitter_reconstruct_cube(), and eris_ifu_save_hdrl_imagelist_dbg().
| void eris_ifu_free_int_array | ( | int ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to int array pointer |
Definition at line 798 of file eris_ifu_utils.c.
Referenced by eris_ifu_lcorr_get_peak_lambdas().
| void eris_ifu_free_mask | ( | cpl_mask ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_mask pointer |
Definition at line 598 of file eris_ifu_utils.c.
Referenced by eris_ifu_calc_bpm(), eris_ifu_combine_read_image_planes(), eris_ifu_dark_static(), eris_ifu_detect_crh(), eris_ifu_detlin_filter_mask(), eris_ifu_jitter_process_cubes(), eris_ifu_jitter_subtract_background(), eris_ifu_load_badpixel_mask(), eris_ifu_mask_create_border(), and eris_ifu_mask_from_image().
| void eris_ifu_free_matrix | ( | cpl_matrix ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_matrix pointer |
Definition at line 612 of file eris_ifu_utils.c.
| void eris_ifu_free_parameter | ( | cpl_parameter ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_parameter pointer |
Definition at line 725 of file eris_ifu_utils.c.
Referenced by eris_ifu_add_std_params(), eris_ifu_fetch_std_param(), eris_parlist_config_add_all_recipes(), and eris_parlist_config_add_bpm().
| void eris_ifu_free_parameterlist | ( | cpl_parameterlist ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_parameterlist pointer |
Definition at line 739 of file eris_ifu_utils.c.
Referenced by eris_ifu_add_std_params(), eris_ifu_jitter_process_cubes(), eris_parlist_config_add_bpm(), and eris_parlist_config_add_flat().
| void eris_ifu_free_polynomial | ( | cpl_polynomial ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_polynomial pointer |
Definition at line 812 of file eris_ifu_utils.c.
Referenced by eris_ifu_dist_wave(), eris_ifu_jitter_process_exposures(), eris_ifu_wave_get_calImg(), and eris_ifu_wave_smooth_coeffs().
| void eris_ifu_free_propertylist | ( | cpl_propertylist ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_propertylist pointer |
Definition at line 626 of file eris_ifu_utils.c.
Referenced by eris_ifu_combine(), eris_ifu_combine_min_cube_size(), eris_ifu_combine_read_image_planes(), eris_ifu_cube_collapse_mean_and_save(), eris_ifu_detlin_load_frames(), eris_ifu_dist_calc_centers(), eris_ifu_dist_wave(), eris_ifu_frame_is_on(), eris_ifu_frame_is_sky(), eris_ifu_get_instrument_frame(), eris_ifu_jitter_build_cube(), eris_ifu_jitter_extract(), eris_ifu_load_cal_image_file(), eris_ifu_load_deq_image(), eris_ifu_load_deq_imagelist(), eris_ifu_load_exposure_file(), eris_ifu_resample_save_cube(), eris_ifu_save_deq_image(), eris_ifu_save_image_phase3(), eris_ifu_save_resampled_arc_images(), eris_ifu_save_table(), eris_ifu_wave_get_arc_images(), eris_ifu_wave_get_refLines(), eris_ifu_wave_save_fitting_tables(), and eris_ifu_wave_save_spectrum().
| void eris_ifu_free_string | ( | char ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to char pointer (string) |
Definition at line 669 of file eris_ifu_utils.c.
Referenced by eris_ifu_add_std_params(), eris_ifu_append_qc_double(), eris_ifu_append_qc_float(), eris_ifu_append_qc_int(), eris_ifu_calc_bpm(), eris_ifu_combine(), eris_ifu_combine_pbp(), eris_ifu_dark_qc(), eris_ifu_dist_calc_centers(), eris_ifu_fetch_std_param(), eris_ifu_frame_is_on(), eris_ifu_frame_is_sky(), eris_ifu_jitter_build_cube(), eris_ifu_jitter_fill_common_parameterlist(), eris_ifu_jitter_get_objsky_exposures(), eris_ifu_jitter_process_cubes(), eris_ifu_jitter_subtract_background(), eris_ifu_save_cpl_imagelist_dbg(), eris_ifu_save_deq_image(), eris_ifu_save_image(), eris_ifu_save_image_phase3(), eris_ifu_save_imagelist(), eris_ifu_save_table(), eris_ifu_set_qc_int(), eris_ifu_stdstar_fill_common_parameterlist(), eris_ifu_wave_get_arc_images(), eris_ifu_wave_get_firstFitTable(), eris_ifu_wave_resampled_arc_image(), eris_parlist_config_add_all_recipes(), eris_parlist_config_add_bpm(), eris_parlist_config_add_flat(), and eris_stdstar_reduction_common().
| void eris_ifu_free_table | ( | cpl_table ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_table pointer |
Definition at line 753 of file eris_ifu_utils.c.
Referenced by eris_ifu_dist_calc_centers(), eris_ifu_dist_wave(), eris_ifu_distortion_reduce_identical_lines(), eris_ifu_distortion_reduce_lines(), eris_ifu_get_first_fit(), eris_ifu_jitter_process_cubes(), eris_ifu_load_distances(), eris_ifu_load_distortion_polynomials(), eris_ifu_load_distortion_polynomials_old(), eris_ifu_load_slit_positions(), eris_ifu_read_wave_setup(), eris_ifu_wave_free_tables(), eris_ifu_wave_get_arc_images(), eris_ifu_wave_get_calImg(), eris_ifu_wave_get_firstFitTable(), and eris_ifu_wave_get_refLines().
| void eris_ifu_free_vector | ( | cpl_vector ** | item | ) |
Free memory and set pointer to null.
| item | Pointer to cpl_vector pointer |
Definition at line 640 of file eris_ifu_utils.c.
Referenced by eris_ifu_calc_centers_collapse_chunk(), eris_ifu_combine_coadd(), eris_ifu_combine_coadd_ks_clip(), eris_ifu_combine_coadd_ks_clip_internal(), eris_ifu_cut_endings(), eris_ifu_dar_correction(), eris_ifu_dar_cpl_shift(), eris_ifu_dark_noise(), eris_ifu_dark_qc(), eris_ifu_detlin_load_frames(), eris_ifu_dist_calc_centers(), eris_ifu_dist_calc_centers_fit(), eris_ifu_dist_calc_centers_profile(), eris_ifu_dist_estimate_low_slitlet(), eris_ifu_dist_wave(), eris_ifu_exposure_column_correction(), eris_ifu_exposure_line_correction(), eris_ifu_fit_all_lines(), eris_ifu_get_first_fit(), eris_ifu_idl_values_at_indices(), eris_ifu_idl_where(), eris_ifu_image_collapse(), eris_ifu_jitter_extract(), eris_ifu_lcorr_get_peak_lambdas(), eris_ifu_polyfit_1d(), eris_ifu_slitpos_gauss(), eris_ifu_warp_polynomial_image(), eris_ifu_wave_collapse_slitlet(), eris_ifu_wave_get_calImg(), eris_ifu_wave_get_refLines(), and eris_ifu_wave_resampled_arc_image().
| cpl_error_code eris_ifu_get_badpix_qc_from_ima | ( | const cpl_image * | image, |
| cpl_propertylist * | qc_list, | ||
| const char * | prefix | ||
| ) |
compute QC keyword with number of bad pixels and fraction to total
| image | input image (a bad pixel map, intensity [0,1] |
| qc_list | output property list to add QC keywords |
| prefix | prefix of QC keyword |
Definition at line 2961 of file eris_ifu_utils.c.
References eris_check_error_code(), eris_ifu_append_qc_double(), and eris_ifu_append_qc_int().
Referenced by eris_ifu_detlin_compute_linearity().
| cpl_error_code eris_ifu_get_badpix_qc_from_mask | ( | const cpl_mask * | bp_mask, |
| cpl_propertylist * | qc_list, | ||
| const char * | prefix | ||
| ) |
compute QC keyword with number of bad pixels and fraction to total
| bp_mask | input bad pixel mask |
| qc_list | output property list to add QC keywords |
| prefix | prefix of QC keyword |
Definition at line 3006 of file eris_ifu_utils.c.
References eris_check_error_code(), eris_ifu_append_qc_double(), and eris_ifu_append_qc_int().
| double eris_ifu_get_band_resolution | ( | ifsBand | band | ) |
Get nominal spectral resolution for a given band.
| band | Band enumeration |
Returns the nominal spectral resolution for each ERIS IFU band.
Definition at line 1867 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_ifu_lcorr_crosscorrelate_spectra(), and eris_ifu_sdp_properties_collect().
| const char * eris_ifu_get_bandString | ( | ifsBand | band | ) |
Convert band enum to string.
| band | Band enumeration |
Converts ifsBand enumeration to human-readable string.
Definition at line 1790 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_ifu_distortion_reduce_lines(), eris_ifu_jitter_processSof(), eris_ifu_read_wave_setup(), eris_ifu_wave_get_firstFitTable(), eris_ifu_wave_save_fitting_tables(), eris_ifu_wave_save_spectrum(), and eris_stdstar_reduction_common().
| cpl_frameset * eris_ifu_get_frameset_by_tag | ( | const cpl_frameset * | frameset, |
| const char * | tag | ||
| ) |
Get frames with given tag from frameset.
| frameset | frame set |
| tag | to search for |
Definition at line 455 of file eris_ifu_utils.c.
References BRK_WITH_ERROR_MSG, CATCH, CHECK_ERROR_STATE, eris_check_error_code(), and TRY.
Referenced by eris_ifu_get_hdrlimagelist_by_tag().
| hdrl_imagelist * eris_ifu_get_hdrlimagelist_by_tag | ( | cpl_frameset * | frameset, |
| const char * | tag, | ||
| int | exposureCorrectionMode | ||
| ) |
Return HDRL imagelist by searching tagged frames in frameset.
| frameset | The input frameset (of the recipe) |
| tag | The tag name of the frames to be selected |
| exposureCorrectionMode | data correction to be applied |
The function returns an HDRL imagelist (and, if requested, a CPL imagelist) by searching an input frameset for frames with the proper tag name. If no frames with the tag are found a NULL pointer will be returned. No error images in the HDRL imagelist will be created.
Definition at line 394 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), eris_ifu_file_exists(), eris_ifu_free_frameset(), eris_ifu_free_hdrl_imagelist(), eris_ifu_get_frameset_by_tag(), eris_ifu_load_exposure_file(), hdrl_imagelist_get_size(), hdrl_imagelist_new(), hdrl_imagelist_set(), and TRY.
| const char * eris_ifu_get_instrumentString | ( | ifsInstrument | instrument | ) |
Convert instrument enum to string.
| instrument | Instrument enumeration |
Definition at line 2048 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_stdstar_reduction_common().
| char * eris_ifu_get_lampString | ( | int | lampStatus | ) |
Convert lamp status bitmask to string.
| lampStatus | Bitmask of lamp states (AR_LAMP | KR_LAMP | NE_LAMP | XE_LAMP) |
Converts lamp status bitmask to human-readable string.
Definition at line 1762 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_ifu_get_first_fit(), eris_ifu_save_resampled_arc_images(), eris_ifu_wave_get_arc_images(), and eris_ifu_wave_save_spectrum().
| cpl_error_code eris_ifu_get_plane_cut_min_max | ( | ifsBand | band, |
| cpl_size * | zmin, | ||
| cpl_size * | zmax | ||
| ) |
Get band-specific plane indices for NaN trimming.
| band | Band enumeration |
| zmin | output: minimum valid plane index (0-based) |
| zmax | output: maximum valid plane index (0-based) |
Returns the range of spectral planes that have less than 50% NaN pixels for a given band. Planes outside [zmin, zmax] are typically trimmed.
Definition at line 1909 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_ifu_jitter_process_exposures().
| const char * eris_ifu_get_preopticsScaleString | ( | ifsPreopticsScale | scale | ) |
Convert pre-optics scale enum to string.
| scale | Pre-optics scale enumeration |
Converts the pre-optics scale (pixel scale) to human-readable string.
Definition at line 2073 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_stdstar_reduction_common().
| cpl_imagelist * eris_ifu_hdrl_get_imagelist | ( | const hdrl_imagelist * | hdrl_imglist, |
| enum hdrl_t | type | ||
| ) |
Extract from an HDRL imagelist a specific CPL imagelist.
| hdrl_imglist | The input hdrl_imagelist |
| type | Either eris_hdrl_data, eris_hdrl_error, or eris_hdrl_badpix |
Extracts one component (data or error) from an HDRL imagelist as a CPL imagelist. The bad pixel type is not fully implemented.
Definition at line 1703 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), eris_ifu_free_image(), eris_ifu_free_imagelist(), hdrl_image_get_error_const(), hdrl_image_get_image_const(), hdrl_imagelist_get(), hdrl_imagelist_get_size(), and TRY.
Referenced by eris_ifu_save_hdrl_imagelist_dbg().
| cpl_error_code eris_ifu_hdrl_image_reject_mask | ( | hdrl_image * | img, |
| const cpl_mask * | mask | ||
| ) |
Add mask to HDRL image (reject masked pixels)
| img | HDRL image to modify |
| mask | Mask to apply (CPL_BINARY_1 = bad pixel) |
Combines the input mask with the HDRL image's internal bad pixel mask. Pixels marked as bad (CPL_BINARY_1) in the input mask will be rejected in the HDRL image if they are currently marked as good.
Possible cpl_error_code set in this function:
Definition at line 999 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), hdrl_image_get_mask(), hdrl_image_get_size_x(), hdrl_image_get_size_y(), and TRY.
Referenced by eris_ifu_dark_qc().
| cpl_mask * eris_ifu_hima_get_obj_mask | ( | hdrl_image * | hima, |
| const cpl_size | niter, | ||
| const double | kappa | ||
| ) |
find mask flagging pixels above a threshold set by ks-clip algorithm
| hima | input hdrl image |
| niter | number of kapa-sigma iterations |
| kappa | kappa used in kappa-sigma clip of (object) data |
Definition at line 3548 of file eris_ifu_utils.c.
References eris_check_error_code(), hdrl_image_get_image(), hdrl_image_get_median(), hdrl_image_get_stdev(), and hdrl_image_reject_from_mask().
| cpl_mask * eris_ifu_hima_get_obj_mask_percent | ( | hdrl_image * | hima, |
| const double | percent | ||
| ) |
find mask flagging pixels above percent(%) pixels with lower intensity
| hima | input hdrl image |
| percent | input percent threshold |
Definition at line 3503 of file eris_ifu_utils.c.
References hdrl_image_get_image(), hdrl_image_get_size_x(), and hdrl_image_get_size_y().
| cpl_vector * eris_ifu_idl_values_at_indices | ( | const cpl_vector * | data, |
| const cpl_vector * | indices | ||
| ) |
Returns a vector of given indices.
| data | The data vector. |
| indices | The indices to the data vector. |
The returned vector contains the values of data indicated by indices . indices needn't be orderd, so will also have the returned vector the same order.
Possible cpl_error_code set in this function:
data is NULL or if an illegal op is provided. Definition at line 232 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), eris_ifu_free_vector(), SET_ERROR_MSG, and TRY.
| cpl_vector * eris_ifu_idl_where | ( | const cpl_vector * | data, |
| double | val, | ||
| int | op | ||
| ) |
Implements the where-function known from IDL.
| data | The vector. |
| val | The value. |
| op | The operator. |
The vector is checked elementwise like 'data[i] op val'. The operator can be any of following enums: eq: data[i] == val ne: data[i] != val ge: data[i] >= val gt: data[i] > val le: data[i] <= val lt: data[i] < val
Possible cpl_error_code set in this function:
data is NULL or if an illegal op is provided. Definition at line 142 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_cut_endings(), eris_ifu_free_vector(), SET_ERROR_MSG, and TRY.
| cpl_image * eris_ifu_image_create_window | ( | const cpl_image * | img | ) |
Create sub-image by removing bad pixel border.
| img | input image |
Removes a border of ERIS_IFU_DETECTOR_BP_BORDER pixels from all sides of the image, including its bad pixel mask.
Definition at line 2111 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_free_image(), and TRY.
| cpl_imagelist * eris_ifu_interpolatedMask_to_maskZero | ( | cpl_imagelist * | bpmCube, |
| double | threshold | ||
| ) |
return cube flagging (as 1) pixels above a given threshold
| bpmCube | input imagelist |
| threshold | threshold |
Definition at line 2434 of file eris_ifu_utils.c.
References ASSURE, CATCH, eris_check_error_code(), and TRY.
| cpl_mask * eris_ifu_load_badpixel_mask | ( | const cpl_frameset * | frameset, |
| const char * | category, | ||
| int | ext | ||
| ) |
**
Load bad pixel mask of a given category.
| frameset | The input set-of-frames. |
| category | The category of the bad pixel mask to load. If NULL, the next frame with same keyword as accessed right before will be returned |
| ext | The number of the extension. 0 for primary HDU |
Loads a CPL mask from a FITS file identified by tag in the frameset.
Definition at line 1547 of file eris_ifu_utils.c.
References ASSURE, CATCH, CATCH_MSG, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_free_mask(), and TRY.
| cpl_mask * eris_ifu_mask_create_border | ( | const cpl_mask * | mask | ) |
Add bad pixel border around mask.
| mask | input mask |
Adds a border of ERIS_IFU_DETECTOR_BP_BORDER pixels around the mask. Border pixels are initialized to CPL_BINARY_0 (good).
Definition at line 2171 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_free_mask(), and TRY.
| cpl_mask * eris_ifu_mask_from_image | ( | const cpl_image * | img_mask | ) |
eris_ifu_mask_from_image
| img_mask |
convert image to mask img: 1: good, 0:bad mask: 0: good, 1: bad
Definition at line 3670 of file eris_ifu_utils.c.
References BRK_IF_NULL, CATCH, CATCH_MSG, eris_ifu_free_mask(), and TRY.
| cpl_error_code eris_ifu_mask_nans_in_cube | ( | cpl_imagelist * | cube | ) |
Mask NaNs and Infs in CPL imagelist (cube)
| cube | input imagelist (modified in-place) |
Scans all planes in cube for non-finite values (NaN, Inf, -Inf) and marks them as bad pixels.
Definition at line 2274 of file eris_ifu_utils.c.
References BRK_WITH_ERROR_MSG, CATCH, CHECK_ERROR_STATE, eris_check_error_code(), and TRY.
Referenced by eris_ifu_jitter_build_cube(), eris_ifu_jitter_reconstruct_cube(), eris_ifu_lcorr_create_object_mask(), and eris_ifu_lcorr_get().
| cpl_error_code eris_ifu_mask_nans_in_hdrlimage | ( | hdrl_image ** | hima | ) |
Flag NaNs in HDRL image.
| hima | input HDRL image (modified in-place) |
Scans both data and error planes for NaN values and marks corresponding pixels as bad in the mask.
Definition at line 2226 of file eris_ifu_utils.c.
References eris_check_error_code(), hdrl_image_get_error(), hdrl_image_get_image(), hdrl_image_get_mask(), hdrl_image_get_size_x(), and hdrl_image_get_size_y().
| cpl_error_code eris_ifu_parameterlist_append_list | ( | cpl_parameterlist * | p1, |
| const cpl_parameterlist * | p2 | ||
| ) |
Append a parameterlist to another one.
| p1 | The 1st list to be extended |
| p2 | The 2nd list to be appended |
Definition at line 508 of file eris_ifu_utils.c.
References CATCH, CHECK_ERROR_STATE, eris_check_error_code(), and TRY.
Referenced by eris_ifu_add_std_params(), eris_parlist_config_add_bpm(), and eris_parlist_config_add_flat().
| cpl_mask * eris_ifu_quality2bp_mask | ( | const cpl_image * | qualityMask, |
| deqQualityType | qualityType | ||
| ) |
transform input image (quality mask) to output mask with given bit code
| qualityMask | input imagelist |
| qualityType | BIT code |
Definition at line 2388 of file eris_ifu_utils.c.
References ASSURE, BRK_WITH_ERROR_MSG, CATCH, eris_check_error_code(), and TRY.
Referenced by eris_ifu_jitter_processSof().
| cpl_error_code eris_ifu_save_bivector_dbg | ( | const cpl_bivector * | bivec, |
| const char * | filename, | ||
| int | col, | ||
| int | create | ||
| ) |
Save bivector for debugging (as vector or table)
| bivec | input bivector |
| filename | file name of product |
| col | 1=X only, 2=Y only, 0=both (as table with extensions) |
| create | CPL_IO_CREATE or CPL_IO_EXTEND |
Quick-save function for debugging bivectors.
Definition at line 1101 of file eris_ifu_utils.c.
References eris_ifu_save_vector_dbg().
| cpl_error_code eris_ifu_save_cpl_image_dbg | ( | const cpl_image * | img, |
| const char * | name, | ||
| int | singlefile, | ||
| const cpl_propertylist * | pl | ||
| ) |
Save CPL image with mask for debugging.
| img | input image (with internal BPM) |
| name | base file name (without extension) |
| singlefile | if TRUE, save as MEF; if FALSE, save as separate files |
| pl | input propertylist (can be NULL) |
Saves a CPL image and its bad pixel mask. Two modes:
Definition at line 1244 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), eris_ifu_save_image_dbg(), eris_ifu_save_mask_dbg(), and TRY.
| cpl_error_code eris_ifu_save_cpl_imagelist_dbg | ( | const cpl_imagelist * | imglist, |
| const char * | name | ||
| ) |
Save CPL imagelist for debugging.
| imglist | input imagelist |
| name | base file name (without extension) |
Quick-save wrapper for debugging CPL imagelists. Automatically appends .fits extension.
Definition at line 1295 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), eris_ifu_free_string(), eris_ifu_save_imagelist_dbg(), and TRY.
| cpl_error_code eris_ifu_save_hdrl_image_dbg | ( | const hdrl_image * | hdrl_img, |
| const char * | filename, | ||
| int | singlefile, | ||
| const cpl_propertylist * | pl | ||
| ) |
Save HDRL image for debugging (data + error + mask)
| hdrl_img | input HDRL image |
| filename | base file name (without extension) |
| singlefile | if TRUE, save as MEF; if FALSE, save as separate files |
| pl | input propertylist (can be NULL) |
Saves an HDRL image including data, error, and mask components.
Definition at line 1333 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), eris_ifu_save_image_dbg(), eris_ifu_save_mask_dbg(), hdrl_image_get_error_const(), hdrl_image_get_image_const(), hdrl_image_get_mask_const(), and TRY.
Referenced by eris_ifu_jitter_build_cube(), eris_ifu_jitter_get_objsky_exposures(), and eris_ifu_jitter_subtract_background().
| cpl_error_code eris_ifu_save_hdrl_imagelist_dbg | ( | const hdrl_imagelist * | hdrl_img_list, |
| const char * | filename, | ||
| int | singlefile | ||
| ) |
Save HDRL imagelist for debugging (data + error + mask planes)
| hdrl_img_list | input HDRL imagelist |
| filename | base file name (without extension) |
| singlefile | if TRUE, save as MEF; if FALSE, save as separate files |
Saves an HDRL imagelist (cube) including data, error, and mask planes.
Definition at line 1403 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), eris_ifu_free_imagelist(), eris_ifu_hdrl_get_imagelist(), eris_ifu_save_imagelist_dbg(), hdrl_image_get_mask_const(), hdrl_imagelist_get_const(), hdrl_imagelist_get_size(), and TRY.
| cpl_error_code eris_ifu_save_ifu_vector_dbg | ( | const eris_ifu_vector * | vec, |
| const char * | filename, | ||
| int | create | ||
| ) |
Save eris_ifu_vector for debugging (quick, no DFS overhead)
| vec | input eris_ifu_vector |
| filename | file name of product |
| create | CPL_IO_CREATE or CPL_IO_EXTEND |
Quick-save function for debugging eris_ifu_vector types. Uses -10.0 as invalid value marker.
Definition at line 1078 of file eris_ifu_utils.c.
References eris_ifu_vector_save().
| cpl_error_code eris_ifu_save_image | ( | cpl_frameset * | fs, |
| const cpl_propertylist * | plist, | ||
| const cpl_parameterlist * | parlist, | ||
| const char * | recipe, | ||
| const char * | procatg, | ||
| const char * | filename, | ||
| cpl_type | type, | ||
| const cpl_image * | image | ||
| ) |
Save image with DFS compliance.
| fs | input frameset |
| plist | input propertylist (FITS header) |
| parlist | input parameter list |
| recipe | input recipe name |
| procatg | product category (e.g., "MASTER_DARK") |
| filename | product file name |
| type | type of image (CPL_TYPE_FLOAT, CPL_TYPE_DOUBLE, etc.) |
| image | image to save |
Saves a CPL image as a DFS-compliant FITS file with proper product category, provenance, and pipeline version information.
Definition at line 865 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), eris_ifu_free_string(), and TRY.
Referenced by eris_ifu_combine().
| cpl_error_code eris_ifu_save_image_dbg | ( | const cpl_image * | img, |
| const char * | filename, | ||
| int | create, | ||
| const cpl_propertylist * | pl | ||
| ) |
Save image for debugging (quick, no DFS overhead)
| img | input image |
| filename | file name of product |
| create | CPL_IO_CREATE or CPL_IO_EXTEND |
| pl | input propertylist (can be NULL) |
Quick-save function for debugging. Automatically detects image type (FLOAT, DOUBLE, INT) and saves accordingly.
Definition at line 1139 of file eris_ifu_utils.c.
Referenced by eris_ifu_save_cpl_image_dbg(), eris_ifu_save_hdrl_image_dbg(), eris_ifu_save_resampled_arc_images(), and eris_ifu_wave_get_calImg().
| cpl_error_code eris_ifu_save_imagelist | ( | cpl_frameset * | fs, |
| cpl_frame * | inherit, | ||
| const cpl_propertylist * | plist, | ||
| const cpl_parameterlist * | parlist, | ||
| const char * | recipe, | ||
| const char * | procatg, | ||
| const char * | filename, | ||
| cpl_type | type, | ||
| const cpl_imagelist * | imglist | ||
| ) |
Save imagelist with DFS compliance.
| fs | input frameset |
| inherit | frame from which to inherit header |
| plist | input propertylist (FITS header) |
| parlist | input parameter list |
| recipe | input recipe name |
| procatg | product category (e.g., "DATACUBE") |
| filename | product file name |
| type | type of imagelist (CPL_TYPE_FLOAT, CPL_TYPE_DOUBLE, etc.) |
| imglist | imagelist to save (typically a cube) |
Saves a CPL imagelist (cube) as a DFS-compliant FITS file. Automatically adds PRODTYPE=CUBE and PRODTECH=CUBE keywords, and removes RADECSYS.
Definition at line 930 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, CHECK_ERROR_STATE, eris_check_error_code(), eris_ifu_free_string(), and TRY.
| cpl_error_code eris_ifu_save_imagelist_dbg | ( | const cpl_imagelist * | imglist, |
| const char * | filename, | ||
| int | create | ||
| ) |
Save CPL imagelist for debugging (quick, no DFS overhead)
| imglist | input image list |
| filename | file name of product |
| create | CPL_IO_CREATE or CPL_IO_EXTEND |
Quick-save function for debugging imagelists. Automatically detects image type (FLOAT or DOUBLE) from first plane.
Definition at line 1210 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_ifu_save_cpl_imagelist_dbg(), and eris_ifu_save_hdrl_imagelist_dbg().
| cpl_error_code eris_ifu_save_mask_dbg | ( | const cpl_mask * | mask, |
| const char * | filename, | ||
| int | create, | ||
| const cpl_propertylist * | pl | ||
| ) |
Save mask for debugging (quick, no DFS overhead)
| mask | input mask |
| filename | file name of product |
| create | CPL_IO_CREATE or CPL_IO_EXTEND |
| pl | input propertylist (can be NULL) |
Quick-save function for debugging masks.
Definition at line 1191 of file eris_ifu_utils.c.
Referenced by eris_ifu_save_cpl_image_dbg(), and eris_ifu_save_hdrl_image_dbg().
| cpl_error_code eris_ifu_save_table_dbg | ( | const cpl_table * | tbl, |
| const char * | filename, | ||
| int | create | ||
| ) |
Save table for debugging (quick, no DFS overhead)
| tbl | input table |
| filename | file name of product |
| create | CPL_IO_CREATE or CPL_IO_EXTEND |
Quick-save function for debugging tables.
Definition at line 1173 of file eris_ifu_utils.c.
| cpl_error_code eris_ifu_save_vector_dbg | ( | const cpl_vector * | vec, |
| const char * | filename, | ||
| int | create, | ||
| const cpl_propertylist * | pl | ||
| ) |
Save vector for debugging (quick, no DFS overhead)
| vec | input vector |
| filename | file name of product |
| create | CPL_IO_CREATE or CPL_IO_EXTEND |
| pl | propertylist (can be NULL) |
Quick-save function for debugging. Bypasses DFS compliance checks. Always saves as CPL_TYPE_DOUBLE.
Definition at line 1057 of file eris_ifu_utils.c.
Referenced by eris_ifu_dist_calc_centers(), eris_ifu_save_bivector_dbg(), and eris_ifu_slitpos_gauss().
| cpl_error_code eris_ifu_split3_hdrl_imagelist | ( | hdrl_imagelist * | cube, |
| cpl_imagelist * | dataCube, | ||
| cpl_imagelist * | errorCube, | ||
| cpl_imagelist * | qualCube | ||
| ) |
extract from hdrl_imagelist the data and error information
| cube | input imagelist |
| dataCube | output data |
| errorCube | output errs |
| qualCube | output quality |
Definition at line 2552 of file eris_ifu_utils.c.
References CATCH, eris_check_error_code(), hdrl_image_get_error(), hdrl_image_get_image(), hdrl_image_get_mask(), hdrl_imagelist_get(), hdrl_imagelist_get_size(), and TRY.
Referenced by eris_ifu_resample_save_cube().
| cpl_error_code eris_ifu_split_hdrl_imagelist | ( | hdrl_imagelist * | cube, |
| cpl_imagelist * | dataCube, | ||
| cpl_imagelist * | errorCube | ||
| ) |
extract from hdrl_imagelist the data and error information
| cube | input imagelist |
| dataCube | output data |
| errorCube | output errs |
Definition at line 2514 of file eris_ifu_utils.c.
References CATCH, eris_check_error_code(), hdrl_image_get_error(), hdrl_image_get_image(), hdrl_imagelist_get(), hdrl_imagelist_get_size(), and TRY.
Referenced by eris_ifu_jitter_process_cubes().
| cpl_error_code eris_pfits_put_qc | ( | cpl_propertylist * | plist, |
| cpl_table * | qclog | ||
| ) |
convert table with QC parameter information to a propertylist
| plist | output property list |
| qclog | input qclog table |
Definition at line 2878 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_compute_psf_qc(), eris_ifu_cube_collapse_mean_and_save(), and eris_ifu_wave_get_calImg().
| cpl_error_code eris_qclog_add_bool | ( | cpl_table * | table, |
| const char * | key_name, | ||
| const char * | key_help | ||
| ) |
add QC boolean info to table
| table | input table |
| key_name | keyword name |
| key_help | keyword help info |
Definition at line 2663 of file eris_ifu_utils.c.
References eris_check_error_code().
| cpl_error_code eris_qclog_add_double | ( | cpl_table * | table, |
| const char * | key_name, | ||
| const double | value, | ||
| const char * | key_help | ||
| ) |
add QC double info to table
| table | input table |
| key_name | keyword name |
| value | keyword value |
| key_help | keyword help info |
Definition at line 2705 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_compute_psf_qc(), eris_ifu_wave_collapse_arc_images(), and eris_ifu_wave_get_calImg().
| cpl_error_code eris_qclog_add_double_f | ( | cpl_table * | table, |
| const char * | key_name, | ||
| const double | value, | ||
| const char * | key_help | ||
| ) |
add QC float info to table
| table | input table |
| key_name | keyword name |
| value | keyword value |
| key_help | keyword help info |
Definition at line 2750 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_compute_psf_qc(), eris_get_pupil_shift(), and eris_ifu_cube_collapse_mean_and_save().
| cpl_error_code eris_qclog_add_double_format | ( | cpl_table * | table, |
| const char * | key_name, | ||
| const double | value, | ||
| const char * | key_help | ||
| ) |
add QC double (with format) info to table
| table | input table |
| key_name | keyword name |
| value | keyword value |
| key_help | keyword help info |
Definition at line 2793 of file eris_ifu_utils.c.
References eris_check_error_code().
| cpl_error_code eris_qclog_add_int | ( | cpl_table * | table, |
| const char * | key_name, | ||
| const int | value, | ||
| const char * | key_help | ||
| ) |
add QC int info to table
| table | input table |
| key_name | keyword name |
| value | keyword value |
| key_help | keyword help info |
Definition at line 2618 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_compute_psf_qc(), and eris_ifu_wave_collapse_arc_images().
| cpl_error_code eris_qclog_add_string | ( | cpl_table * | table, |
| const char * | key_name, | ||
| const char * | value, | ||
| const char * | key_help | ||
| ) |
add QC string info to table
| table | input table |
| key_name | keyword name |
| value | keyword value |
| key_help | keyword help info |
Definition at line 2836 of file eris_ifu_utils.c.
References eris_check_error_code().
| cpl_table * eris_qclog_init | ( | void | ) |
Initialize QC table.
Definition at line 2592 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_compute_psf_qc(), eris_ifu_cube_collapse_mean_and_save(), eris_ifu_wave_collapse_arc_images(), eris_ifu_wave_get_arc_images(), and eris_stdstar_reduction_common().