/home/amodigli/releases/xsh/1.2.10/pso/xsh.26608/xshp/xsh/xsh_utils.h File Reference

#include <cpl.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <xsh_data_grid.h>
#include <xsh_utils_polynomial.h>

Go to the source code of this file.

Data Structures

struct  xsh_sort_data
struct  XSH_GAUSSIAN_FIT

Defines

#define M_PI   3.1415926535897932384626433832795
#define XSH_MAX(A, B)   A > B ? A : B
#define XSH_MALLOC(POINTER, TYPE, SIZE)
#define XSH_CALLOC(POINTER, TYPE, SIZE)
#define XSH_REALLOC(POINTER, TYPE, SIZE)
#define XSH_NEW_PROPERTYLIST(POINTER)
#define XSH_NEW_FRAME(POINTER)
#define XSH_NEW_FRAMESET(POINTER)
#define XSH_FREE(POINTER)
#define XSH_PREFIX(prefix, name, instr)
#define XSH_MODE_PREFIX(prefix, name, instr)
#define XSH_TABLE_NEW_COL(TABLE, NAME, UNIT, TYPE)
#define BOOLEAN_TO_STRING(boolean)   boolean == 0 ? "false" : "true"

Enumerations

enum  { XSH_DEBUG_LEVEL_NONE, XSH_DEBUG_LEVEL_LOW, XSH_DEBUG_LEVEL_MEDIUM, XSH_DEBUG_LEVEL_HIGH }

Functions

long xsh_round_double (double x)
 Computes round(x).
double xsh_max_double (double x, double y)
 Maximum of two numbers.
double xsh_pow_int (double x, int y)
 Computes x^y.
cpl_frame * xsh_frame_inv (cpl_frame *in, const char *filename, xsh_instrument *instr)
 Inverse the flux of a PRE frame.
cpl_frame * xsh_frame_abs (cpl_frame *in, xsh_instrument *instr, cpl_frame **sign)
 Computes absolute value of a frame.
cpl_frame * xsh_frame_mult (cpl_frame *in, xsh_instrument *instr, cpl_frame *sign)
 Computes product of two input frames.
cpl_parameterlist * xsh_parameterlist_duplicate (const cpl_parameterlist *pin)
 Extract frames with given tag from frameset.
void xsh_plist_dump (cpl_propertylist *plist)
 Dump propertylist.
cpl_error_code xsh_frameset_dump (cpl_frameset *set)
 Dump frameset.
char * xsh_get_basename (const char *filename)
 Return base filename.
const char * xsh_get_license (void)
 Get the pipeline copyright and license.
void xsh_init (void)
 Reset library state.
int xsh_max_int (int x, int y)
 Maximum of two numbers.
void xsh_free (const void *mem)
 Deallocate memory.
void xsh_free_temporary_files (void)
 Free temprary files list.
cpl_error_code xsh_end (const char *recipe_id, cpl_frameset *frames, cpl_parameterlist *list)
 Recipe termination.
cpl_error_code xsh_begin (cpl_frameset *frames, const cpl_parameterlist *parameters, xsh_instrument **instr, cpl_frameset **raws, cpl_frameset **calib, const char *tag_list[], int tag_list_size, const char *recipe_id, unsigned int binary_version, const char *short_descr)
 Recipe initialization.
void xsh_add_temporary_file (const char *name)
 Add temporary file to temprary files list.
cpl_error_code xsh_get_property_value (const cpl_propertylist *plist, const char *keyword, cpl_type keywordtype, void *result)
 Read a property value from a property list.
char * xsh_sdate_utc (time_t *t)
char * xsh_stringdup (const char *s1)
 String duplication.
char * xsh_stringcat (const char *s1, const char *s2)
 String concatenation.
char * xsh_stringcat_3 (const char *s1, const char *s2, const char *s3)
 String concatenation.
char * xsh_stringcat_4 (const char *s1, const char *s2, const char *s3, const char *s4)
 String concatenation.
char * xsh_stringcat_5 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5)
 String concatenation.
