py21cmfast.wrapper.compute_tau¶
- py21cmfast.wrapper.compute_tau(*, redshifts, global_xHI, user_params=None, cosmo_params=None)[source]¶
Compute the optical depth to reionization under the given model.
- Parameters:
redshifts (array-like) – Redshifts defining an evolution of the neutral fraction.
global_xHI (array-like) – The mean neutral fraction at redshifts.
user_params (
UserParams
) – Parameters defining the simulation run.cosmo_params (
CosmoParams
) – Cosmological parameters.
- Returns:
tau (float) – The optional depth to reionization
- Raises:
ValueError : – If redshifts and global_xHI have inconsistent length or if redshifts are not in ascending order.