pychell API reference¶
Computing RVs¶
-
pychell.rvs.rvcalc.cc_wrapper(forward_model, n_spec_tot, iter_num)¶ Cross correlation wrapper for a single spectrum.
Parameters: - forward_model (ForwardModel) – A single forward model object.
- n_spec_tot (int) – The total number of spectra.
- iter_num (int) – The iteration to use.
-
pychell.rvs.rvcalc.compute_bisector_span(cc_vels, ccf, n_bs=1000)¶ Computes the bisector span of a given cross-correlation (RMS brute force) function.
Parameters: - cc_vels (np.ndarray) – The velocities used for cross-correlation.
- ccf (int) – The corresponding 1-dimensional RMS curve.
- n_bs (int) – The number of depths to use in calculating the BIS, defaults to 1000
Returns: The line bisectors of the ccf. bisector_span (float): The bisecor span of the line bisector (commonly referred to as the BIS).
Return type: line_bisectors (np.ndarray)
-
pychell.rvs.rvcalc.cross_correlate_all(forward_models, iter_num)¶ Cross correlation wrapper for all spectra.
Parameters: - forward_models (ForwardModels) – The list of forward model objects.
- iter_num (int) – The iteration to use.
-
pychell.rvs.rvcalc.cross_correlate_star(forward_model, iter_num)¶ Performs a cross-correlation via brute force RMS minimization and estimating the minumum with a quadratic.
Parameters: - forward_model (ForwardModel) – A single forward model object.
- iter_num (int) – The iteration to use.
Returns: The forward model object with cross-correlation results stored in place.
Return type: forward_model (ForwardModel)
-
pychell.rvs.rvcalc.generate_rvs(forward_models, iter_num)¶ Genreates individual and nightly (co-added) RVs after forward modeling all spectra and stores them in the ForwardModels object. If do_xcorr is True, nightly cross-correlation RVs are also computed along with the line bisector and BIS.
Parameters: - forward_models (ForwardModels) – The list of forward model objects.
- iter_num (int) – The iteration to generate RVs from.
-
pychell.rvs.rvcalc.get_nightly_jds(jds, sep=0.5)¶ Computes nightly (average) JDs (or BJDs) for a time-series observation over several nights.
Parameters: - jds (np.ndarray) – An array of sorted JDs (or BJDs).
- sep (float) – The minimum separation in days between two different nights of data, defaults to 0.5.
-
pychell.rvs.rvcalc.plot_rvs(forward_models, iter_num)¶ Plots all RVs and cross-correlation analysis after forward modeling all spectra.
Parameters: - forward_models (ForwardModels) – The list of forward model objects.
- iter_num (int) – The iteration to use.