Skip to content

Shooting

kabeleh edited this page Dec 26, 2025 · 8 revisions

To fill the energy budget constraints, a shooting method is applied that fills the energy budget with dark energy. All implemented dark energy potentials have an overall scaling factor $c_1$. To tell CLASS to use this factor for shooting, the input parameter scf_tuning_index = 0 is to be passed (which is also the default value, in case nothing is passed). $c_1$ is the varied by the shooting algorithm within CLASS. Therefore, it is not a free parameter that needs to be estimated through the MCMC. What is passed by the user as the value of $c_1$ is only used as the initial guess for this variable. In input.c, the shooting is implemented:

    case Omega_scf:
      xguess[index_guess] = ba.scf_parameters[ba.scf_tuning_index];
      dxdy[index_guess] = ba.scf_parameters[ba.scf_tuning_index] / ba.Omega0_scf;
      break;

Another slight change we added to the shooting algorithm was to enforce the closure of the universe, i.e. to make it flat by enforcing $\Omega_\text{tot}=1$, instead of respecting the user provided $\Omega_\phi$:

output[i] = ba.background_table[(ba.bt_size - 1) * ba.bg_size + ba.index_bg_rho_tot] / (ba.H0 * ba.H0) - 1;

This is implemented in the input_try_unknown_parameters function in input.c and takes the last entry in the background table, i.e. $z=0$, adds $\Omega_\text{tot}$ of all the components, subtracts $1$ to enforce closure/flatness, and returns the rest as the scalar field contribution output[i].

Clone this wiki locally