Functions | |
void | xsh_order_list_dump (xsh_order_list *list, const char *fname) |
void | xsh_order_list_verify (xsh_order_list *list, int ny) |
xsh_order_list * | xsh_order_list_new (int size) |
Create a new order list from size (no check). | |
xsh_order_list * | xsh_order_list_create (xsh_instrument *instr) |
create an empty order list | |
xsh_order_list * | xsh_order_list_load (cpl_frame *frame, xsh_instrument *instr) |
load an order list from a frame | |
void | xsh_order_list_fit (xsh_order_list *list, int size, double *order, double *posx, double *posy, int deg_poly) |
fit the polynomial solution of given points | |
void | xsh_order_list_free (xsh_order_list **list) |
free memory associated to an order_list | |
int | xsh_order_list_get_index_by_absorder (xsh_order_list *list, double absorder) |
cpl_propertylist * | xsh_order_list_get_header (xsh_order_list *list) |
get header of the table | |
int | xsh_order_list_get_starty (xsh_order_list *list, int i) |
get position on Y axis of first pixel detected on order | |
int | xsh_order_list_get_endy (xsh_order_list *list, int i) |
get position on Y axis of last pixel detected on order | |
int | xsh_order_list_get_order (xsh_order_list *list, int absorder) |
xsh_order_list * | xsh_order_list_merge (xsh_order_list *lista, xsh_order_list *listb) |
void | xsh_order_list_set_bin_x (xsh_order_list *list, int bin) |
Set the bin of image in x. | |
void | xsh_order_list_set_bin_y (xsh_order_list *list, int bin) |
Set the bin of image in y. | |
double | xsh_order_list_eval (xsh_order_list *list, cpl_polynomial *poly, double y) |
Evaluate an order list poly. | |
int | xsh_order_list_eval_int (xsh_order_list *list, cpl_polynomial *poly, double y) |
Evaluate an order list poly but return the central pixel position rounding the polynomial. | |
void | xsh_order_list_apply_shift (xsh_order_list *list, double xshift, double yshift) |
Shift a order list. | |
cpl_frame * | xsh_order_list_save (xsh_order_list *order_list, xsh_instrument *instrument, const char *filename, const char *tag, const int ny) |
Save an order list to a frame. | |
void | xsh_order_split_qth_d2 (cpl_frame *order_tab_frame, cpl_frame *spectralformat_frame, cpl_frame **qth_order_tab_frame, cpl_frame **d2_order_tab_frame, xsh_instrument *instr) |
xsh_spectrum1D * | xsh_spectrum1D_create (double lambda_min, double lambda_max, double lambda_step) |
Create a 1D spectrum structure. | |
xsh_spectrum1D * | xsh_spectrum1D_load (cpl_frame *s1d_frame, xsh_instrument *instr) |
Load a 1D spectrum structure. | |
int | xsh_spectrum1D_get_size (xsh_spectrum1D *s) |
Get size of spectrum. | |
double | xsh_spectrum1D_get_lambda_min (xsh_spectrum1D *s) |
Get minimum lambda of spectrum. | |
double | xsh_spectrum1D_get_lambda_max (xsh_spectrum1D *s) |
Get maximum lambda of spectrum. | |
double | xsh_spectrum1D_get_lambda_step (xsh_spectrum1D *s) |
Get bin in lambda of spectrum. | |
double * | xsh_spectrum1D_get_flux (xsh_spectrum1D *s) |
Get flux of spectrum. | |
double * | xsh_spectrum1D_get_errs (xsh_spectrum1D *s) |
Get errs of spectrum. | |
int * | xsh_spectrum1D_get_qual (xsh_spectrum1D *s) |
Get qual of spectrum. | |
void | xsh_spectrum1D_free (xsh_spectrum1D **s) |
free memory associated to an 1D spectrum | |
cpl_frame * | xsh_spectrum1D_save (xsh_spectrum1D *s, const char *filename) |
save a 1D spectrum | |
static cpl_error_code | xsh_monitor_spectrum1D_flux_qc (xsh_spectrum *s, const double ws, const double we, const int index) |
cpl_error_code | xsh_monitor_spectrum1D_flux (cpl_frame *in_frm, xsh_instrument *instrument) |
cpl_error_code xsh_monitor_spectrum1D_flux | ( | cpl_frame * | in_frm, | |
xsh_instrument * | instrument | |||
) |
Definition at line 418 of file xsh_data_spectrum1D.c.
References check, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, xsh_free_frame(), xsh_instrument_get_arm(), xsh_monitor_spectrum1D_flux_qc(), xsh_spectrum_free(), xsh_spectrum_load(), and xsh_spectrum_save().
Referenced by xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_slit_nod(), xsh_scired_slit_offset(), and xsh_scired_slit_stare().
static cpl_error_code xsh_monitor_spectrum1D_flux_qc | ( | xsh_spectrum * | s, | |
const double | ws, | |||
const double | we, | |||
const int | index | |||
) | [static] |
Definition at line 371 of file xsh_data_spectrum1D.c.
References check, xsh_spectrum::errs, xsh_spectrum::flux, xsh_spectrum::flux_header, xsh_spectrum::lambda_min, xsh_spectrum::lambda_step, and XSH_QC_FLUX.
Referenced by xsh_monitor_spectrum1D_flux().
void xsh_order_list_apply_shift | ( | xsh_order_list * | list, | |
double | xshift, | |||
double | yshift | |||
) |
Shift a order list.
[in] | list | The order_list structure which contains polynomials coefficients of the orders |
[in] | xshift | X shift |
[in] | yshift | Y shift |
Definition at line 718 of file xsh_data_order.c.
References xsh_order::cenpoly, check, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order_list::list, xsh_order_list::size, xsh_order::sliclopoly, xsh_order::slicuppoly, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_flexcor().
xsh_order_list* xsh_order_list_create | ( | xsh_instrument * | instr | ) |
create an empty order list
[in] | instr | instrument in use |
Definition at line 154 of file xsh_data_order.c.
References xsh_order_list::absorder_max, xsh_order_list::absorder_min, xsh_order_list::bin_x, xsh_order_list::bin_y, check, xsh_order_list::instrument, XSH_INSTRCONFIG::order_max, XSH_INSTRCONFIG::order_min, XSH_INSTRCONFIG::orders, size, XSH_ASSURE_NOT_NULL, xsh_instrument_get_binx(), xsh_instrument_get_biny(), xsh_instrument_get_config(), xsh_order_list_free(), and xsh_order_list_new().
Referenced by xsh_create_order_table(), xsh_model_order_edges_tab_create(), xsh_order_list_load(), and xsh_order_table_from_fmtchk().
void xsh_order_list_dump | ( | xsh_order_list * | list, | |
const char * | fname | |||
) |
Dump main info about an order table (for each order of the list)
[in] | list | pointer to table list |
[in] | fname | File name |
Definition at line 67 of file xsh_data_order.c.
References xsh_order::absorder, xsh_order::cenpoly, degree, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order::endy, xsh_order_list::list, xsh_order_list::size, and xsh_order::starty.
Referenced by main(), and xsh_detect_continuum().
double xsh_order_list_eval | ( | xsh_order_list * | list, | |
cpl_polynomial * | poly, | |||
double | y | |||
) |
Evaluate an order list poly.
[in] | list | order list structure |
[in] | poly | An order list poly |
[in] | y | The position to evaluate |
Definition at line 655 of file xsh_data_order.c.
References xsh_order_list::bin_x, xsh_order_list::bin_y, check, convert_bin_to_data(), convert_data_to_bin(), and XSH_ASSURE_NOT_NULL.
Referenced by find_tilt(), xsh_compute_flat_edges(), xsh_detect_order_edge(), xsh_dispersol_list_to_slitmap(), xsh_dispersol_list_to_wavemap(), xsh_order_list_eval_int(), xsh_subtract_background(), and xsh_wavemap_lambda_range().
int xsh_order_list_eval_int | ( | xsh_order_list * | list, | |
cpl_polynomial * | poly, | |||
double | y | |||
) |
Evaluate an order list poly but return the central pixel position rounding the polynomial.
[in] | list | The order list to update |
[in] | poly | An order list poly |
[in] | y | The position to evaluate |
Definition at line 688 of file xsh_data_order.c.
References check, XSH_ASSURE_NOT_NULL, and xsh_order_list_eval().
Referenced by create_blaze(), xsh_compute_flat_edges(), xsh_detect_edges(), xsh_detect_max_y(), xsh_detect_order_edge(), xsh_flat_merge_qth_d2(), xsh_mflat_normalize(), and xsh_wavemap_list_new().
void xsh_order_list_fit | ( | xsh_order_list * | list, | |
int | size, | |||
double * | order, | |||
double * | posx, | |||
double * | posy, | |||
int | deg_poly | |||
) |
fit the polynomial solution of given points
[in] | list | The order list |
[in] | size | Nb of elements in the list |
[in] | order | Array of orders |
[in] | posx | Array of X positions |
[in] | posy | Array of Y positions |
[in] | deg_poly | Degree of the polynomial |
Definition at line 347 of file xsh_data_order.c.
References xsh_order::absorder, xsh_order_list::absorder_max, xsh_order_list::absorder_min, xsh_order::cenpoly, check, xsh_order_list::list, xsh_order::order, xsh_order_list::size, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_ILLEGAL_MSG, XSH_ASSURE_NOT_NULL, xsh_msg, xsh_msg_dbg_high, xsh_msg_dbg_low, xsh_polynomial_fit_1d_create(), and xsh_unwrap_vector().
Referenced by fit_order_list(), and xsh_create_order_table().
void xsh_order_list_free | ( | xsh_order_list ** | list | ) |
free memory associated to an order_list
[in] | list | the order_list to free |
Definition at line 414 of file xsh_data_order.c.
References xsh_free_polynomial(), and xsh_free_propertylist().
Referenced by create_order_list(), main(), xsh_cfg_recover_add_peaks_xpos(), xsh_cfg_recover_guess_tab_corr_by_ordpos(), xsh_cfg_recover_linear_ext(), xsh_create_order_table(), xsh_data_check_spectralformat(), xsh_detect_arclines(), xsh_detect_continuum(), xsh_detect_order_edge(), xsh_dispersol_list_to_slitmap(), xsh_dispersol_list_to_wavemap(), xsh_flat_merge_qth_d2(), xsh_flexcor(), xsh_follow_arclines(), xsh_model_reduce(), xsh_opt_extract_orders(), xsh_order_list_create(), xsh_order_list_load(), xsh_order_list_merge(), xsh_order_list_new(), xsh_rectify(), xsh_rectify_and_shift(), xsh_rectify_ifu(), xsh_subtract_background(), xsh_subtract_sky_single(), xsh_wavemap_list_save(), and xsh_wavemap_list_save2().
int xsh_order_list_get_endy | ( | xsh_order_list * | list, | |
int | i | |||
) |
get position on Y axis of last pixel detected on order
[in] | list | the order_list |
[in] | i | the index order |
Definition at line 510 of file xsh_data_order.c.
References xsh_order_list::bin_y, convert_data_to_bin(), xsh_order::endy, xsh_order_list::list, size, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by clean_arclist_data(), create_blaze(), xsh_detect_order_edge(), xsh_dispersol_list_to_slitmap(), xsh_dispersol_list_to_wavemap(), xsh_mflat_normalize(), xsh_opt_extract_orders(), xsh_wavemap_list_new(), xsh_wavemap_list_save(), and xsh_wavemap_list_save2().
cpl_propertylist* xsh_order_list_get_header | ( | xsh_order_list * | list | ) |
get header of the table
[in] | list | the order_list |
Definition at line 473 of file xsh_data_order.c.
References xsh_order_list::header, and XSH_ASSURE_NOT_NULL.
Referenced by set_qc_parameters(), and xsh_create_order_table().
int xsh_order_list_get_index_by_absorder | ( | xsh_order_list * | list, | |
double | absorder | |||
) |
Definition at line 449 of file xsh_data_order.c.
References xsh_order::absorder, xsh_order_list::list, xsh_order_list::size, size, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by clean_arclist_data(), main(), and xsh_detect_arclines().
int xsh_order_list_get_order | ( | xsh_order_list * | list, | |
int | absorder | |||
) |
Definition at line 522 of file xsh_data_order.c.
References xsh_order::absorder, xsh_order_list::list, xsh_order_list::size, and XSH_ASSURE_NOT_NULL.
Referenced by find_tilt(), xsh_cfg_recover_add_peaks_xpos(), and xsh_cfg_recover_guess_tab_corr_by_ordpos().
int xsh_order_list_get_starty | ( | xsh_order_list * | list, | |
int | i | |||
) |
get position on Y axis of first pixel detected on order
[in] | list | the order_list |
[in] | i | the index order |
Definition at line 490 of file xsh_data_order.c.
References xsh_order_list::bin_y, convert_data_to_bin(), xsh_order_list::list, size, xsh_order::starty, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by clean_arclist_data(), create_blaze(), xsh_detect_order_edge(), xsh_dispersol_list_to_slitmap(), xsh_dispersol_list_to_wavemap(), xsh_mflat_normalize(), xsh_opt_extract_orders(), xsh_wavemap_list_new(), xsh_wavemap_list_save(), and xsh_wavemap_list_save2().
xsh_order_list* xsh_order_list_load | ( | cpl_frame * | frame, | |
xsh_instrument * | instr | |||
) |
load an order list from a frame
[in] | frame | the table wich contains polynomials coefficients of the orders |
[in] | instr | instrument in use |
Definition at line 189 of file xsh_data_order.c.
References xsh_order::absorder, xsh_order_list::bin_x, xsh_order_list::bin_y, xsh_order::cenpoly, check, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order::endy, xsh_order_list::header, xsh_order_list::list, xsh_order::order, xsh_order::pol_degree, xsh_order_list::size, xsh_order::sliclopoly, xsh_order::slicuppoly, xsh_order::starty, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, xsh_error_msg, xsh_free_propertylist(), xsh_get_table_value(), xsh_instrument_get_binx(), xsh_instrument_get_biny(), xsh_msg_dbg_medium, xsh_order_list_create(), xsh_order_list_free(), XSH_ORDER_TABLE_COLNAME_ABSORDER, XSH_ORDER_TABLE_COLNAME_CENTER, XSH_ORDER_TABLE_COLNAME_EDGLO, XSH_ORDER_TABLE_COLNAME_EDGUP, XSH_ORDER_TABLE_COLNAME_ENDY, XSH_ORDER_TABLE_COLNAME_ORDER, XSH_ORDER_TABLE_COLNAME_SLICLO, XSH_ORDER_TABLE_COLNAME_SLICUP, XSH_ORDER_TABLE_COLNAME_STARTY, XSH_ORDER_TABLE_DEGY, XSH_TABLE_FREE, and XSH_TABLE_LOAD.
Referenced by main(), xsh_cfg_recover_add_peaks_xpos(), xsh_cfg_recover_guess_tab_corr_by_ordpos(), xsh_cfg_recover_linear_ext(), xsh_data_check_spectralformat(), xsh_detect_arclines(), xsh_detect_continuum(), xsh_detect_order_edge(), xsh_dispersol_list_to_slitmap(), xsh_dispersol_list_to_wavemap(), xsh_flat_merge_qth_d2(), xsh_flexcor(), xsh_follow_arclines(), xsh_geom_ifu(), xsh_model_reduce(), xsh_opt_extract_orders(), xsh_rectify(), xsh_rectify_and_shift(), xsh_rectify_ifu(), xsh_subtract_background(), xsh_subtract_sky_single(), and xsh_wavemap_list_save().
xsh_order_list* xsh_order_list_merge | ( | xsh_order_list * | lista, | |
xsh_order_list * | listb | |||
) |
Definition at line 548 of file xsh_data_order.c.
References xsh_order::absorder, xsh_order::cenpoly, check, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order::endy, xsh_order_list::list, xsh_order::order, xsh_order_list::size, size, xsh_order::sliclopoly, xsh_order::slicuppoly, xsh_order::starty, XSH_ASSURE_NOT_NULL, xsh_order_list_free(), and xsh_order_list_new().
Referenced by xsh_flat_merge_qth_d2().
xsh_order_list* xsh_order_list_new | ( | int | size | ) |
Create a new order list from size (no check).
[in] | size | The size of list |
Definition at line 129 of file xsh_data_order.c.
References xsh_order_list::header, xsh_order_list::list, xsh_order_list::size, XSH_ASSURE_NOT_ILLEGAL, XSH_CALLOC, XSH_NEW_PROPERTYLIST, and xsh_order_list_free().
Referenced by xsh_order_list_create(), and xsh_order_list_merge().
cpl_frame* xsh_order_list_save | ( | xsh_order_list * | order_list, | |
xsh_instrument * | instrument, | |||
const char * | filename, | |||
const char * | tag, | |||
const int | ny | |||
) |
Save an order list to a frame.
[in] | order_list | The order_list structure wich contains polynomials coefficients of the orders |
[in] | instrument | The instrument setting |
[in] | filename | The name of the save file on disk |
[in] | tag | The frame tag |
[in] | ny | y size of frame |
Definition at line 785 of file xsh_data_order.c.
References xsh_order::absorder, xsh_order::cenpoly, check, xsh_order::edglopoly, xsh_order::edguppoly, endy, xsh_order::endy, xsh_order_list::header, xsh_order_list::list, norder, xsh_order::order, PointStep, xsh_order_list::size, xsh_order::sliclopoly, xsh_order::slicuppoly, starty, xsh_order::starty, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CMP_TAG_LAMP, xsh_frame_product(), xsh_free_table(), xsh_msg, xsh_msg_dbg_high, XSH_ORDER_TAB_EDGES, XSH_ORDER_TABLE_COLNAME_ABSORDER, XSH_ORDER_TABLE_COLNAME_CENTER, XSH_ORDER_TABLE_COLNAME_CENTERX, XSH_ORDER_TABLE_COLNAME_CENTERY, XSH_ORDER_TABLE_COLNAME_EDGLO, XSH_ORDER_TABLE_COLNAME_EDGLOX, XSH_ORDER_TABLE_COLNAME_EDGUP, XSH_ORDER_TABLE_COLNAME_EDGUPX, XSH_ORDER_TABLE_COLNAME_ENDY, XSH_ORDER_TABLE_COLNAME_ORDER, XSH_ORDER_TABLE_COLNAME_SLICLO, XSH_ORDER_TABLE_COLNAME_SLICLOX, XSH_ORDER_TABLE_COLNAME_SLICUP, XSH_ORDER_TABLE_COLNAME_SLICUPX, XSH_ORDER_TABLE_COLNAME_STARTY, XSH_ORDER_TABLE_DEGY, xsh_pfits_set_pcatg(), and XSH_QC_ORD_EDGE_NDET.
Referenced by main(), xsh_create_order_table(), xsh_detect_continuum(), xsh_detect_order_edge(), xsh_flat_merge_qth_d2(), xsh_flexcor(), xsh_model_order_edges_tab_create(), and xsh_order_table_from_fmtchk().
void xsh_order_list_set_bin_x | ( | xsh_order_list * | list, | |
int | bin | |||
) |
Set the bin of image in x.
[in] | list | The order list to update |
[in] | bin | The binning value in x |
Definition at line 614 of file xsh_data_order.c.
References xsh_order_list::bin_x, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_flat_merge_qth_d2(), and xsh_subtract_background().
void xsh_order_list_set_bin_y | ( | xsh_order_list * | list, | |
int | bin | |||
) |
Set the bin of image in y.
[in] | list | The order list to update |
[in] | bin | The binning value in y |
Definition at line 633 of file xsh_data_order.c.
References xsh_order_list::bin_y, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_flat_merge_qth_d2(), and xsh_subtract_background().
void xsh_order_list_verify | ( | xsh_order_list * | list, | |
int | ny | |||
) |
Check that end and starty are coherent. If not, set starty at 0 and endy at the Y size of the image.
list | Order list to check | |
ny | Image size (Y) |
Definition at line 104 of file xsh_data_order.c.
References xsh_order::endy, xsh_order_list::list, xsh_order_list::size, and xsh_order::starty.
Referenced by xsh_detect_continuum().
void xsh_order_split_qth_d2 | ( | cpl_frame * | order_tab_frame, | |
cpl_frame * | spectralformat_frame, | |||
cpl_frame ** | qth_order_tab_frame, | |||
cpl_frame ** | d2_order_tab_frame, | |||
xsh_instrument * | instr | |||
) |
Definition at line 1053 of file xsh_data_order.c.
References check, XSH_ASSURE_NOT_NULL, xsh_free_propertylist(), xsh_free_table(), xsh_get_table_value(), XSH_ORDER_MAX_UVB_QTH, XSH_ORDER_MIN_UVB_D2, XSH_ORDER_TABLE_COLNAME_ABSORDER, xsh_spectralformat_list_free(), xsh_spectralformat_list_get_lamp(), xsh_spectralformat_list_load(), and XSH_TABLE_LOAD.
Referenced by xsh_mflat().
xsh_spectrum1D* xsh_spectrum1D_create | ( | double | lambda_min, | |
double | lambda_max, | |||
double | lambda_step | |||
) |
Create a 1D spectrum structure.
[in] | lambda_min | minimum wavelength of spectrum |
[in] | lambda_max | maximum wavelength of spectrum |
[in] | lambda_step | lambda binning |
Definition at line 70 of file xsh_data_spectrum1D.c.
References check, xsh_spectrum1D::errs, xsh_spectrum1D::errs_header, xsh_spectrum1D::flux, xsh_spectrum1D::flux_header, xsh_spectrum1D::lambda_max, xsh_spectrum1D::lambda_min, xsh_spectrum1D::lambda_step, xsh_spectrum1D::qual, xsh_spectrum1D::qual_header, xsh_spectrum1D::size, XSH_ASSURE_NOT_ILLEGAL, XSH_CALLOC, XSH_NEW_PROPERTYLIST, xsh_pfits_set_cdelt1(), xsh_pfits_set_crpix1(), xsh_pfits_set_crval1(), xsh_pfits_set_extname(), and xsh_spectrum1D_free().
void xsh_spectrum1D_free | ( | xsh_spectrum1D ** | s | ) |
free memory associated to an 1D spectrum
[in] | s | spectrum structure to free |
Definition at line 313 of file xsh_data_spectrum1D.c.
References XSH_FREE, xsh_free_image(), and xsh_free_propertylist().
Referenced by xsh_spectrum1D_create(), and xsh_spectrum1D_load().
double* xsh_spectrum1D_get_errs | ( | xsh_spectrum1D * | s | ) |
Get errs of spectrum.
[in] | s | spectrum structure |
Definition at line 272 of file xsh_data_spectrum1D.c.
References check, xsh_spectrum1D::errs, and XSH_ASSURE_NOT_NULL.
double* xsh_spectrum1D_get_flux | ( | xsh_spectrum1D * | s | ) |
Get flux of spectrum.
[in] | s | spectrum structure |
Definition at line 250 of file xsh_data_spectrum1D.c.
References check, xsh_spectrum1D::flux, and XSH_ASSURE_NOT_NULL.
double xsh_spectrum1D_get_lambda_max | ( | xsh_spectrum1D * | s | ) |
Get maximum lambda of spectrum.
[in] | s | spectrum structure |
Definition at line 207 of file xsh_data_spectrum1D.c.
References xsh_spectrum1D::lambda_max, and XSH_ASSURE_NOT_NULL.
double xsh_spectrum1D_get_lambda_min | ( | xsh_spectrum1D * | s | ) |
Get minimum lambda of spectrum.
[in] | s | spectrum structure |
Definition at line 186 of file xsh_data_spectrum1D.c.
References xsh_spectrum1D::lambda_min, and XSH_ASSURE_NOT_NULL.
double xsh_spectrum1D_get_lambda_step | ( | xsh_spectrum1D * | s | ) |
Get bin in lambda of spectrum.
[in] | s | spectrum structure |
Definition at line 228 of file xsh_data_spectrum1D.c.
References xsh_spectrum1D::lambda_step, and XSH_ASSURE_NOT_NULL.
int* xsh_spectrum1D_get_qual | ( | xsh_spectrum1D * | s | ) |
Get qual of spectrum.
[in] | s | spectrum structure |
Definition at line 294 of file xsh_data_spectrum1D.c.
References check, xsh_spectrum1D::qual, and XSH_ASSURE_NOT_NULL.
int xsh_spectrum1D_get_size | ( | xsh_spectrum1D * | s | ) |
Get size of spectrum.
[in] | s | spectrum structure |
Definition at line 165 of file xsh_data_spectrum1D.c.
References xsh_spectrum1D::size, and XSH_ASSURE_NOT_NULL.
xsh_spectrum1D* xsh_spectrum1D_load | ( | cpl_frame * | s1d_frame, | |
xsh_instrument * | instr | |||
) |
Load a 1D spectrum structure.
[in] | s1d_frame | the 1D spectrum frame |
[in] | instr | instrument structure |
Definition at line 121 of file xsh_data_spectrum1D.c.
References check, xsh_spectrum1D::errs, xsh_spectrum1D::errs_header, xsh_spectrum1D::flux, xsh_spectrum1D::flux_header, xsh_spectrum1D::lambda_max, xsh_spectrum1D::lambda_min, xsh_spectrum1D::lambda_step, xsh_spectrum1D::qual, xsh_spectrum1D::qual_header, xsh_spectrum1D::size, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_pfits_get_cdelt1(), xsh_pfits_get_crval1(), xsh_pfits_get_naxis1(), and xsh_spectrum1D_free().
cpl_frame* xsh_spectrum1D_save | ( | xsh_spectrum1D * | s, | |
const char * | filename | |||
) |
save a 1D spectrum
[in] | s | spectrum structure to save |
[in] | filename | name of the save file |
Definition at line 336 of file xsh_data_spectrum1D.c.
References check, check_msg, xsh_spectrum1D::errs, xsh_spectrum1D::errs_header, xsh_spectrum1D::flux, xsh_spectrum1D::flux_header, xsh_spectrum1D::qual, xsh_spectrum1D::qual_header, XSH_ASSURE_NOT_NULL, xsh_frame_product(), xsh_free_frame(), XSH_SPECTRUM1D_DATA_BPP, XSH_SPECTRUM1D_ERRS_BPP, and XSH_SPECTRUM1D_QUAL_BPP.