char * xsh_stringcat_6 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6)
 String concatenation.
char * xsh_stringcat_any (const char *s,...)
 Concatenate an arbitrary number of strings.
void xsh_reindex (double *data, int *idx, int size)
 TO BE DESCRIBED.
void xsh_reindex_float (float *data, int *idx, int size)
 TO BE DESCRIBED.
void xsh_reindex_int (int *data, int *idx, int size)
 TO BE DESCRIBED.
int * xsh_sort (void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *))
 Sort an array and give is index table.
void xsh_tools_min_max (int size, double *tab, double *min, double *max)
 computes min & max in ab array
void xsh_tools_get_statistics (double *tab, int size, double *median, double *mean, double *stdev)
 Compute median, stdev and mean for the tab.
void xsh_free_table (cpl_table **t)
 Deallocate a table and set the pointer to NULL.
void xsh_free_image (cpl_image **i)
 Deallocate an image and set the pointer to NULL.
void xsh_free_mask (cpl_mask **m)
 Deallocate an image mask and set the pointer to NULL.
void xsh_free_imagelist (cpl_imagelist **i)
 Deallocate an image list and set the pointer to NULL.
void xsh_free_propertylist (cpl_propertylist **p)
 Deallocate a property list and set the pointer to NULL.
void xsh_free_polynomial (cpl_polynomial **p)
 Deallocate a polynomial and set the pointer to NULL.
void xsh_free_matrix (cpl_matrix **m)
 Deallocate a matrix and set the pointer to NULL.
void xsh_free_array (cpl_array **v)
 Deallocate an array and set the pointer to NULL.
void xsh_free_vector (cpl_vector **v)
 Deallocate a vector and set the pointer to NULL.
void xsh_free_stats (cpl_stats **s)
 Deallocate a stats object and set the pointer to NULL.
void xsh_unwrap_image (cpl_image **i)
 Unwrap an image and set the pointer to NULL.
void xsh_unwrap_vector (cpl_vector **v)
 Unwrap a vector and set the pointer to NULL.
void xsh_unwrap_bivector_vectors (cpl_bivector **b)
 Unwrap a bi-vector and set the pointer to NULL.
void xsh_free_parameterlist (cpl_parameterlist **p)
 Deallocate a parameter list and set the pointer to NULL.
void xsh_free_parameter (cpl_parameter **p)
 Deallocate a parameter and set the pointer to NULL.
void xsh_free_frameset (cpl_frameset **f)
 Deallocate a frame set and set the pointer to NULL.
void xsh_free_frame (cpl_frame **f)
 Deallocate a frame and set the pointer to NULL.
void xsh_show_time (const char *comment)
 show time
cpl_error_code xsh_tools_sort_double (double *pix_arr, int size)
 Sort a double array.
cpl_error_code xsh_tools_sort_float (float *pix_arr, int size)
 Sort a float array.
cpl_error_code xsh_tools_sort_int (int *pix_arr, int size)
 Sort an integer array.
void xsh_tools_tchebitchev_transform_tab (int size, double *pos, double min, double max, double *tcheb_pos)
 computes Tchebitchev transformation
double xsh_tools_tchebitchev_transform (double pos, double min, double max)
 computes Tchebitchev transformation
double xsh_tools_tchebitchev_reverse_transform (double pos, double min, double max)
 computes reverse Tchebitchev transformation
cpl_vector * xsh_tools_tchebitchev_poly_eval (int n, double X)
 Compute tchebitchev Tn(X) first coefficient for tchebitchev polynomial.
double xsh_tools_get_median_double (double *array, int size)
 Calculates the median value of an array of double.
int xsh_tools_running_median_1d_get_max (double *tab, int size, int wsize)
 get max of a list of doubles after running median
void xsh_image_fit_spline (cpl_image *img, xsh_grid *grid)
 perform spline fit
void xsh_vector_fit_gaussian (cpl_vector *x, cpl_vector *y, XSH_GAUSSIAN_FIT *result)
 set debug level
