X-shooter Pipeline Reference Manual 3.8.15
Data Structures | Enumerations | Functions
xsh_utils_efficiency.h File Reference
#include <cpl.h>

Go to the source code of this file.

Data Structures

struct  xsh_rv_ref_wave_param
 

Enumerations

enum  xsh_std_star_id {
  XSH_GD71 , XSH_Feige110 , XSH_GD153 , XSH_LTT3218 ,
  XSH_LTT7987 , XSH_BD17 , XSH_EG274
}
 

Functions

double xsh_get_std_star_vel (xsh_std_star_id std_star_id, XSH_ARM arm)
 
void xsh_load_ref_table (cpl_frameset *frames, double dRA, double dDEC, double EPSILON, xsh_instrument *instrument, cpl_table **pptable)
 load reference table
 
cpl_frame * xsh_utils_efficiency (cpl_frameset *frames, double dGain, double dEpsilon, double aimprim, xsh_instrument *inst, const char *col_name_atm_wave, const char *col_name_atm_abs, const char *col_name_ref_wave, const char *col_name_ref_flux, const char *col_name_ref_bin, const char *col_name_obj_wave, const char *col_name_obj_flux)
 Compute efficiency.
 
cpl_table * xsh_utils_efficiency_internal (cpl_table *tbl_obj_spectrum, cpl_table *tbl_atmext, cpl_table *tbl_ref, double exptime, double airmass, double aimprim, double gain, int biny, double src2ref_wave_sampling, const char *col_name_atm_wave, const char *col_name_atm_abs, const char *col_name_ref_wave, const char *col_name_ref_flux, const char *col_name_ref_bin, const char *col_name_obj_wave, const char *col_name_obj_flux, int *ntot, int *nclip)
 Compute efficiency.
 
cpl_frame * xsh_efficiency_compute (cpl_frame *frm_sci, cpl_frame *frm_cat, cpl_frame *frm_atmext, cpl_frame *high_abs_win, xsh_instrument *instrument)
 computes efficiency
 
cpl_frame * xsh_catalog_extract_spectrum_frame (cpl_frame *frm_cat, cpl_frame *frm_sci)
 extract spectrum
 
cpl_error_code xsh_parse_catalog_std_stars (cpl_frame *cat, double dRA, double dDEC, double EPSILON, cpl_table **pptable, xsh_std_star_id *std_star_id)
 parse referece std stars catalog
 
cpl_error_code xsh_rv_ref_wave_init (xsh_std_star_id std_star_id, XSH_ARM arm, xsh_rv_ref_wave_param *rv_ref_wave)
 
void xsh_frame_sci_get_ra_dec_airmass (cpl_frame *frm_sci, double *ra, double *dec, double *airmass)
 get RA, DEC, airmass (mean) of a frame
 
double xsh_utils_compute_airm (cpl_frameset *raws)
 
double xsh_utils_compute_airm_eff (cpl_frameset *raws)
 
xsh_rv_ref_wave_paramxsh_rv_ref_wave_param_create (void)
 
void xsh_rv_ref_wave_param_destroy (xsh_rv_ref_wave_param *rv_ref_wave)
 

Enumeration Type Documentation

◆ xsh_std_star_id

Enumerator
XSH_GD71 
XSH_Feige110 
XSH_GD153 
XSH_LTT3218 
XSH_LTT7987 
XSH_BD17 
XSH_EG274 

Definition at line 31 of file xsh_utils_efficiency.h.

Function Documentation

◆ xsh_catalog_extract_spectrum_frame()

cpl_frame * xsh_catalog_extract_spectrum_frame ( cpl_frame *  frm_cat,
cpl_frame *  frm_sci 
)

◆ xsh_efficiency_compute()

cpl_frame * xsh_efficiency_compute ( cpl_frame *  frm_sci,
cpl_frame *  frm_cat,
cpl_frame *  frm_atmext,
cpl_frame *  high_abs_win,
xsh_instrument instrument 
)

◆ xsh_frame_sci_get_ra_dec_airmass()

void xsh_frame_sci_get_ra_dec_airmass ( cpl_frame *  frm_sci,
double *  ra,
double *  dec,
double *  airmass 
)

get RA, DEC, airmass (mean) of a frame

Parameters
frm_sciinput frame
raright ascension
decdeclination
airmassairmass (mean)
Returns
void

Definition at line 772 of file xsh_utils_efficiency.c.

References check, xsh_free_propertylist(), xsh_pfits_get_airm_mean(), xsh_pfits_get_dec(), and xsh_pfits_get_ra().

Referenced by xsh_catalog_extract_spectrum_frame(), xsh_compute_response(), xsh_compute_response2(), xsh_compute_response_ord(), xsh_efficiency_compute(), and xsh_obs_std_correct().

◆ xsh_get_std_star_vel()

double xsh_get_std_star_vel ( xsh_std_star_id  std_star_id,
XSH_ARM  arm 
)

◆ xsh_load_ref_table()

void xsh_load_ref_table ( cpl_frameset *  frames,
double  dRA,
double  dDEC,
double  EPSILON,
xsh_instrument instrument,
cpl_table **  pptable 
)

load reference table

Parameters
framesinput frames list
dRARight Ascension
dDECDeclination
EPSILONtolerance to find ref spectra on catalog on (ra,dec)
instrumentxsh instrument
pptablepointer to new table
Returns
Interpolated data points

Definition at line 107 of file xsh_utils_efficiency.c.

References check, instrument, star_index_get(), star_index_load(), xsh_find_frame_with_tag(), XSH_FLUX_STD_CAT, XSH_FLUX_STD_TAB, and xsh_msg.

