|
ERIS Pipeline Reference Manual 1.8.14
|
Modules | |
| IFU Error Macros | |
Functions | |
| cpl_vector * | eris_ifu_idl_where (const cpl_vector *data, double val, int op) |
| Implements the where-function knownm 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 | |
| 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 | |
| cpl_error_code | eris_ifu_hdrl_image_reject_mask (hdrl_image *img, const cpl_mask *mask) |
| 'Add' the mask to the image | |
| cpl_error_code | eris_ifu_save_vector_dbg (const cpl_vector *vec, const char *filename, int create, const cpl_propertylist *pl) |
| save vector | |
| cpl_error_code | eris_ifu_save_ifu_vector_dbg (const eris_ifu_vector *vec, const char *filename, int create) |
| save vector | |
| cpl_error_code | eris_ifu_save_bivector_dbg (const cpl_bivector *bivec, const char *filename, int col, int create) |
| save bivector as a vector (col=1 or col=2) or as a table | |
| cpl_error_code | eris_ifu_save_image_dbg (const cpl_image *img, const char *filename, int create, const cpl_propertylist *pl) |
| eris_ifu_save_image_dbg | |
| cpl_error_code | eris_ifu_save_table_dbg (const cpl_table *tbl, const char *filename, int create) |
| eris_ifu_save_table_dbg | |
| cpl_error_code | eris_ifu_save_mask_dbg (const cpl_mask *mask, const char *filename, int create, const cpl_propertylist *pl) |
| eris_ifu_save_mask_dbg | |
| cpl_error_code | eris_ifu_save_imagelist_dbg (const cpl_imagelist *imglist, const char *filename, int create) |
| save CPL imagelist for debug purposes | |
| 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 for debug purposes | |
| cpl_error_code | eris_ifu_save_cpl_imagelist_dbg (const cpl_imagelist *imglist, const char *name) |
| save CPL imagelist for debugging purposes | |
| 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 imagelist for debugging purposes | |
| cpl_error_code | eris_ifu_save_hdrl_imagelist_dbg (const hdrl_imagelist *hdrl_img_list, const char *filename, int singlefile) |
| eris_ifu_save_hdrl_imagelist_dbg | |
| cpl_mask * | eris_ifu_load_badpixel_mask (const cpl_frameset *frameset, const char *category, int ext) |
| ** | |
eris_ifu_file_exists | |||
**
| |||
| 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 a HDRL-imglist a specific CPL-imglist. | |||
| char * | eris_ifu_get_lampString (int lampStatus) | ||
| eris_ifu_get_lampString | |||
| const char * | eris_ifu_get_bandString (ifsBand band) | ||
| eris_ifu_get_bandString | |||
| double | eris_ifu_get_band_resolution (ifsBand band) | ||
| eris_ifu_get_band_resolution | |||
| cpl_error_code | eris_ifu_get_plane_cut_min_max (ifsBand band, cpl_size *zmin, cpl_size *zmax) | ||
| eris_ifu_get_plane_cut_min_max | |||
| cpl_error_code | eris_ifu_cube_set_values (hdrl_imagelist **iml) | ||
| remove planes from input iml and bpm in the range [0, zmin), (zmax,sz] | |||
| 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) | ||
| remove planes from input iml and bpm in the range [0, zmin), (zmax,sz] | |||
| const char * | eris_ifu_get_instrumentString (ifsInstrument instrument) | ||
| eris_ifu_get_instrumentString | |||
| const char * | eris_ifu_get_preopticsScaleString (ifsPreopticsScale scale) | ||
| eris_ifu_get_preopticsScaleString | |||
| cpl_image * | eris_ifu_image_create_window (const cpl_image *img) | ||
| cpl_mask * | eris_ifu_mask_create_border (const cpl_mask *mask) | ||
| eris_ifu_mask_create_border | |||
| cpl_error_code | eris_ifu_mask_nans_in_hdrlimage (hdrl_image **hima) | ||
| Flag NANs in image. | |||
| cpl_error_code | eris_ifu_mask_nans_in_cube (cpl_imagelist *cube) | ||
| mask NANs in input data 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_error_code | eris_gaussian_maxpos (const cpl_image *self, double sigma, double *pxpos, double *pypos, double *ppeak, double *sigma_x, double *sigma_y) | ||
| 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 | |||
| 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 2938 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().
| 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 3267 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().
| cpl_error_code eris_ifu_cube_set_values | ( | hdrl_imagelist ** | iml | ) |
remove planes from input iml and bpm in the range [0, zmin), (zmax,sz]
| zmin | planes in range [0,zmin] are removed |
| zmax | planes in range [zmax,sz] are removed |
| iml | input imagelist |
| bpm | input bad pixel map |
| header | input FITS header |
Definition at line 1659 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 | ||
| ) |
remove planes from input iml and bpm in the range [0, zmin), (zmax,sz]
| zmin | planes in range [0,zmin] are removed |
| zmax | planes in range [zmax,sz] are removed |
| iml | input imagelist |
| bpm | input bad pixel map |
| header | input FITS header |
Definition at line 1695 of file eris_ifu_utils.c.
References eris_check_error_code(), hdrl_imagelist_get_size(), and hdrl_imagelist_unset().
| 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 233 of file eris_ifu_utils.c.
References CATCH, eris_check_error_code(), eris_ifu_free_vector(), and TRY.
Referenced by eris_ifu_idl_where().
| void eris_ifu_free_apertures | ( | cpl_apertures ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 685 of file eris_ifu_utils.c.
| void eris_ifu_free_bivector | ( | cpl_bivector ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 675 of file eris_ifu_utils.c.
| void eris_ifu_free_double_array | ( | double ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 635 of file eris_ifu_utils.c.
Referenced by eris_ifu_1d_interpolation().
| void eris_ifu_free_float_array | ( | float ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 645 of file eris_ifu_utils.c.
| void eris_ifu_free_frame | ( | cpl_frame ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 584 of file eris_ifu_utils.c.
| void eris_ifu_free_frameset | ( | cpl_frameset ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 574 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 |
Definition at line 474 of file eris_ifu_utils.c.
References hdrl_image_delete().
Referenced by eris_ifu_load_exposure_file(), and eris_ifu_warp_polynomial_image().
| void eris_ifu_free_hdrl_imagelist | ( | hdrl_imagelist ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 484 of file eris_ifu_utils.c.
References hdrl_imagelist_delete().
Referenced by eris_ifu_get_hdrlimagelist_by_tag().
| void eris_ifu_free_hdrl_parameter | ( | hdrl_parameter ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 594 of file eris_ifu_utils.c.
References hdrl_parameter_delete().
Referenced by eris_ifu_calc_bpm().
| void eris_ifu_free_ifu_vector | ( | eris_ifu_vector ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 554 of file eris_ifu_utils.c.
References eris_ifu_vector_delete().
| void eris_ifu_free_image | ( | cpl_image ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 494 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_hdrl_get_imagelist(), eris_ifu_image_collapse(), eris_ifu_load_cal_image_file(), eris_ifu_load_exposure_file(), and eris_ifu_warp_polynomial_image().
| void eris_ifu_free_imagelist | ( | cpl_imagelist ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 504 of file eris_ifu_utils.c.
Referenced by eris_ifu_calc_bpm(), eris_ifu_hdrl_get_imagelist(), and eris_ifu_save_hdrl_imagelist_dbg().
| void eris_ifu_free_int_array | ( | int ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 655 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 |
Definition at line 514 of file eris_ifu_utils.c.
Referenced by eris_ifu_calc_bpm(), eris_ifu_detect_crh(), 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 |
Definition at line 524 of file eris_ifu_utils.c.
| void eris_ifu_free_parameter | ( | cpl_parameter ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 604 of file eris_ifu_utils.c.
| void eris_ifu_free_parameterlist | ( | cpl_parameterlist ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 615 of file eris_ifu_utils.c.
| void eris_ifu_free_polynomial | ( | cpl_polynomial ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 665 of file eris_ifu_utils.c.
| void eris_ifu_free_propertylist | ( | cpl_propertylist ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 534 of file eris_ifu_utils.c.
Referenced by eris_ifu_combine(), eris_ifu_cube_collapse_mean_and_save(), eris_ifu_frame_is_on(), eris_ifu_frame_is_sky(), eris_ifu_get_instrument_frame(), 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(), and eris_ifu_save_table().
| void eris_ifu_free_string | ( | char ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 564 of file eris_ifu_utils.c.
Referenced by 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_frame_is_on(), eris_ifu_frame_is_sky(), 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(), and eris_ifu_set_qc_int().
| void eris_ifu_free_table | ( | cpl_table ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 625 of file eris_ifu_utils.c.
Referenced by eris_ifu_load_distances(), eris_ifu_load_distortion_polynomials(), eris_ifu_load_distortion_polynomials_old(), and eris_ifu_load_slit_positions().
| void eris_ifu_free_vector | ( | cpl_vector ** | item | ) |
free memory and set pointer to null
| item |
Definition at line 544 of file eris_ifu_utils.c.
Referenced by eris_ifu_calc_centers_collapse_chunk(), eris_ifu_cut_endings(), eris_ifu_exposure_column_correction(), eris_ifu_exposure_line_correction(), eris_ifu_idl_values_at_indices(), eris_ifu_idl_where(), eris_ifu_image_collapse(), eris_ifu_lcorr_get_peak_lambdas(), eris_ifu_polyfit_1d(), eris_ifu_slitpos_gauss(), and eris_ifu_warp_polynomial_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 2625 of file eris_ifu_utils.c.
References eris_check_error_code(), eris_ifu_append_qc_double(), and eris_ifu_append_qc_int().
| 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 2670 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 | ) |
eris_ifu_get_band_resolution
| band |
Definition at line 1581 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_ifu_lcorr_crosscorrelate_spectra().
| const char * eris_ifu_get_bandString | ( | ifsBand | band | ) |
eris_ifu_get_bandString
| band |
Definition at line 1514 of file eris_ifu_utils.c.
References eris_check_error_code().
| 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 391 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 330 of file eris_ifu_utils.c.
References CATCH, CATCH_MSGS, eris_check_error_code(), 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 | ) |
eris_ifu_get_instrumentString
| instrument |
Definition at line 1739 of file eris_ifu_utils.c.
References eris_check_error_code().
| char * eris_ifu_get_lampString | ( | int | lampStatus | ) |
eris_ifu_get_lampString
| lampStatus |
Definition at line 1491 of file eris_ifu_utils.c.
References eris_check_error_code().
| cpl_error_code eris_ifu_get_plane_cut_min_max | ( | ifsBand | band, |
| cpl_size * | zmin, | ||
| cpl_size * | zmax | ||
| ) |
eris_ifu_get_plane_cut_min_max
| band | |
| zmin | output plane that still has more than half pixels with NANs |
| zmax | output plane that still has more than half pixels with NANs |
Definition at line 1617 of file eris_ifu_utils.c.
References eris_check_error_code().
| const char * eris_ifu_get_preopticsScaleString | ( | ifsPreopticsScale | scale | ) |
eris_ifu_get_preopticsScaleString
| scale |
Definition at line 1759 of file eris_ifu_utils.c.
References eris_check_error_code().
| cpl_imagelist * eris_ifu_hdrl_get_imagelist | ( | const hdrl_imagelist * | hdrl_imglist, |
| enum hdrl_t | type | ||
| ) |
Extract from a HDRL-imglist a specific CPL-imglist.
| hdrl_imglist | The input hdrl_imglist |
| type | Either data, error or badpix |
Definition at line 1442 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' the mask to the image
| img | Image to alter |
| mask | Mask to add |
Possible cpl_error_code set in this function:
Definition at line 824 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.
| 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 3212 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 3167 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 168 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 knownm 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 78 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_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 2098 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 | ||
| ) |
**
Loading badpixel mask of a given category.
| frameset | The input set-of-frames. |
| category | The category of the badpixelmask 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 |
Definition at line 1296 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 | ) |
eris_ifu_mask_create_border
| mask |
Add badpixborder around img
Definition at line 1847 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 3334 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 in input data cube
| cube | input imagelist |
Definition at line 1938 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_lcorr_create_object_mask(), and eris_ifu_lcorr_get().
| cpl_error_code eris_ifu_mask_nans_in_hdrlimage | ( | hdrl_image ** | hima | ) |
Flag NANs in image.
| hima | input image |
Definition at line 1896 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 2ns list to be appendend |
Definition at line 442 of file eris_ifu_utils.c.
References CATCH, CHECK_ERROR_STATE, eris_check_error_code(), and TRY.
| 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 2052 of file eris_ifu_utils.c.
References ASSURE, BRK_WITH_ERROR_MSG, CATCH, eris_check_error_code(), and TRY.
| cpl_error_code eris_ifu_save_bivector_dbg | ( | const cpl_bivector * | bivec, |
| const char * | filename, | ||
| int | col, | ||
| int | create | ||
| ) |
save bivector as a vector (col=1 or col=2) or as a table
col 1 for x only, 2 for y only, 0 for both
| bivec | input bivector |
| filename | file name of product |
| col | parameter to indicate what to save |
| create | code to indicate to create file |
Definition at line 908 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 for debug purposes
| img | input image |
| name | file name of product |
| singlefile | if HDRL image content is saved as a single file (MEF) |
| pl | input propertylist |
Definition at line 1023 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 purposes
| imglist | input imagelist |
| name | file name of product |
Definition at line 1068 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 imagelist for debugging purposes
| hdrl_img | input image |
| filename | file name of product |
| singlefile | if HDRL image content is saved as a single file (MEF) |
| pl | input propertylist |
Definition at line 1096 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.
| cpl_error_code eris_ifu_save_hdrl_imagelist_dbg | ( | const hdrl_imagelist * | hdrl_img_list, |
| const char * | filename, | ||
| int | singlefile | ||
| ) |
eris_ifu_save_hdrl_imagelist_dbg
| hdrl_img_list | input image list |
| filename | file name of product |
| singlefile | if HDRL imagelist content is saved as a single file (MEF) |
Definition at line 1156 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 vector
| vec | input vector |
| filename | file name of product |
| create | code to indicate to create file |
Definition at line 891 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
| fs | input frameset |
| plist | input propertylist |
| parlist | input propertylist |
| recipe | input recipe name |
| procatg | product category |
| filename | product file name |
| type | of image |
| image | image to save |
Definition at line 703 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 | ||
| ) |
eris_ifu_save_image_dbg
| img | input image |
| filename | file name of product |
| create | code to indicate to create file |
| pl | input propertylist |
Definition at line 940 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_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
| fs | input frameset |
| inherit | frame from which to inherit header |
| plist | input propertylist |
| parlist | input propertylist |
| recipe | input recipe name |
| procatg | product category |
| filename | product file name |
| type | of imagelist |
| imglist | imagelist to save |
Definition at line 760 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 debug purposes
| imglist | input image list |
| filename | file name of product |
| create | code to indicate to create file |
Definition at line 996 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 | ||
| ) |
eris_ifu_save_mask_dbg
| mask | input mask |
| filename | file name of product |
| create | code to indicate to create file |
| pl | input propertylist |
Definition at line 982 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 | ||
| ) |
eris_ifu_save_table_dbg
| tbl | input table |
| filename | file name of product |
| create | code to indicate to create file |
Definition at line 969 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
| vec | input vector |
| filename | file name of product |
| create | code to indicate to create file |
| pl | propertylist |
Definition at line 876 of file eris_ifu_utils.c.
Referenced by 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 2216 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 2178 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.
| 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 2542 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_compute_psf_qc(), and eris_ifu_cube_collapse_mean_and_save().
| 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 2327 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 2369 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_compute_psf_qc().
| 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 2414 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 2457 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 2282 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_compute_psf_qc().
| 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 2500 of file eris_ifu_utils.c.
References eris_check_error_code().
| cpl_table * eris_qclog_init | ( | void | ) |
Initialize QC table.
Definition at line 2256 of file eris_ifu_utils.c.
References eris_check_error_code().
Referenced by eris_compute_psf_qc(), and eris_ifu_cube_collapse_mean_and_save().