double xsh_vector_get_err_median (cpl_vector *vect)
 Computes median error on a data set.
double xsh_vector_get_err_mean (cpl_vector *vect)
 Computes mean error on a data set.
int xsh_debug_level_set (int level)
 set debug level
int xsh_debug_level_get (void)
 get debug level
const char * xsh_debug_level_tostring (void)
 set debug level
int xsh_time_stamp_set (int ts)
 set timestamp
int xsh_time_stamp_get (void)
 get timestamp
void xsh_mem_dump (const char *prompt)
cpl_image * xsh_imagelist_collapse_sigclip_iter_create (const cpl_imagelist *imlist, double sigma_low, double sigma_upp, const int niter)
 Average with sigma-clipping rejection an imagelist to a single image.
double convert_bin_to_data (double bin_data, int binning)
double convert_data_to_bin (double data, int binning)
cpl_frameset * xsh_order_frameset_by_date (cpl_frameset *frameset)
 Order frameset by date.
cpl_error_code xsh_set_cd_matrix (cpl_propertylist *plist)
 Set CD matrix.
cpl_error_code xsh_set_cd_matrix1d (cpl_propertylist *plist)
 Set CD matrix.
cpl_error_code xsh_set_cd_matrix2d (cpl_propertylist *plist)
 Set CD matrix.
cpl_error_code xsh_set_cd_matrix3d (cpl_propertylist *plist)
 Set CD matrix.
int xsh_erase_table_rows (cpl_table *t, const char *column, cpl_table_select_operator operator, double value)
 Erase table rows.
int xsh_select_table_rows (cpl_table *t, const char *column, cpl_table_select_operator operator, double value)
 Select table rows.
polynomialxsh_polynomial_regression_2d (cpl_table *t, const char *X1, const char *X2, const char *Y, const char *sigmaY, int degree1, int degree2, const char *polynomial_fit, const char *residual_square, const char *variance_fit, double *mse, double *red_chisq, polynomial **variance, double kappa, double min_reject)
 Fit a 2d polynomial to three table columns.
cpl_error_code xsh_check_input_is_unbinned (cpl_frame *in)
 Check if an input frame is not binned.
cpl_error_code xsh_update_pheader_in_image_multi (cpl_frame *frame, const cpl_propertylist *pheader)
 Update FITS header.
cpl_error_code xsh_monitor_flux (cpl_frame *frm_ima, const cpl_frame *frm_tab, xsh_instrument *instrument)
 Monitor Flux level along the orders traces given by an input table.
cpl_error_code xsh_frameset_dump_nod_info (cpl_frameset *set)
 Dump frameset nod info.
void xsh_frame_image_save (cpl_frame *frm, const char *name_o)
 save an image frame
void xsh_frame_table_save (cpl_frame *frm, const char *name_o)
 Save a table frame.
char * xsh_set_recipe_file_prefix (cpl_frameset *raw, const char *recipe)
 Set recipe frames prefix.
cpl_frame * xsh_frameset_average (cpl_frameset *set, const char *tag)
 Dump propertylist.
cpl_frame * xsh_frameset_add (cpl_frameset *set, xsh_instrument *instr)
 coadd frames in a frameset
int xsh_fileutils_move (const char *srcpath, const char *dstpath)
int xsh_fileutils_copy (const char *srcpath, const char *dstpath)
void xsh_add_product_file (const char *name)
 Add temporary file to temprary files list.
void xsh_free_product_files (void)
 Free temprary files list.
const char * xsh_string_tolower (char *s)
 Convert all uppercase characters in a string into lowercase characters.
const char * xsh_string_toupper (char *s)
 Convert all lowercase characters in a string into uppercase characters.
double xsh_spline_hermite_table (double xp, const cpl_table *t, const char *column_x, const char *column_y, int *istart)
 Spline interpolation based on Hermite polynomials.
cpl_frame * xsh_util_multiply_by_response (cpl_frame *merged_sci, cpl_frame *response, const char *tag)
 Multiply input frame by response frame.
