SBART.utils.shift_spectra#
Functions
|
|
|
|
|
We are subtracting the stellar RV for convenience. |
|
Interpolate the input data for a new wavelength solutionx |
|
|
|
|
|
Remove the contributions of the RV from the star and remove the BERV correction |
- apply_RVshift(wave, stellar_RV)#
- Parameters:
wave (np.ndarray) – [description]
stellar_RV (float) – [description]
BERV (float, optional) – [description], by default 0
- Returns:
[description]
- Return type:
np.ndarray
- remove_RVshift(wave, stellar_RV, BERV=0)#
- Parameters:
wave (np.ndarray) – [description]
stellar_RV (float) – [description]
BERV (float, optional) – [description], by default 0
- Returns:
[description]
- Return type:
np.ndarray
- apply_BERV_correction(wave, BERV)#
- remove_BERV_correction(wave, BERV)#
- shift_to_spectrograph_frame(wave, stellar_RV, BERV)#
Remove the contributions of the RV from the star and remove the BERV correction
- Parameters:
wave (np.ndarray) – [description]
stellar_RV (float) – [description]
BERV (float) – [description]
- Returns:
[description]
- Return type:
np.ndarray
- interpolate_data(original_lambda, original_spectrum, original_errors, new_lambda, lower_limit, upper_limit, propagate_interpol_errors, interpol_cores=4, indexes=None)#
Interpolate the input data for a new wavelength solutionx
- Parameters:
original_lambda (np.ndarray) – Input wavelengths
original_spectrum (np.ndarray) – Input data
original_errors (np.ndarray) – INput errors
new_lambda (np.ndarray) – Wavelenghts in which we are interpolating
lower_limit (np.float64) – above which new_lambda wavelength we can interpolate
upper_limit (np.float64) – Below which new_lambda wavelenght we can interpolate
propagate_interpol_errors (str) – Method of error propagation. Can be either “propagation” for the analytical propagation, “interpolation” to interpolate input errors or “none” to avoid all error propagation (i.e. return zeros)
interpol_cores (int, optional) – Number of cores used in the analitical error propagation, by default 4
indexes (np.ndarray, optional) – Previously computed indexes of wavelengths to interpolate, by default None
- Returns:
new_values (np.ndarray) – INterpolated values
new_errors (np.ndarray) – Interpolated errors
valid_indexes (np.ndarray) – Indexes, of new_lambda, in which we interpolated
- Raises:
Exception – [description]
- apply_wavelength_shift(wave, direction, stellar_RV, BERV)#
We are subtracting the stellar RV for convenience. Instead of working with the redshit we are working with blueshit to avoid adding minus everytime we call this function