sb2sep

Separate Stellar Component Spectra and Calculate Radial Velocities in SB2 Binary Systems

View the Project on GitHub jsinkbaek/sb2sep

Preparing spectra

Before feeding spectra to the spectral separation routine, they must be appropriately prepared for analysis. The module spectrum_processing_functions is convenient to use for this purpose. Key functions relevant will be covered below.

Spectrum normalization

The function simple_normalizer() does a decent job at normalizing a spectrum and reducing emission lines, at least for the purpose at hand. It uses a 3 pass process with a moving median filter and 2 successive polynomial fits.

Input:

Returns:

Alternatively, the more extensive function resample_and_normalize_all_spectra() can be used. It first resamples all the observed spectra. Then, it makes a mean spectrum (ignoring RVs) to get a first-order measurement of the average continuum. It can do this with a much more accurate filter, which is in turn (normally) super sensitive to emission lines (IF YOUR STAR HAS FIXED EMISSION LINES THAT ARE WIDE RELATIVE TO THE RV VARIATIONS, THIS WILL NOT WORK AS INTENDED). The mean continuum is then used in order to reduce the dimensionality of the individual observation continua.

Input:

Returns:

Loading template spectra

If using template spectra from Coelho et al. 2005, the function load_template_spectrum() can be used to load from file.

Input:

Returns:

Resampling spectra

The templates and observed spectra must all be resampled to the same wavelength grid, equi-spaced in velocity space. Multiple functions exist for this, but a convenient wrapper performs this for all spectra simultanously. This is resample_multiple_spectra().

Input:

Returns:

Note: It is also allowed to have one or more of the supplied tuples contain multiple spectra, e.g. 2-dim arrays (wavelength_collection, flux_collection).

Limit wavelength interval

The function limit_wavelength_interval_multiple_spectra() is convenient for removing unneeded data. The spectra must have previously been resampled to the same wavelength grid.

Input:

If buffer_size=None, returns:

Else, returns:

Barycentric corrections

barycorrpy is recommended to calculate barycentric corrections. If it is so desired, the spectra can be corrected for them before RV calculation by using the shift_spectrum() function from the spectral_separation_routine module.

Input:

Returns:

Estimate RV of one or two components

To perform an initial RV calculation before the routine (to have initial guesses), the function radial_velocities_of_multiple_spectra() from the module calculate_radial_velocities can be used.

Input:

Returns (1 component):

Returns (2 components):

Next Page: Evaluating output