cpl_frame * xsh_util_multiply_by_response_ord (cpl_frame *merged_sci, cpl_frame *response, const char *tag)
 Multiply input frame by response frame.
cpl_frame * xsh_util_frameset_collapse_mean (cpl_frameset *set, xsh_instrument *instrument)
 Compute mean frame from a list of (IMAGE) framesets.
cpl_frame * xsh_spectrum_resample (cpl_frame *frame_inp, const double wstep, const double wmin, const double wmax, xsh_instrument *instr)
 resample a spectrum
cpl_frame * xsh_spectrum_resample2 (cpl_frame *frame_inp, const double wstep, const double wmin, const double wmax, xsh_instrument *instr)
cpl_frame * xsh_spectrum_interpolate (cpl_frame *table_frame, const double wstep, const double wmin, const double wmax)
 spectra interpolation
cpl_frame * xsh_spectrum_interpolate_linear (cpl_frame *table_frame, const double wstep, const double wmin, const double wmax)
 spectra interpolation
cpl_image * xsh_vector_to_image (const cpl_vector *vector, cpl_type type)
 Convert a vector to a 1d image.
cpl_vector * xsh_image_to_vector (cpl_image *spectrum)
cpl_image * xsh_normalize_spectrum_image (const cpl_image *spectrum, const cpl_image *spectrum_error, const cpl_propertylist *spectrum_header, const int binx, const double gain, const double exptime, const double airmass, const int n_traces, const cpl_table *atm_extinction, cpl_image **scaled_error)
 Normalize a spectrum.
cpl_frame * xsh_normalize_spectrum (const cpl_frame *obj_frame, const cpl_frame *atm_ext_frame, cpl_boolean correct_binning, xsh_instrument *instrument, const char *tag)
 Normalize a spectrum.
cpl_frame * xsh_normalize_spectrum_ord (const cpl_frame *obj_frame, const cpl_frame *atm_ext_frame, cpl_boolean correct_binning, xsh_instrument *instrument, const char *tag)
 Normalize a spectrum.
void xsh_array_clip_mean (cpl_array *array, double kappa, int niter, double frac_min, double *mean, double *stdev)
 mean clip of an array
void xsh_array_clip_median (cpl_array *array, double kappa, int niter, double frac_min, double *median, double *stdev)
 median clip of an array
void xsh_array_clip_poly1d (cpl_vector *pos_array, cpl_vector *val_array, double kappa, int niter, double frac_min, int deg, cpl_polynomial **poly, double *chisq, int **flags)
 clip outliers from a 1D poly fit

Define Documentation

#define BOOLEAN_TO_STRING ( boolean   )     boolean == 0 ? "false" : "true"

Definition at line 114 of file xsh_utils.h.

Referenced by xsh_detect_order_edge().

#define M_PI   3.1415926535897932384626433832795
#define XSH_CALLOC ( POINTER,
TYPE,
SIZE   ) 
Value:
assure(POINTER == NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Try to allocate non NULL pointer");\
  POINTER = (TYPE*)(cpl_calloc(SIZE,sizeof(TYPE)));\
  assure (POINTER != NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Memory allocation failed!")

Definition at line 53 of file xsh_utils.h.

