Functions | |
| static double | integrate_flux (const double *spectrum_data_double, const float *spectrum_data_float, const int *spectrum_data_int, const cpl_binary *spectrum_bad, int spectrum_row, int nx, double x_min, double x_max, bool threshold_to_positive, bool *is_bad) |
| Integrate flux. | |
| cpl_parameterlist * | uves_rebin_define_parameters (void) |
| Define recipe parameters used for rebinning. | |
| cpl_image * | uves_rebin (const cpl_image *spectrum, const cpl_parameterlist *parameters, const char *context, const cpl_table *linetable, const polynomial *dispersion_relation, int first_abs_order, int last_abs_order, int n_traces, bool threshold_to_positive, uves_propertylist **rebinned_header) |
| Rebin a spectrum. | |
| static double integrate_flux | ( | const double * | spectrum_data_double, | |
| const float * | spectrum_data_float, | |||
| const int * | spectrum_data_int, | |||
| const cpl_binary * | spectrum_bad, | |||
| int | spectrum_row, | |||
| int | nx, | |||
| double | x_min, | |||
| double | x_max, | |||
| bool | threshold_to_positive, | |||
| bool * | is_bad | |||
| ) | [static] |
Integrate flux.
| spectrum_data_double | Input spectrum data buffer as double or float, or int, other must be NULL | |
| spectrum_data_float | Input spectrum data buffer as double or float, or int, other must be NULL | |
| spectrum_data_int | Input spectrum data buffer as double or float, or int, other must be NULL | |
| spectrum_bad | Input spectrum bad pixel map | |
| spectrum_row | Current row of input spectrum | |
| nx | Input image width | |
| x_min | Start of integration interval (FITS coordinate in [0.5 ; nx+0.5]) | |
| x_max | End of integration interval (FITS coordinate in [0.5 ; nx+0.5]) | |
| threshold_to_positive | enforce a positive result? | |
| is_bad | (output) Flag indicating if there were only bad pixels in the specified interval |
Definition at line 760 of file uves_rebin.c.
References uves_max_double(), uves_max_int(), uves_min_double(), uves_min_int(), and uves_round_double().
Referenced by uves_rebin().
| cpl_parameterlist* uves_rebin_define_parameters | ( | void | ) |
Define recipe parameters used for rebinning.
Definition at line 214 of file uves_rebin.c.
| cpl_image* uves_rebin | ( | const cpl_image * | spectrum, | |
| const cpl_parameterlist * | parameters, | |||
| const char * | context, | |||
| const cpl_table * | linetable, | |||
| const polynomial * | dispersion_relation, | |||
| int | first_abs_order, | |||
| int | last_abs_order, | |||
| int | n_traces, | |||
| bool | threshold_to_positive, | |||
| uves_propertylist ** | rebinned_header | |||
| ) |
Rebin a spectrum.
| spectrum | Input spectrum in (x, order) space | |
| parameters | The parameters used for rebinning. Add parameters by calling uves_propagate_parameters_step() from the recipe_create() function | |
| context | Use parameters belonging to this context | |
| linetable | The linetable. Used to read the average pixel size, when the wavelength step is not specified. | |
| dispersion_relation | The dispersion relation in the form lambda.m = f(x,m), where m is the absolute order number | |
| first_abs_order | Absolute order number of row number 1 in the spectrum image | |
| last_abs_order | Absolute order number of the highest row in the spectrum image | |
| n_traces | Number of traces per order (equal to 1, or more if 2d extraction) | |
| threshold_to_positive | if true, negative values are set to 'infinity'. This makes sense for the error bar spectrum, which may become negative due to the interpolation profile used, even if the input is positive. In this context 'infinity' is defined as the maximum value of all other pixels | |
| rebinned_header | (output) Header with keywords defining the wavelengths of the first column in the rebinned image |
The conversion factor |d x / d (lambda)| can be switched on/off by (un-)setting the corresponding parameter (see uves_rebin_define_parameters()).
If the MIDAS flag is set, the resampled spectrum is shifted a random amount (depending on round-off) up to wavestep / 2.
Bad pixels are taken into account and propagated, and an output bin is marked as bad if no flux (from good pixels) went into that bin.
Definition at line 317 of file uves_rebin.c.
References assure, assure_mem, check, check_nomsg, integrate_flux(), passure, uves_absolute_order(), uves_error_reset, uves_initialize_image_header(), uves_max_double(), uves_max_int(), uves_min_double(), uves_msg_debug, uves_msg_warning, uves_pfits_get_wstart(), uves_pfits_set_wend(), uves_pfits_set_wstart(), uves_polynomial_collapse(), uves_polynomial_delete(), uves_polynomial_derivative_2d(), uves_polynomial_evaluate_2d(), uves_polynomial_solve_1d(), uves_round_double(), and uves_tostring_cpl_type().
Referenced by extract_ff_rebin_merge().
1.5.1