CR2RE Pipeline Reference Manual 1.6.2
Functions
Hdrl_efficiency

Functions

hdrl_parameter * hdrl_response_parameter_create (const hdrl_value Ap, const hdrl_value Am, const hdrl_value G, const hdrl_value Tex)
 ctor for the hdrl_parameter for response
 
hdrl_parameter * hdrl_efficiency_parameter_create (const hdrl_value Ap, const hdrl_value Am, const hdrl_value G, const hdrl_value Tex, const hdrl_value Atel)
 ctor for the hdrl_parameter for efficiency
 
hdrl_spectrum1D * hdrl_response_core_compute (const hdrl_spectrum1D *I_std_arg, const hdrl_spectrum1D *I_std_ref, const hdrl_spectrum1D *E_x, const hdrl_parameter *pars)
 core response calculation
 
hdrl_spectrum1D * hdrl_efficiency_compute (const hdrl_spectrum1D *I_std_arg, const hdrl_spectrum1D *I_std_ref, const hdrl_spectrum1D *E_x, const hdrl_parameter *pars)
 efficiency calculation
 
hdrl_value E_ph (hdrl_data_t lambda)
 energy of the photon calculation
 

Detailed Description

Function Documentation

◆ E_ph()

hdrl_value E_ph ( hdrl_data_t  lambda)

energy of the photon calculation

Parameters
lambdawavelength, in nm
Returns
energy of the photon for the given wavelength

Definition at line 364 of file hdrl_efficiency.c.

Referenced by hdrl_efficiency_compute().

◆ hdrl_efficiency_compute()

hdrl_spectrum1D * hdrl_efficiency_compute ( const hdrl_spectrum1D *  I_std_arg,
const hdrl_spectrum1D *  I_std_ref,
const hdrl_spectrum1D *  E_x,
const hdrl_parameter *  pars 
)

efficiency calculation

Parameters
I_std_argstd star observed spectrum, wavelength in [nm]
I_std_refstd start model spectrum, wavelength in [nm]
E_xatm. extinction model spectrum, wavelength in [nm]
parsparameters, see the constructor for hdrl_spectrum1D_efficiency_parameter_create
Returns
efficiency, NULL in case of error

This function implements the efficiency calculation. The formula used is:

        I_std(l) * 10^(0.4 * E_x(l) * (Am - Ap)) * G * E_phot(l)

Eff(l)= --------------------------------------------------------— Tex * Atel * I_std_ref(l)

Where I_std_ref and E_x spectra are resampled by this function to match the wavelengths where I_std is defined on. If E_x and I_std_ref already match the wavelengths of I_std resampling is not executed. E_phot is the energy of one photon. For the other parameters see hdrl_spectrum1D_efficiency_parameter_create(). If E_x or I_std_ref do not completely cover the wavelength interval where I_std is defined, I_std is truncated to avoid extrapolation of the models.

Possible cpl-error-code set in this function:

Definition at line 283 of file hdrl_efficiency.c.

References E_ph(), hdrl_parameter_delete(), hdrl_spectrum1D_create_analytic(), hdrl_spectrum1D_delete(), hdrl_spectrum1D_div_scalar(), hdrl_spectrum1D_div_spectrum(), hdrl_spectrum1D_duplicate(), hdrl_spectrum1D_exp_scalar(), hdrl_spectrum1D_get_wavelength(), hdrl_spectrum1D_mul_scalar(), hdrl_spectrum1D_mul_spectrum(), hdrl_spectrum1D_resample(), hdrl_spectrum1D_resample_interpolate_parameter_create(), and hdrl_spectrum1D_sub_spectrum().

◆ hdrl_efficiency_parameter_create()

hdrl_parameter * hdrl_efficiency_parameter_create ( const hdrl_value  Ap,
const hdrl_value  Am,
const hdrl_value  G,
const hdrl_value  Tex,
const hdrl_value  Atel 
)

ctor for the hdrl_parameter for efficiency

Parameters
ApParameter to indicate if the efficiency is computed at airmass = 0, or at a given non zero value
AmAirmass at which the std star was observed
GGain [e/ADU]
TexExposure time [s]
AtelCollecting area of the telescope [cm2]
Returns
hdrl_parameter

Definition at line 133 of file hdrl_efficiency.c.

◆ hdrl_response_core_compute()

hdrl_spectrum1D * hdrl_response_core_compute ( const hdrl_spectrum1D *  I_std_arg,
const hdrl_spectrum1D *  I_std_ref,
const hdrl_spectrum1D *  E_x,
const hdrl_parameter *  pars 
)

core response calculation

Parameters
I_std_argstd star observed spectrum, wavelength in [nm]
I_std_refstd start model spectrum, wavelength in [nm]
E_xatm. extinction model spectrum, wavelength in [nm]
parsparameters, see the constructor for hdrl_efficiency_parameter_create
Returns
response, NULL in case of error

This function implements the efficiency calculation. The formula used is:

              I_std_ref(l)* G * Tex * 10^(0.4 * (Ap-Am) * E_x(l))

Res(l)= --------------------------------------------------------— I_std(l)

Where I_std_ref and E_x spectra are resampled by this function to match the wavelengths where I_std is defined on. If E_x and I_std_ref already match the wavelengths of I_std resampling is not executed. If E_x or I_std_ref do not completely cover the wavelength interval where I_std is defined, I_std is truncated to avoid extrapolation of the models. For the other parameters see hdrl_response_parameter_create().

Possible cpl-error-code set in this function:

Definition at line 181 of file hdrl_efficiency.c.

References hdrl_parameter_delete(), hdrl_spectrum1D_delete(), hdrl_spectrum1D_div_spectrum(), hdrl_spectrum1D_duplicate(), hdrl_spectrum1D_exp_scalar(), hdrl_spectrum1D_get_wavelength(), hdrl_spectrum1D_mul_scalar(), hdrl_spectrum1D_mul_spectrum(), hdrl_spectrum1D_resample(), hdrl_spectrum1D_resample_interpolate_parameter_create(), and hdrl_spectrum1D_sub_spectrum().

Referenced by hdrl_response_compute().

◆ hdrl_response_parameter_create()

hdrl_parameter * hdrl_response_parameter_create ( const hdrl_value  Ap,
const hdrl_value  Am,
const hdrl_value  G,
const hdrl_value  Tex 
)

ctor for the hdrl_parameter for response

Parameters
ApParameter to indicate if the efficiency is computed at airmass = 0, or at a given non zero value
AmAirmass at which the std star was observed
GGain [ADU/e]
TexExposure time [s]
Returns
hdrl_parameter

Definition at line 103 of file hdrl_efficiency.c.