Referenced by chunk_coadd(), clean_arclist_data(), compute_abs_order(), create_order_list(), create_rectify_nod_list(), cumulate_qc_parameter(), data_wavesol_fit_with_sigma(), fill_rectified(), find_tilt(), fit_order_edge_list(), fit_order_list(), get_errors(), invert_startx(), lambda_fit(), theo_tab_model(), xsh_arclist_load(), xsh_array_clip_mean(), xsh_array_clip_median(), xsh_array_clip_poly1d(), xsh_atmos_ext_list_create(), xsh_bpmap_collapse_mean(), xsh_bpmap_collapse_median(), xsh_combine_nod(), xsh_create_order_table(), xsh_detect_arclines(), xsh_detect_order_edge(), xsh_dispersol_list_new(), xsh_follow_arclines(), xsh_frameset_add(), xsh_grid_create(), xsh_image_3d_new(), xsh_image_create_model_image(), xsh_image_extract_optimal(), xsh_image_gaussian_fit_y(), xsh_interpolate_atm_ext(), xsh_linetilt_new(), xsh_localization_create(), xsh_localize_obj_auto(), xsh_merge_ord_with_tag(), xsh_model_anneal_reduce(), xsh_model_first_anneal(), xsh_model_order_edges_tab_create(), xsh_model_pipe_anneal(), xsh_order_frameset_by_date(), xsh_order_list_new(), xsh_order_table_from_fmtchk(), xsh_pre_3d_load(), xsh_pre_3d_new(), xsh_pre_create(), xsh_pre_load(), xsh_pre_new(), xsh_pre_window_best_median_flux_pos(), xsh_rec_list_create_with_size(), xsh_rec_list_load(), xsh_rec_list_load_eso(), xsh_rec_list_set_data_size(), xsh_resid_order_create(), xsh_resid_order_load(), xsh_resid_tab_create(), xsh_resid_tab_load(), xsh_response_calculate(), xsh_scired_slit_nod_accurate(), xsh_sdate_utc(), xsh_shift_tab_create(), xsh_shift_tab_load(), xsh_slice_offset_create(), xsh_spectralformat_list_create(), xsh_spectrum1D_create(), xsh_spectrum1D_load(), xsh_spectrum_1D_create(), xsh_spectrum_2D_create(), xsh_spectrum_duplicate(), xsh_spectrum_load(), xsh_spectrum_load_order(), xsh_star_flux_list_create(), xsh_the_map_create(), xsh_the_map_load(), xsh_wavemap_lambda_range(), xsh_wavemap_list_create(), xsh_wavemap_list_set_max_size(), xsh_wavesol_compute(), xsh_wavesol_load(), and xsh_wavesol_residual().

#define XSH_FREE ( POINTER   ) 
Value:
if(POINTER!=NULL) cpl_free(POINTER);\
  POINTER = NULL

Definition at line 89 of file xsh_utils.h.

