primpy.efolds package
Calculations for the primordial Universe w.r.t. e-folds N.
primpy.efolds.inflation module
Differential equations for inflation w.r.t. e-folds N.
- class primpy.efolds.inflation.InflationEquationsN(K, potential, track_time=False, track_eta=False, verbose=False)[source]
Bases:
InflationEquationsBackground equations during inflation w.r.t. e-folds N.
Solves background variables with e-folds N of the scale factor as independent variable for curved and flat universes using the Klein-Gordon and Friedmann equations.
- Independent variable:
_N: e-folds of the scale-factor (the underscore here means that this is the as of yet uncalibrated scale factor)- Dependent variables:
phi: inflaton fielddphidN: d(phi)/dNt: time (optional)eta: conformal time (optional)
Methods
H2(x, y)Hubble parameter squared.
__call__(x, y)System of coupled ODEs for underlying variables.
get_H2(N, dphi, V, K)Get the Hubble parameter squared from the background equations.
get_d2H(N, H, dH, dphi, d2phi, K)Get the 2nd time derivative of the Hubble parameter from the background equations.
get_d2phi(H2, dH_H, dphi, dV)Get the 2nd time derivative of the inflaton field from the background equations.
get_d3H(N, H, dH, d2H, dphi, d2phi, d3phi, K)Get the 3rd time derivative of the Hubble parameter from the background equations.
get_d3phi(H, dH, d2H, dphi, d2phi, dV, d2V)Get the 3rd time derivative of the inflaton field from the background equations.
get_d4phi(H, dH, d2H, d3H, dphi, d2phi, ...)Get the 4th time derivative of the inflaton field from the background equations.
get_dH(N, H, dphi, K)Get the 1st time derivative of the Hubble parameter from the background equations.
inflating(x, y)Inflation diagnostic for event tracking.
sol(sol, **kwargs)Post-processing of
scipy.integrate.solve_ivp()solution.w(x, y)Equation of state parameter.
get_dH_H
- static get_H2(N, dphi, V, K)[source]
Get the Hubble parameter squared from the background equations.
- Returns:
- H2float or array_like
- static get_dH(N, H, dphi, K)[source]
Get the 1st time derivative of the Hubble parameter from the background equations.
- Returns:
- dHfloat or array_like
- static get_d2H(N, H, dH, dphi, d2phi, K)[source]
Get the 2nd time derivative of the Hubble parameter from the background equations.
- Returns:
- d2Hfloat or array_like
- static get_d3H(N, H, dH, d2H, dphi, d2phi, d3phi, K)[source]
Get the 3rd time derivative of the Hubble parameter from the background equations.
- Returns:
- d3Hfloat or array_like
- static get_d2phi(H2, dH_H, dphi, dV)[source]
Get the 2nd time derivative of the inflaton field from the background equations.
- Returns:
- d2phifloat or array_like
- static get_d3phi(H, dH, d2H, dphi, d2phi, dV, d2V)[source]
Get the 3rd time derivative of the inflaton field from the background equations.
- Returns:
- d3phifloat or array_like
- static get_d4phi(H, dH, d2H, d3H, dphi, d2phi, d3phi, dV, d2V, d3V)[source]
Get the 4th time derivative of the inflaton field from the background equations.
- Returns:
- d4phifloat or array_like
- sol(sol, **kwargs)[source]
Post-processing of
scipy.integrate.solve_ivp()solution.
primpy.efolds.perturbations module
Curvature perturbations with respect to e-folds _N.
- class primpy.efolds.perturbations.PerturbationN(background, k, **kwargs)[source]
Bases:
PerturbationCurvature perturbation for wavenumber k with respect to e-folds _N=ln(a).
Solves the Mukhanov–Sasaki equations w.r.t. number of e-folds _N of the scale factor a for curved universes.
- Parameters:
- backgroundBunch object same as returned by
scipy.integrate.solve_ivp() Background solution as returned by
primpy.efolds.inflation.InflationEquationsN.sol().- kfloat
wavenumber
- backgroundBunch object same as returned by
- class primpy.efolds.perturbations.ScalarModeN(background, k, **kwargs)[source]
Bases:
ScalarModeTemplate for scalar modes.
Methods
__call__(x, y)Vector of derivatives.
Get initial conditions for scalar modes for HD vacuum w.r.t.
Get initial conditions for scalar modes for RST vacuum w.r.t.
Get initial conditions for scalar modes for HD approximation w.r.t.
Frequency and damping term of the Mukhanov-Sasaki equations for scalar modes.
- mukhanov_sasaki_frequency_damping()[source]
Frequency and damping term of the Mukhanov-Sasaki equations for scalar modes.
Frequency and damping term of the Mukhanov-Sasaki equations for the comoving curvature perturbations R w.r.t. e-folds _N, where the e.o.m. is written as ddR + 2 * damping * dR + frequency**2 * R = 0.
- get_vacuum_ic_k()[source]
Get initial conditions for scalar modes for HD approximation w.r.t. e-folds _N.
- class primpy.efolds.perturbations.TensorModeN(background, k, **kwargs)[source]
Bases:
TensorModeTemplate for tensor modes.
Methods
__call__(x, y)Vector of derivatives.
Get initial conditions for tensor modes for HD vacuum w.r.t.
Get initial conditions for tensor modes for RST vacuum w.r.t.
Get initial conditions for tensor modes for HD approximation w.r.t.
Frequency and damping term of the Mukhanov-Sasaki equations for tensor modes.
- mukhanov_sasaki_frequency_damping()[source]
Frequency and damping term of the Mukhanov-Sasaki equations for tensor modes.
Frequency and damping term of the Mukhanov-Sasaki equations for the tensor perturbations h w.r.t. e-folds _N, where the e.o.m. is written as ddh + 2 * damping * dh + frequency**2 * h = 0.
- get_vacuum_ic_k()[source]
Get initial conditions for tensor modes for HD approximation w.r.t. e-folds _N.