X-shooter Pipeline Reference Manual 3.8.15
xsh_utils_efficiency.h
Go to the documentation of this file.
1/*
2 * This file is part of the ESO SINFONI Pipeline
3 * Copyright (C) 2004-2009 European Southern Observatory
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18 */
19/*
20 * $Author: amodigli $
21 * $Date: 2013-02-08 16:48:12 $
22 * $Revision: 1.17 $
23 *
24 */
25
26#ifndef XSH_UTILS_EFFICIENCY_H
27#define XSH_UTILS_EFFICIENCY_H
28#include <cpl.h>
29
30
31typedef enum {
40
41typedef struct {
42 double wguess ; /* Reference line wavelength position */
43 double range_wmin; /* minimum of wavelength box for line fit */
44 double range_wmax; /* maximum of wavelength box for line fit */
45 double ipol_wmin_max; /* maximum lower sub-range wavelength value used to fit line slope */
46 double ipol_wmax_min; /* minimum upper sub-range wavelength value used to fit line slope */
47 double ipol_hbox; /* half box where polynomial fit is performed */
48
50
51
53
54
55void
56xsh_load_ref_table(cpl_frameset* frames,
57 double dRA,
58 double dDEC,
59 double EPSILON,
61 cpl_table** pptable);
62
63
64
65cpl_frame*
67 cpl_frameset * frames,
68 double dGain,
69 double dEpsilon,
70 double aimprim,
71 xsh_instrument* inst,
72 const char* col_name_atm_wave,
73 const char* col_name_atm_abs,
74 const char* col_name_ref_wave,
75 const char* col_name_ref_flux,
76 const char* col_name_ref_bin,
77 const char* col_name_obj_wave,
78 const char* col_name_obj_flux
79 );
80
81cpl_table*
83 cpl_table* tbl_obj_spectrum,
84 cpl_table* tbl_atmext,
85 cpl_table* tbl_ref,
86 double exptime,
87 double airmass,
88 double aimprim,
89 double gain,
90 int biny,
91 double src2ref_wave_sampling,
92 const char* col_name_atm_wave,
93 const char* col_name_atm_abs,
94 const char* col_name_ref_wave,
95 const char* col_name_ref_flux,
96 const char* col_name_ref_bin,
97 const char* col_name_obj_wave,
98 const char* col_name_obj_flux,
99 int* ntot, int* nclip
100 );
101
102
103
104cpl_frame*
105xsh_efficiency_compute(cpl_frame* frm_sci,
106 cpl_frame* frm_cat,
107 cpl_frame* frm_atmext,
108 cpl_frame* high_abs_win,
110
111cpl_frame*
112xsh_catalog_extract_spectrum_frame(cpl_frame* frm_cat,
113 cpl_frame* frm_sci);
114
115
116cpl_error_code
117xsh_parse_catalog_std_stars(cpl_frame* cat,
118 double dRA,
119 double dDEC,
120 double EPSILON,
121 cpl_table** pptable,
122 xsh_std_star_id* std_star_id);
123
124cpl_error_code
126
127void
128xsh_frame_sci_get_ra_dec_airmass(cpl_frame* frm_sci,double* ra, double* dec, double* airmass);
129
130double
131xsh_utils_compute_airm(cpl_frameset* raws);
132double
133xsh_utils_compute_airm_eff(cpl_frameset* raws);
134
137#endif
static double exptime
static xsh_instrument * instrument
int biny
double xsh_utils_compute_airm(cpl_frameset *raws)
void xsh_load_ref_table(cpl_frameset *frames, double dRA, double dDEC, double EPSILON, xsh_instrument *instrument, cpl_table **pptable)
load reference table
double xsh_utils_compute_airm_eff(cpl_frameset *raws)
double xsh_get_std_star_vel(xsh_std_star_id std_star_id, XSH_ARM arm)
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.
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
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_std_star_id
@ XSH_LTT3218
@ XSH_GD71
@ XSH_LTT7987
@ XSH_Feige110
@ XSH_BD17
@ XSH_EG274
@ XSH_GD153
void xsh_rv_ref_wave_param_destroy(xsh_rv_ref_wave_param *rv_ref_wave)
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
xsh_rv_ref_wave_param * xsh_rv_ref_wave_param_create(void)
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