Referenced by calculate_qc_parameters(), chunk_coadd(), clean_arclist_data(), compute_abs_order(), concat_rec(), create_blaze(), data_wavesol_fit_with_sigma(), do_compute(), fill_rectified(), find_tilt(), fit_order_edge_list(), fit_order_list(), flag_noisy_pixels(), get_errors(), lambda_fit(), main(), theo_tab_filter(), theo_tab_model(), xsh_2dmap(), xsh_add_product(), xsh_add_product_bpmap(), xsh_add_product_image(), xsh_add_product_imagelist(), xsh_add_product_pre(), xsh_add_product_pre_3d(), xsh_add_product_spectrum(), xsh_add_product_table(), xsh_add_product_table_multi(), xsh_arclist_free(), xsh_array_clip_mean(), xsh_array_clip_median(), xsh_array_clip_poly1d(), xsh_bpmap_2pre(), xsh_bpmap_collapse_mean(), xsh_bpmap_collapse_median(), xsh_combine_nod(), xsh_create_dispersol_physmod(), xsh_create_master_bpmap(), xsh_create_master_flat(), xsh_create_order_table(), xsh_create_poly_wavemap(), xsh_detect_arclines(), xsh_detect_continuum(), xsh_detect_order_edge(), xsh_extract_with_tag(), xsh_fit_gaussian(), xsh_flat_merge_qth_d2(), xsh_flexcomp(), xsh_follow_arclines(), xsh_frameset_add(), xsh_geom_ifu(), xsh_grid_free(), xsh_image_3d_free(), xsh_image_3d_load(), xsh_image_create_model_image(), xsh_image_extract_optimal(), xsh_image_fit_spline(), xsh_image_gaussian_fit_y(), xsh_image_get_hot_cold_pixs(), xsh_instrument_get_config(), xsh_localize_obj_auto(), xsh_mbias(), xsh_mdark(), xsh_merge_ord_with_tag(), xsh_mflat(), xsh_mflat_recipe_main(), xsh_model_order_edges_tab_create(), xsh_model_pipe_anneal(), xsh_opt_extract_orders(), xsh_order_frameset_by_date(), xsh_order_table_from_fmtchk(), xsh_orderpos(), xsh_parameters_background_get(), xsh_parameters_clipping_detect_arclines_get(), xsh_parameters_d2_detect_order_get(), xsh_parameters_detect_arclines_get(), xsh_parameters_detect_continuum_get(), xsh_parameters_detect_order_get(), xsh_parameters_dispersol_get(), xsh_parameters_localize_obj_get(), xsh_parameters_merge_ord_get(), xsh_parameters_new_string(), xsh_parameters_opt_extract_get(), xsh_parameters_slit_limit_get(), xsh_pre_3d_free(), xsh_pre_data_window_median_flux(), xsh_pre_save_product(), xsh_pre_window_best_median_flux_pos(), xsh_predict(), xsh_rec_list_add(), xsh_remove_crh_single(), xsh_resid_order_free(), xsh_resid_tab_free(), xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_response_calculate(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod(), xsh_scired_slit_nod_accurate(), xsh_scired_slit_nod_fast(), xsh_scired_slit_offset(), xsh_scired_slit_stare(), xsh_shift(), xsh_sort(), xsh_spectrum1D_free(), xsh_spectrum_free(), xsh_subtract_background(), xsh_tools_running_median_1d_get_max(), xsh_util_physmod(), xsh_wavecal(), xsh_wavemap_lambda_range(), xsh_wavemap_list_compute(), xsh_wavemap_list_compute_poly(), xsh_wavemap_list_save(), xsh_wavemap_list_save2(), xsh_wavesol_compute(), and xsh_wavesol_residual().

#define XSH_MALLOC ( POINTER,
TYPE,
SIZE   ) 
Value:
assure(POINTER == NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Try to allocate non NULL pointer");\
  POINTER = (TYPE*)(cpl_malloc(SIZE*sizeof(TYPE)));\
  assure (POINTER != NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Memory allocation failed!")

Definition at line 46 of file xsh_utils.h.

Referenced by clean_arclist_data(), compute_shift_with_kw(), create_blaze(), flag_noisy_pixels(), main(), theo_tab_filter(), theo_tab_model(), xsh_bpmap_collapse_mean(), xsh_bpmap_collapse_median(), xsh_create_dispersol_physmod(), xsh_create_poly_wavemap(), xsh_detect_arclines(), xsh_detect_continuum(), xsh_fit_gaussian(), xsh_grid_add(), xsh_image_3d_load(), xsh_image_fit_spline(), xsh_image_gaussian_fit_y(), xsh_instrument_get_config(), xsh_opt_extract_orders(), xsh_parameters_background_get(), xsh_parameters_clipping_dcn_get(), xsh_parameters_clipping_detect_arclines_get(), xsh_parameters_d2_detect_order_get(), xsh_parameters_detect_arclines_get(), xsh_parameters_detect_continuum_get(), xsh_parameters_detect_order_get(), xsh_parameters_dispersol_get(), xsh_parameters_extract_get(), xsh_parameters_localize_obj_get(), xsh_parameters_merge_ord_get(), xsh_parameters_opt_extract_get(), xsh_parameters_remove_crh_single_get(), xsh_parameters_slit_limit_get(), xsh_parameters_subtract_sky_single_get(), xsh_pre_data_window_median_flux(), xsh_rec_list_add(), xsh_sort(), xsh_subtract_background(), xsh_tools_running_median_1d_get_max(), xsh_wavemap_list_compute(), xsh_wavemap_list_compute_poly(), xsh_wavesol_create(), and xsh_wavesol_duplicate().

#define XSH_MAX ( A,
 )     A > B ? A : B

Definition at line 43 of file xsh_utils.h.

