antaress.ANTARESS_analysis.ANTARESS_inst_resp module#

flag_err_inst(inst)[source]#

Spectrograph error flag

Returns boolean tracing whether error tables are provided with an instrumental dataset.

Parameters:

inst (str) – ANTARESS name for the considered instrument configuration

Returns:

err_flag (bool) – True if errors are provided

return_Gba(inst, bjd)[source]#

Throughput ratio fiber B/A

Returns throughput between fiber A and B, and date of measurements of each spectrograph.

Parameters:

inst (str) – ANTARESS name for the considered instrument configuration.

Returns:
  • GBA (array) – throughput between fiber A and B

  • dates (array) – dates of throughput measurements

return_spec_root(inst)[source]#

Spectrograph root name

Returns generic name of an instrument for a given configuration.

Parameters:

inst (str) – ANTARESS name for the considered instrument configuration

Returns:

spec_root (str) – generic instrument name

return_spec_tell(inst)[source]#

Spectrograph telluric name

Returns the name of an instrument associated with its telluric files.

Parameters:

inst (str) – ANTARESS name for the considered instrument configuration

Returns:

spec_root (str) – telluric instrument name

return_spec_nord(inst)[source]#

Number of orders

Returns number of spectral orders in spectrographs.

Parameters:

TBD

Returns:

TBD

return_SNR_orders(inst)[source]#

Orders for S/N ratio

Returns typical spectrograph order used for S/N measurements.

Parameters:

TBD

Returns:

TBD

return_cen_wav_ord(inst)[source]#

Orders central wavelength

Returns central wavelength of each spectrograph order.

Parameters:

inst (str) – ANTARESS name for the considered instrument configuration.

Returns:

cen_wav_ord (float, array) – central wavelength of each spectrograph order (in A)

return_edge_wav_ord(inst)[source]#

Orders edge wavelengths

Returns edge wavelengths of each spectrograph order.

Parameters:

inst (str) – ANTARESS name for the considered instrument configuration.

Returns:

edge_wav_ord (float, array 2 x n_orders) – edge wavelengths of each spectrograph order (in A)

return_pix_size(inst)[source]#

Spectrograph sampling

Returns width of detector pixel in rv space (km/s).

\[\Delta \lambda = \lambda_\mathrm{ref} \Delta v/c\]
Parameters:

TBD

Returns:

TBD

resamp_st_prof_tab(inst, fixed_args, rv_osamp_line_mod, w_osamp_spec_mod, conv_model, data_format, edge_bins, dim_exp, cond_def, fiber)[source]#

Resampled spectral profile table

Defines resampled spectral grid for analytical line profile calculations. Theoretical profiles are directly calculated at the requested resolution, measured profiles are extracted at their native resolution.

Parameters:
  • inst (str) – Instrument considered.

  • fixed_args (dict) – Parameters of the profiles considered.

  • rv_osamp_line_mode (float or None) – RV-space oversampling factor.

  • w_osamp_spec_mod (float or None) – wavelength-space oversampling factor.

  • conv_model (bool) – True if model is convolved

  • data_format (str) – data format

  • edge_bins (float, arr) – edge wavelengths of input observed profile

  • dim_exp (float, arr) – (number of orders, number of spectral points) in input observed profile

Returns:

TBD

def_st_prof_tab(inst, vis, isub_exp, isub_ord, fixed_args, resamp, data_struct)[source]#

Spectral profile table attribution

Attributes original or resampled spectral grid for line profile calculations.

Parameters:

TBD

Returns:

TBD

return_resolv(inst, fiber)[source]#

Spectral resolving power

Returns the mean resolving power of a given spectrograph.

Parameters:
  • inst (str) – Instrument / spectrograph considered.

  • fiber (str) – fiber considered (A or B)

Returns:

inst_res (float) – Resolving power of the spectrograph.

calc_FWHM_inst(inst, w_c, fiber)[source]#

Spectral resolution

Returns FWHM of a Gaussian approximating the LSF for a given resolving power (associated with a spectrograph on a given fiber), in rv or wavelength space

\[\begin{split}\Delta v &= c / R \\ \Delta \lambda &= \lambda_\mathrm{ref}/R = \lambda_\mathrm{ref} \Delta v/c\end{split}\]
Parameters:

TBD

Returns:

TBD

get_FWHM_inst(inst, fixed_args, cen_bins, star_model, fiber)[source]#

Effective spectral resolution

Returns FWHM relevant to convolve the processed data

  • in rv space for analytical line profiles

  • in wavelength space for theoretical profiles and analytical spectral profiles

  • disabled if measured profiles as used as proxy for intrinsic profiles

Parameters:

TBD

Returns:

TBD

open_resolution_map(instrument, time_science, ins_mod, bin_x, fiber)[source]#

Retrieve static resolution map.

The map depends on the instrumental mode of the science frame and on the epoch where it was acquired ==> technical intervention

Adapted from the ATC code (author: R. Allart)

Parameters:

TBD

Returns:

resolution_map (2D array) – Resolution map per order and pixel.

convol_prof(prof_in, cen_bins, FWHM)[source]#

Instrumental convolution

Convolves input profile with spectrograph LSF. Profile must be defined on a uniform spectral grid.

Parameters:
  • prof_in (array, float) – original spectral profile.

  • cen_bins (array, float) – wavelength grid over which prof_in is defined.

  • FWHM (float) – width of the Gaussian LSF used to convolve prof_in.

Returns:

prof_conv (array, float) – convolved spectral profile.

cond_conv_st_prof_tab(rv_osamp_line_mod, w_osamp_spec_mod, fixed_args, data_format, elem_prof)[source]#

Spectral conversion and resampling

Enables/disables operations.

Parameters:

TBD

Returns:

TBD

conv_st_prof_tab(inst, vis, isub_exp, isub_ord, fixed_args, cen_bins_mod, edge_bins_mod, line_mod_in, spec2rv, resamp, fiber)[source]#

Spectral convolution, conversion, and resampling

Applies operations.

Parameters:

fixed_args (dict) – fixed arguments that are not modified within this routine.

Returns:

TBD

var_convol_tell_sp_slow(telluric_spectrum, nbins, nbins_mod, cen_bins, cen_bins_mod, resolution_map_ord, dwav_mod, nedge_mod)[source]#

Convolution of telluric spectrum (slow approach).

Adapted from the ATC code (author: R. Allart)

Parameters:

TBD

Returns:

telluric_spectrum_conv (1D array) – Convolved telluric spectrum.

var_convol_tell_sp(telluric_spectrum, edge_bins_ord, edge_bins_mod, resolution_map_ord, nbins_mod, cen_bins_mod)[source]#

Convolution of telluric spectrum (fast approach).

Adapted from a code by E. Artigau

Parameters:

TBD

Returns:

telluric_spectrum_conv (1D array) – Convolved telluric spectrum.