Referenced by xsh_utils_efficiency().

◆ xsh_parse_catalog_std_stars()

cpl_error_code xsh_parse_catalog_std_stars ( cpl_frame *  cat,
double  dRA,
double  dDEC,
double  EPSILON,
cpl_table **  pptable,
xsh_std_star_id std_star_id 
)

parse referece std stars catalog

Parameters
catinput frame catalog
dRARight Ascension
dDECDeclination
EPSILONtolerance to find ref spectra on catalog on (ra,dec)
pptablepointer to new table
Returns
cpl error code. The table will contain interpolated data points

Definition at line 243 of file xsh_utils_efficiency.c.

References check, star_index_delete(), star_index_get(), star_index_load(), XSH_ASSURE_NOT_NULL_MSG, XSH_BD17, XSH_EG274, XSH_Feige110, XSH_GD153, XSH_GD71, XSH_LTT3218, XSH_LTT7987, and xsh_msg.

Referenced by xsh_catalog_extract_spectrum_frame(), xsh_compute_response(), xsh_compute_response2(), xsh_compute_response_ord(), and xsh_efficiency_compute().

◆ xsh_rv_ref_wave_init()

cpl_error_code xsh_rv_ref_wave_init ( xsh_std_star_id  std_star_id,
XSH_ARM  arm,
xsh_rv_ref_wave_param rv_ref_wave 
)

◆ xsh_rv_ref_wave_param_create()

xsh_rv_ref_wave_param * xsh_rv_ref_wave_param_create ( void  )

◆ xsh_rv_ref_wave_param_destroy()

void xsh_rv_ref_wave_param_destroy ( xsh_rv_ref_wave_param rv_ref_wave)

Definition at line 223 of file xsh_utils_efficiency.c.

Referenced by xsh_compute_response2().

◆ xsh_utils_compute_airm()

double xsh_utils_compute_airm ( cpl_frameset *  raws)

◆ xsh_utils_compute_airm_eff()

double xsh_utils_compute_airm_eff ( cpl_frameset *  raws)

◆ xsh_utils_efficiency()

cpl_frame * xsh_utils_efficiency ( cpl_frameset *  frames,
double  dGain,
double  dEpsilon,
double  aimprim,
xsh_instrument inst,
const char *  col_name_atm_wave,
const char *  col_name_atm_abs,
const char *  col_name_ref_wave,
const char *  col_name_ref_flux,
const char *  col_name_ref_bin,
const char *  col_name_obj_wave,
const char *  col_name_obj_flux 
)

Compute efficiency.

Parameters
framesinput frameset
dGaindetector's gain value
dEpsilontolerance to find ref spectra on catalog on (ra,dec)
aimprimairmass
instinstrument (arm) setting
col_name_atm_waveatmospheric extinction table wave column name
col_name_atm_absatmospheric extinction table absorption column name
col_name_ref_wavereference flux std table wave column name
col_name_ref_fluxreference flux std table flux column name
col_name_ref_binreference flux std table sampling bin value
col_name_obj_waveobserved std table wave column name
col_name_obj_fluxobserved std table flux column name
Returns
frame with computed efficiency

Definition at line 376 of file xsh_utils_efficiency.c.

References check, exptime, FRM_EXTCOEFF_TAB, xsh_efficiency_add_high_abs_regions(), xsh_find_frame_with_tag(), xsh_frame_product(), xsh_free_propertylist(), xsh_free_table(), xsh_get_std_obs_values(), xsh_instrument_arm_tostring(), xsh_load_ref_table(), XSH_STD_FLUX_SLIT_STARE_ORDER1D, and xsh_utils_efficiency_internal().

◆ xsh_utils_efficiency_internal()

cpl_table * xsh_utils_efficiency_internal ( cpl_table *  tbl_obj_spectrum,
cpl_table *  tbl_atmext,
cpl_table *  tbl_ref,
double  exptime,
double  airmass,
double  aimprim,
double  gain,
int  biny,
double  src2ref_wave_sampling,
const char *  col_name_atm_wave,
const char *  col_name_atm_abs,
const char *  col_name_ref_wave,
const char *  col_name_ref_flux,
const char *  col_name_ref_bin,
const char *  col_name_obj_wave,
const char *  col_name_obj_flux,
int *  ntot,
int *  nclip 
)

Compute efficiency.

Parameters
tbl_obj_spectruminput object spectrum
tbl_atmextinput atmospheric extinction table
tbl_refinput reference flux STD table
exptimeinput exposure time
airmassinput observed frame airmass
aimpriminput airmass corrective factor
gaininput gain
binybin on Y (spatial) direction
src2ref_wave_samplinginput cnversion factor to pass from src 2 ref units
col_name_atm_waveatmospheric extinction table wave column name
col_name_atm_absatmospheric extinction table absorption column name
col_name_ref_wavereference flux std table wave column name
col_name_ref_fluxreference flux std table flux column name
col_name_ref_binreference flux std table bin value
col_name_obj_waveobserved std table wave column name
col_name_obj_fluxobserved std table flux column name
Returns
table with computed efficiency

Definition at line 515 of file xsh_utils_efficiency.c.

References biny, check, COL_NAME_COR, COL_NAME_EPHOT, COL_NAME_EXT, COL_NAME_ORD_OBJ, COL_NAME_REF, COL_NAME_SRC_COR, COL_NAME_SRC_EFF, exptime, kappa, TEL_AREA, xsh_column_to_double(), xsh_create_column_double(), xsh_free_table(), xsh_msg_dbg_medium, and xsh_table_interpolate().

Referenced by xsh_efficiency_compute(), and xsh_utils_efficiency().