<jupyter_start><jupyter_text>Example usage of surfinBH7dq2 fit.<jupyter_code>import surfinBH
fit_name = 'surfinBH7dq2'<jupyter_output><empty_output><jupyter_text>Load the fit, this only needs to be done once at the start of a script<jupyter_code>fit = surfinBH.LoadFits(fit_name)<jupyter_output>Loaded surfinBH7dq2 fit.<jupyter_text>Read the documentation<jupyter_code>help(fit)<jupyter_output>Help on Fit7dq2 in module surfinBH._fit_evaluators.fit_7dq2 object:

class Fit7dq2(surfinBH.surfinBH.SurFinBH)
 |  A class for the surfinBH7dq2 model presented in Varma et al.,
 |  arxiv:1809.09125. This model predicts the final mass mf, final spin vector
 |  chif and final kick velocity vector vf, for the remnants of precessing
 |  binary black hole systems.  The fits are done using Gaussian Process
 |  Regression (GPR) and also provide an error estimate along with the fit
 |  value.
 |  
 |  This model has been trained in the parameter space:
 |      q <= 2, |chiA| <= 0.8, |chiB| <= 0.8
 |  
 |  However, it extrapolates reasonably to:
 |      q <= 4, |chiA| <= 1, |chiB| <= 1
 |  
 |  =========================================================================
 |  Usage:
 |  
 |  import surfinBH
 |  
 |  # Load the fit
 |  fit = surfinBH.LoadFits('surfinBH7dq2')
 |  
 |  We provide the following call methods:
 |      # remnant mass and 1-sigma error estimate
 |      mf, mf_err = fit.mf(q[...]<jupyter_text>Evaluate the fits (using spins at t=-100 M)<jupyter_code># Note: The component spins, remnant spin and kick are all
# assumed to be in the coorbital frame at t=-100M.

# Mass ratio and component spins
q = 1.2
chiA = [0.5, 0.05, 0.3]
chiB = [-0.5, -0.05, 0.1]

# remnant mass and 1-sigma error estimate
mf, mf_err = fit.mf(q, chiA, chiB)

# remnant spin and 1-sigma error estimate
chif, chif_err = fit.chif(q, chiA, chiB)

# remnant recoil kick and 1-sigma error estimate
vf, vf_err = fit.vf(q, chiA, chiB)

# All of these together
mf, chif, vf, mf_err, chif_err, vf_err = fit.all(q, chiA, chiB)<jupyter_output><empty_output><jupyter_text>Evaluate the fits using spins at earlier frequencies<jupyter_code># Note: The component spins, remnant spin and kick are all
# assumed to be in the inertial frame defined at orbital frequency=omega0.

# Initial dimensionless orbital frequency (in units of rad/M)
omega0 = 7e-3
  
# remnant mass and 1-sigma error estimate
mf, mf_err = fit.mf(q, chiA, chiB, omega0=omega0)
 
# remnant spin and 1-sigma error estimate
chif, chif_err = fit.chif(q, chiA, chiB, omega0=omega0)
 
# remnant recoil kick and 1-sigma error estimate
vf, vf_err = fit.vf(q, chiA, chiB, omega0=omega0)
 
# All of these together
mf, chif, vf, mf_err, chif_err, vf_err = fit.all(q, chiA, chiB, omega0=omega0)<jupyter_output>Loaded NRSur7dq2 waveform model
{'fraction_non_alphanumeric': 0.12324324324324325, 'fraction_numerical': 0.02738738738738739, 'mean_word_length': 4.338461538461538, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '302610', 'license': 'MIT', 'n_tokens_mistral': 1086, 'n_tokens_neox': 986, 'n_words': 323, 'path': 'examples/example_7dq2.ipynb', 'repo_name': 'LBJ-Wade/surfinBH', 'size': '2775'}