#define XSH_MODE_PREFIX ( prefix,
name,
instr   ) 
Value:
XSH_FREE(prefix);\
  prefix = xsh_stringcat_any(name,"_",\
                              xsh_instrument_mode_tostring(instr ),\
                              "_",\
                              xsh_instrument_arm_tostring(instr ),\
                              "" ) ;\
  XSH_ASSURE_NOT_NULL(prefix)

Definition at line 100 of file xsh_utils.h.

#define XSH_NEW_FRAME ( POINTER   ) 
Value:
assure(POINTER == NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Try to allocate non NULL pointer");\
  POINTER = cpl_frame_new();\
  assure (POINTER != NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Memory allocation for frame failed!")

Definition at line 74 of file xsh_utils.h.

#define XSH_NEW_FRAMESET ( POINTER   ) 
Value:
assure(POINTER == NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Try to allocate non NULL pointer");\
  POINTER = cpl_frameset_new();\
  assure (POINTER != NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Memory allocation for frameset failed!")

Definition at line 81 of file xsh_utils.h.

Referenced by main(), xsh_begin(), xsh_dfs_split_nir(), xsh_dfs_split_qth_d2(), and xsh_subtract_nir_on_off().

#define XSH_NEW_PROPERTYLIST ( POINTER   ) 
Value:
assure(POINTER == NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Try to allocate non NULL pointer");\
  POINTER = cpl_propertylist_new();\
  assure (POINTER != NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Memory allocation for propertylist failed!")

Definition at line 67 of file xsh_utils.h.

Referenced by create_order_list(), create_rectify_nod_list(), xsh_detect_continuum(), xsh_detect_order_edge(), xsh_dispersol_list_new(), xsh_localization_create(), xsh_order_list_new(), xsh_pre_create(), xsh_rec_list_create_with_size(), xsh_rec_list_load(), xsh_rec_list_load_eso(), xsh_slice_offset_create(), xsh_spectralformat_list_create(), xsh_spectrum1D_create(), xsh_spectrum_1D_create(), xsh_spectrum_2D_create(), and xsh_wavemap_list_create().

#define XSH_PREFIX ( prefix,
name,
instr   ) 
Value:
XSH_FREE(prefix);\
  prefix = xsh_stringcat_any(name,"_",\
                              xsh_instrument_arm_tostring(instr ),\
                              "" ) ;\
  XSH_ASSURE_NOT_NULL(prefix)

Definition at line 93 of file xsh_utils.h.

Referenced by xsh_2dmap(), xsh_mdark(), and xsh_util_physmod().

#define XSH_REALLOC ( POINTER,
TYPE,
SIZE   ) 
Value:
assure(POINTER != NULL, CPL_ERROR_ILLEGAL_INPUT,\
    "Try to re-allocate NULL pointer") ;\
  POINTER = (TYPE *)cpl_realloc(POINTER,SIZE*sizeof(TYPE)));\
  assure( POINTER != NULL, CPL_ERROR_ILLEGAL_OUTPUT,\
    "Memory re-allocation failed!")

Definition at line 60 of file xsh_utils.h.

#define XSH_TABLE_NEW_COL ( TABLE,
NAME,
UNIT,
TYPE   ) 
Value:
check( cpl_table_new_column(TABLE, NAME, TYPE));\
  check( cpl_table_set_column_unit( TABLE, NAME, UNIT))

Definition at line 110 of file xsh_utils.h.

Referenced by xsh_resid_order_2tab(), xsh_resid_order_save(), xsh_resid_tab_save(), xsh_shift_tab_save(), and xsh_slice_offset_save().


Enumeration Type Documentation

anonymous enum
Enumerator:
XSH_DEBUG_LEVEL_NONE 
XSH_DEBUG_LEVEL_LOW 
XSH_DEBUG_LEVEL_MEDIUM 
XSH_DEBUG_LEVEL_HIGH 

Definition at line 133 of file xsh_utils.h.


Function Documentation

cpl_frame* xsh_spectrum_resample2 ( cpl_frame *  frame_inp,
const double  wstep,
const double  wmin,
const double  wmax,
xsh_instrument instr 
)

Generated on 9 Mar 2011 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1