#include <xsh_data_instrument.h>
#include <cpl.h>
#include <xsh_error.h>
#include <xsh_badpixelmap.h>
Go to the source code of this file.
Data Structures | |
struct | xsh_pre |
Defines | |
#define | XSH_PRE_DATA_TYPE CPL_TYPE_FLOAT |
#define | XSH_PRE_DATA_BPP CPL_BPP_IEEE_FLOAT |
#define | XSH_PRE_ERRS_TYPE CPL_TYPE_FLOAT |
#define | XSH_PRE_ERRS_BPP CPL_BPP_IEEE_FLOAT |
#define | XSH_PRE_QUAL_TYPE CPL_TYPE_INT |
#define | XSH_PRE_QUAL_BPP CPL_BPP_32_SIGNED |
#define | XSH_NIR_DEFAULT_CUT 4 |
#define | XSH_NIR_DEFAULT_CUT_X 4 |
#define | XSH_NIR_DEFAULT_CUT_Y 20 |
#define | XSH_WINDOW_MEDIAN_FRAC 0.3333 |
Functions | |
xsh_pre * | xsh_pre_create (cpl_frame *raw, cpl_frame *bpmap, cpl_image *bias, xsh_instrument *instr, const int pre_overscan_corr, const bool flag_neg_and_thresh_pix) |
Create a XSH_PRE from a raw frame. | |
xsh_pre * | xsh_pre_wavemap_create (cpl_frame *raw, xsh_pre *sci, xsh_instrument *instr) |
void | xsh_pre_free (xsh_pre **pre) |
Free a xsh_pre structure. | |
xsh_pre * | xsh_pre_load (cpl_frame *frame, xsh_instrument *instr) |
Load a xsh_pre structure from a frame. | |
void | xsh_pre_init_with_header (xsh_pre *pre, cpl_propertylist *header) |
xsh_pre * | xsh_pre_duplicate (const xsh_pre *pre) |
Copy a PRE structure. | |
cpl_frame * | xsh_pre_save (const xsh_pre *pre, const char *filename, const char *tag, int temp) |
Save PRE on disk. | |
cpl_frame * | xsh_pre_save_product (xsh_pre *pre, cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, const char *prefix) |
Save PRE frame like a product on disk. | |
xsh_pre * | xsh_pre_new (int size_x, int size_y) |
Create new PRE image. | |
int | xsh_pre_get_nx (const xsh_pre *pre) |
Get nx of pre structure. | |
int | xsh_pre_get_ny (const xsh_pre *pre) |
Get ny of pre structure. | |
int | xsh_pre_get_binx (const xsh_pre *pre) |
Get binx of pre structure. | |
int | xsh_pre_get_biny (const xsh_pre *pre) |
Get biny of pre structure. | |
void | xsh_pre_from_raw_get (xsh_pre *pre, double raw_x, double raw_y, double *x, double *y) |
Get x, y coordinates in image from RAW coordinates. | |
float | xsh_pre_get_pszx (const xsh_pre *pre) |
Get pszx of pre structure. | |
float | xsh_pre_get_pszy (const xsh_pre *pre) |
Get pszy of pre structure. | |
float | xsh_pre_get_gain (const xsh_pre *pre) |
Get gain of pre structure. | |
cpl_frame_group | xsh_pre_get_group (const xsh_pre *pre) |
Get ny of pre structure. | |
cpl_mask * | xsh_pre_get_bpmap (const xsh_pre *pre) |
Get bpmap of pre structure. | |
void | xsh_pre_dump (const xsh_pre *pre, FILE *stream) |
Dump image to stream. | |
void | xsh_pre_add (xsh_pre *self, const xsh_pre *right) |
Add two PRE images. | |
void | xsh_pre_subtract (xsh_pre *self, const xsh_pre *right) |
Subtract one PRE image from another The data units are subtracted data = data1 - data2 The error images are propagated using sigma^2 = sigma1^2 + sigma2^2 The quality maps are or'e qual = qual1 U qual2. | |
void | xsh_pre_divide (xsh_pre *self, const xsh_pre *right, double threshold) |
Divide a PRE image from another. | |
void | xsh_pre_multiply_scalar (const xsh_pre *pre, double x) |
multiply a frame in PRE format by a scalar | |
void | xsh_pre_multiply_image (const xsh_pre *pre, cpl_image *img) |
multiply a frame in PRE format by an image | |
void | xsh_pre_multiply (xsh_pre *self, const xsh_pre *right, double threshold) |
Multiply a PRE image from another. | |
cpl_frame * | xsh_pre_frame_subtract (cpl_frame *one, cpl_frame *two, const char *fname, xsh_instrument *instr, const int clean_temp) |
Subtract 2 frames (in XSH_PRE format) Just loads the 2 frames, subtract (xsh_pre_subtract) and save resulting frame. | |
cpl_image * | xsh_pre_abs (const xsh_pre *pre) |
computes absolute value of a frame in PRE format | |
int | xsh_pre_window_best_median_flux_pos (xsh_pre *pre, int xcen, int ycen, int search_window_hsize, int running_median_hsize, int *xadj, int *yadj) |
Search pixel position of best running median flux in the search window. | |
double | xsh_pre_data_window_median_flux_pa (xsh_pre *pre, int x, int y, int size_x, int size_y, double *tab, int *status) |
compute median sample value on the data window with preallocated memory tab. Only good pixels codes are used. | |
void | xsh_pre_normalize (xsh_pre *self) |
Normalize data flux. | |
void | xsh_pre_median_mean_stdev (xsh_pre *preFrame, double *mean, double *median, double *stdev) |
void | xsh_pre_median_mean_stdev_window (xsh_pre *preFrame, double *mean, double *median, double *stdev, const int llx, const int lly, const int urx, const int ury) |
const cpl_propertylist * | xsh_pre_get_header_const (const xsh_pre *pre) |
Get header. | |
cpl_propertylist * | xsh_pre_get_header (xsh_pre *pre) |
Get header. | |
const cpl_image * | xsh_pre_get_data_const (const xsh_pre *pre) |
Get data. | |
cpl_image * | xsh_pre_get_data (xsh_pre *pre) |
Get data. | |
const cpl_image * | xsh_pre_get_errs_const (const xsh_pre *pre) |
Get errs. | |
cpl_image * | xsh_pre_get_errs (xsh_pre *pre) |
Get errs. | |
const cpl_image * | xsh_pre_get_qual_const (const xsh_pre *pre) |
Get QUAL. | |
cpl_image * | xsh_pre_get_qual (xsh_pre *pre) |
Get qual. | |
const double * | xsh_pre_get_data_buffer_const (const xsh_pre *pre) |
Get data buffer. | |
double * | xsh_pre_get_data_buffer (xsh_pre *pre) |
Get data buffer. | |
const double * | xsh_pre_get_errs_buffer_const (const xsh_pre *pre) |
Get errs buffer. | |
double * | xsh_pre_get_errs_buffer (xsh_pre *pre) |
Get errs buffer. | |
void | xsh_pre_turn (xsh_pre *pre, int rot) |
void | xsh_pre_flip (xsh_pre *pre, int angle) |
Flip an image on a given miror line. | |
void | xsh_pre_extract (xsh_pre *pre, int xmin, int ymin, int xmax, int ymax) |
Create a sub pre image. | |
cpl_frame * | xsh_frameset_average_pre (cpl_frameset *set, xsh_instrument *instr, const char *tag) |
Average set of frames in PRE format. | |
cpl_frameset * | xsh_pre_frameset_subtract_frame (cpl_frameset *set, cpl_frame *sub, const char *spec, xsh_instrument *instr) |
Subtract 2 frames (in XSH_PRE format) Just loads the 2 frames, subtract (xsh_pre_subtract) and save resulting frame. | |
void | xsh_pre_subtract_scalar (const xsh_pre *pre, double x) |
subtract a scalar from a frame in PRE format | |
void | xsh_pre_add_scalar (const xsh_pre *pre, double x) |
add a scalar to a frame in PRE format | |
void | xsh_pre_divide_scalar (const xsh_pre *pre, double x) |
divides a frame in PRE format by a scalar | |
xsh_pre * | xsh_pre_subsample (xsh_pre *self, const int binx, const int biny, const int rescale, xsh_instrument *inst) |
Subsample a PRE image of a bin factor binx X biny. |
#define XSH_NIR_DEFAULT_CUT 4 |
Definition at line 58 of file xsh_data_pre.h.
Referenced by xsh_pre_create(), and xsh_pre_init().
#define XSH_NIR_DEFAULT_CUT_X 4 |
Definition at line 59 of file xsh_data_pre.h.
Referenced by xsh_pre_init().
#define XSH_NIR_DEFAULT_CUT_Y 20 |
Definition at line 60 of file xsh_data_pre.h.
Referenced by xsh_pre_init().
#define XSH_PRE_DATA_BPP CPL_BPP_IEEE_FLOAT |
Definition at line 43 of file xsh_data_pre.h.
Referenced by create_frame(), main(), xsh_add_afc_info(), xsh_badpixelmap_extract(), xsh_badpixelmap_fill_bp_pattern_holes(), xsh_check_load_master_bpmap(), xsh_compute_noise_map(), xsh_create_master_dark_bpmap(), xsh_frame_build_sky_area(), xsh_frame_build_sky_map(), xsh_frame_image_add_double(), xsh_frame_image_div_by_fct(), xsh_frame_image_mult_by_fct(), xsh_frame_image_save2ext(), xsh_image_clean_badpixel(), xsh_image_local_cold_pixs(), xsh_image_local_hot_pixs(), xsh_normalize_spectrum_image_slice(), xsh_pre_save(), xsh_test_create_bias_image(), xsh_test_create_frame(), xsh_util_frameset_collapse_mean(), xsh_util_ima_rebin(), xsh_util_multiply_by_response(), and xsh_util_multiply_by_response_ord().
#define XSH_PRE_DATA_TYPE CPL_TYPE_FLOAT |
Definition at line 42 of file xsh_data_pre.h.
Referenced by create_frame(), xsh_add_afc_info(), xsh_badpixelmap_fill_bp_pattern_holes(), xsh_build_ifu_cube(), xsh_compute_linearity(), xsh_frame_build_sky_map(), xsh_frame_image_add_double(), xsh_frame_image_save2ext(), xsh_image_generate_background(), xsh_normalize_spectrum_image_slice(), xsh_pre_3d_load(), xsh_pre_3d_new(), xsh_pre_create(), xsh_pre_load(), xsh_pre_new(), xsh_preoverscan_corr(), xsh_rec_list_load_eso(), xsh_test_create_bias_image(), xsh_test_create_frame(), xsh_util_frameset_collapse_mean(), xsh_util_ifu_build_cube(), xsh_util_multiply_by_response(), and xsh_util_multiply_by_response_ord().
#define XSH_PRE_ERRS_BPP CPL_BPP_IEEE_FLOAT |
Definition at line 45 of file xsh_data_pre.h.
Referenced by main(), xsh_badpixelmap_fill_bp_pattern_holes(), xsh_frame_image_div_by_fct(), xsh_frame_image_mult_by_fct(), xsh_image_clean_badpixel(), xsh_normalize_spectrum_image_slice(), xsh_pre_save(), xsh_util_frameset_collapse_mean(), xsh_util_ima_rebin(), xsh_util_multiply_by_response(), and xsh_util_multiply_by_response_ord().
#define XSH_PRE_ERRS_TYPE CPL_TYPE_FLOAT |
Definition at line 44 of file xsh_data_pre.h.
Referenced by xsh_badpixelmap_fill_bp_pattern_holes(), xsh_build_ifu_cube(), xsh_normalize_spectrum_image_slice(), xsh_pre_3d_load(), xsh_pre_3d_new(), xsh_pre_load(), xsh_pre_new(), xsh_rec_list_load_eso(), xsh_util_frameset_collapse_mean(), xsh_util_ifu_build_cube(), xsh_util_multiply_by_response(), and xsh_util_multiply_by_response_ord().
#define XSH_PRE_QUAL_BPP CPL_BPP_32_SIGNED |
Definition at line 47 of file xsh_data_pre.h.
Referenced by main(), xsh_add_product_vector(), xsh_badpixelmap_crea_master_from_bpmap(), xsh_badpixelmap_fill_bp_pattern_holes(), xsh_compute_absorp(), xsh_frame_image_div_by_fct(), xsh_frame_image_mult_by_fct(), xsh_image_clean_badpixel(), xsh_normalize_spectrum_image_slice(), xsh_opt_extract_orders(), xsh_pre_save(), xsh_rec_list_save2(), xsh_util_frameset_collapse_mean(), xsh_util_ima_rebin(), xsh_util_multiply_by_response(), and xsh_util_multiply_by_response_ord().
#define XSH_PRE_QUAL_TYPE CPL_TYPE_INT |
Definition at line 46 of file xsh_data_pre.h.
Referenced by xsh_badpixelmap_fill_bp_pattern_holes(), xsh_build_ifu_cube(), xsh_mdark_get_median_stdev(), xsh_normalize_spectrum_image_slice(), xsh_pre_3d_load(), xsh_pre_3d_new(), xsh_pre_create(), xsh_pre_load(), xsh_pre_new(), xsh_rec_list_load_eso(), xsh_util_frameset_collapse_mean(), xsh_util_ifu_build_cube(), xsh_util_multiply_by_response(), and xsh_util_multiply_by_response_ord().
#define XSH_WINDOW_MEDIAN_FRAC 0.3333 |
Definition at line 62 of file xsh_data_pre.h.
void xsh_pre_init_with_header | ( | xsh_pre * | pre, | |
cpl_propertylist * | header | |||
) |
xsh_pre* xsh_pre_wavemap_create | ( | cpl_frame * | raw, | |
xsh_pre * | sci, | |||
xsh_instrument * | instr | |||
) |