Analytical Functions

This page gives an overview of the different analytical functions available in PyFPT.

Many of the calculations are based on calculating the central moments of the FPTs using methods of Vennin–Starobinsky 2015 in the low diffusion limit. The central moments not only give the mean, variance, skewness and kurtosis of the FPTs, but can also be used to add corrections to the Gaussian approximation for the probability density.

For diffusion dominated quadratic inflation, there are also analytical expectations for the probability density. Quadratic inflation is currently the only inflationary model included.

Drift of Slow-Roll Inflation

This module returns a function defining the drift in slow roll inflation. To be used in numerics module, the function depends both on phi and N.

analytics.slow_roll_drift.slow_roll_drift(potential, potential_dif, planck_mass=1)

Returns the slow-roll drift as a function.

Parameters
  • potential (function) – The potential of the slow-roll inflation simulated.

  • potential_dif (function) – The first derivative of the potential of the slow-roll inflation simulated.

  • planck_mass (scalar, optional) – The Planck mass used in the calculations. The standard procedure is to set it to 1. The default is 1.

Returns

drift_func – A function dependent on (phi, N) which returns the slow-roll drift.

Return type

function


Diffusion of Slow-Roll Inflation

This module returns a function defining the diffusion in slow roll inflation. To be used in numerics module, the function depends both on phi and N.

analytics.slow_roll_diffusion.slow_roll_diffusion(potential, potential_dif, planck_mass=1)

Returns the slow-roll diffusion as a function.

Parameters
  • potential (function) – The potential of the slow-roll inflation simulated.

  • potential_dif (function) – The first derivative of the potential of the slow-roll inflation simulated.

  • planck_mass (scalar, optional) – The Planck mass used in the calculations. The standard procedure is to set it to 1. The default is 1.

Returns

drift_func – A function dependent on (phi, N) which returns the slow-roll diffusion.

Return type

function


Classicality Criterion

This module uses the classicality criterion (equation 3.27) from Vennin–Starobinsky 2015 to see if the inflation model investigated will have dynamics which will deviate strongly from classical prediction. If the returned \({\eta}\) parameter is of order unity, stochastic effects dominate.

analytics.classicality_criterion.classicality_criterion(potential, potential_dif, potential_ddif, phi_in)

Returns eta for the provided potential.

Parameters
  • potential (function) – The potential.

  • potential_dif (function) – The potential’s first derivative.

  • potential_ddif (function) – The potential’s second derivative.

  • phi_in (float) – The initial field value.

Returns

eta – the \({\eta}\) parameter.

Return type

float


Mean Number of e-folds

This module calculates the mean number of e-folds in low diffusion limit using equation 3.28 from Vennin–Starobinsky 2015.

analytics.mean_efolds.mean_efolds(potential, potential_dif, potential_ddif, phi_in, phi_end)

Returns the mean number of e-folds.

Parameters
  • potential (function) – The potential.

  • potential_dif (function) – The potential’s first derivative.

  • potential_ddif (function) – The potential’s second derivative.

  • phi_in (float) – The initial scalar field value.

  • phi_end (float) – The end scalar field value.

Returns

mean_efolds – the mean number of e-folds.

Return type

float


Variance of the Number of e-folds

This module calculates the variance of the number of e-folds in low diffusion limit using equation 3.35 from Vennin–Starobinsky 2015.

analytics.variance_efolds.variance_efolds(potential, potential_dif, potential_ddif, phi_in, phi_end)

Returns the variance of the number of e-folds.

Parameters
  • potential (function) – The potential.

  • potential_dif (function) – The potential’s first derivative.

  • potential_ddif (function) – The potential’s second derivative.

  • phi_in (float) – The initial scalar field value.

  • phi_end (float) – The end scalar field value.

Returns

var_efolds – the variance of the number of e-folds.

Return type

float


Skewness of the Number of e-folds

This module calculates the skewness of the number of e-folds in low diffusion limit using equation 3.37 (from Vennin–Starobinsky 2015) for the third central moment and equation 3.33 for the variance.

analytics.skewness_efolds.skewness_efolds(potential, potential_dif, potential_ddif, phi_i, phi_end)

Returns the skewness of the number of e-folds.

Parameters
  • potential (function) – The potential.

  • potential_dif (function) – The potential’s first derivative.

  • potential_ddif (function) – The potential’s second derivative.

  • phi_i (float) – The initial scalar field value.

  • phi_end (float) – The end scalar field value.

Returns

skewness_efolds – the skewness of the number of e-folds.

Return type

float


Kurtosis of the Number of e-folds

This module calculates the skewness of the number of e-folds in low diffusion limit using equation 3.40 (from Vennin–Starobinsky 2015) for the fourth central moment and equation 3.33 for the variance.

analytics.kurtosis_efolds.kurtosis_efolds(potential, potential_dif, potential_ddif, phi_in, phi_end, Fisher=True)

Returns the kurtosis of the number of e-folds.

Parameters
  • potential (function) – The potential.

  • potential_dif (function) – The potential’s first derivative.

  • potential_ddif (function) – The potential’s second derivative.

  • phi_in (float) – The initial scalar field value

  • phi_end (float) – The end scalar field value.

  • Fisher (bool, optional) – If True, Fisher’s definition is used (normal ==> 0.0). If False, Pearson’s definition is used (normal ==> 3.0).

Returns

kurtosis_efolds – the kurtosis of the number of e-folds.

Return type

float


Third Central Moment of the Number of e-folds

This module calculates the third central moment of the number of e-folds in low diffusion limit using equation 3.37 from Vennin–Starobinsky 2015.

analytics.third_central_moment_efolds.third_central_moment_efolds(potential, potential_dif, potential_ddif, phi_in, phi_end)

Returns the third central moment of the number of e-folds.

Parameters
  • potential (function) – The potential.

  • potential_dif (function) – The potential’s first derivative.

  • potential_ddif (function) – The potential’s second derivative.

  • phi_in (float) – The initial scalar field value.

  • phi_end (float) – The end scalar field value.

Returns

third_moment_efolds – the third central moment of the number of e-folds.

Return type

float


Fourth Central Moment of the Number of e-folds

This module calculates the fourth central moment of the number of e-folds in low diffusion limit using equation 3.40 from Vennin–Starobinsky 2015.

analytics.fourth_central_moment_efolds.fourth_central_moment_efolds(potential, potential_dif, potential_ddif, phi_in, phi_end)

Returns the fourth central moment of the number of e-folds.

Parameters
  • potential (function) – The potential.

  • potential_dif (function) – The potential’s first derivative.

  • potential_ddif (function) – The potential’s second derivative.

  • phi_in (float) – The initial scalar field value.

  • phi_end (float) – The end scalar field value.

Returns

fourth_moment_efolds – the fourth central moment of the number of e-folds.

Return type

float


Reduced Potential

This module reduces the passed potential function to its dimensionless form given in equation 2.1 of Vennin–Starobinsky 2015.

analytics.reduced_potential.reduced_potential(potential)

Returns the reduced potential as a function

Parameters

potential (function) – The potential.

Returns

v – the reduced potential.

Return type

function


Reduced Potential Derivative

This module reduces the passed potential derivative function to its dimensionless form given in equation 2.1 of Vennin–Starobinsky 2015.

analytics.reduced_potential_diff.reduced_potential_diff(potential_diff)

Returns the reduced potential derivative as a function

Parameters

potential_diff (function) – The potential’s first derivative.

Returns

v_diff – the reduced potential derivative.

Return type

function


Reduced Potential Second Derivative

This module reduces the passed potential second derivative function to its dimensionless form given in equation 2.1 of Vennin–Starobinsky 2015.

analytics.reduced_potential_ddiff.reduced_potential_ddiff(potential_ddiff)

Returns the reduced potential second derivative as a function

Parameters

potential_ddif (function) – The potential’s second derivative.

Returns

v_ddif – the reduced potential second derivative.

Return type

function


Gaussian PDF

This module returns the Gaussian probability density function (PDF) for first-passage times in the low-diffusion limit, using the results from Vennin–Starobinsky 2015 to calculate the required moments, as a function.

analytics.gaussian_pdf.gaussian_pdf(potential, potential_dif, potential_ddif, phi_in, phi_end)

Returns the Gaussian approximation in the low-diffusion limit.

Parameters
  • potential (function) – The potential.

  • potential_dif (function) – The potential’s first derivative.

  • potential_ddif (function) – The potential’s second derivative/

  • phi_in (float) – The initial field value.

  • phi_end (float) – The end scalar field value.

Returns

gaussian_function – The Gaussian approximation.

Return type

function


Edgeworth PDF

This module returns the Edgeworth series probability density function (PDF) for first-passage times in the low-diffusion limit, using the results from Vennin–Starobinsky 2015 to calculate the required moments, as a function.

analytics.edgeworth_pdf.edgeworth_pdf(potential, potential_dif, potential_ddif, phi_in, phi_end)

Returns the Edgeworth expansion in the low-diffusion limit.

Parameters
  • potential (function) – The potential.

  • potential_dif (function) – The potential’s first derivative.

  • potential_ddif (function) – The potential’s second derivative.

  • phi_in (float) – The initial field value.

  • phi_end (float) – The end scalar field value.

Returns

edgeworth_function – The Edgeworth expansion.

Return type

function


Gaussian Deviation

This module calculates the point of deviation from Gaussian behaviour for the first-passage times in the number of e-folds for a provided threshold value using the Edgeworth series in low diffusion limit and the relations for the central moments given in Vennin–Starobinsky 2015. This is calculated by using root finding to find the point at which the higher order terms of the Edgeworth series first equal the threshold.

analytics.gaussian_deviation.gaussian_deviation(potential, potential_dif, potential_ddif, phi_in, phi_end, nu=1.0, phi_interval=None)

Returns the skewness of the number of e-folds.

Parameters
  • potential (function) – The potential.

  • potential_dif (function) – The potential’s first derivative.

  • potential_ddif (function) – The potential’s second derivative.

  • phi_in (float) – The initial scalar field value.

  • nu (float, optional) – The decimal threshold of the deviation from Gaussianity. Defaults to 1

  • phi_interval (list, optional.) – The field interval which contains the root. Defaults to between 0 and 10000 standard deviations from the mean.

Returns

deviation_point – The field value at which the deviation occurs.

Return type

float


Quadratic Inflation Large Mass PDF

This module calculates probability density function (PDF) for first-passage time of the number of e-folds for quadratic inflation in the large mass case. The large mass case corresponds to diffusion domination. This is done using the results of Pattison et al 2017, and therefore assumes a UV cutoff at infinity.

analytics.quadratic_inflation_large_mass_pdf.quadratic_inflation_large_mass_pdf(efolds, m, phi_in, phi_end=1.4142135623730951)

Returns PDF of quadratic inflation in the large mass case.

Parameters
  • efolds (list) – The first-passage times where the PDF is to be calculated.

  • m (float) – The mass of quadratic inflation potential.

  • phi_in (float) – The initial field value.

  • phi_end (float, optional) – The end scalar field value. Defaults to a value such that the first slow-roll parameter is 1.

Returns

pdf – The probability density function at the provided e-fold values.

Return type

list


Quadratic Inflation Near Tail PDF

This module calculates the near tail of the probability density function (PDF) for first-passage time of the number of e-folds for quadratic inflation in the large mass case. The large mass case corresponds to diffusion domination. This is done using the results of appendix in insertourpaper, and therefore assumes UV cutoff at infinity.

analytics.quadratic_inflation_near_tail_pdf.quadratic_inflation_near_tail_pdf(efolds, m, phi_in, phi_end=1.4142135623730951, numerical_integration=False)

Returns PDF of quadratic inflation for the near tail.

Parameters
  • efolds (list) – The first-passage times where the PDF is to be calculated.

  • m (float) – The mass of quadratic inflation potential.

  • phi_in (float) – The initial field value.

  • phi_end (float, optional) – The end scalar field value. Defaults to value such that the first slow-roll parameter is 1.

  • numerical_integration (bool, optional) – If numerical integration is used.

Returns

pdf – The probability density function at e-folds values.

Return type

list


Optimal Bias Amplitude

This module returns a constant (known as the bias amplitude) which when multiplied by the functional form of the bias used, and in the drift-dominated limited, results in a duration of inflation equal to the provided target. This is used to ‘tune’ how far into the tail of the probability density of the number of e-folds is investigated by the numerical code, by setting the mean.

analytics.optimal_bias_amplitude.optimal_bias_amplitude(N_target, phi_in, phi_end, potential, potential_diff, bias_function=None, planck_mass=1)

Returns bias amplitude for the provided target number of e-folds N_target and bias.

Parameters
  • N_target (scalar) – The number of e-folds of interest which are to be investigated- the target. The potential second derivative.

  • phi_in (float) – The initial scalar field value. simulated.

  • phi_end (float) – The end scalar field value.

  • bias_function (function, optional) – The functional form of the bias used. The default is to use the diffusion amplitude.

  • planck_mass (scalar, optional) – The Planck mass used in the calculations. The standard procedure is to set it to 1. The default is 1.

Returns

bias_amplitude – the bias amplitude which for the used functional form of the bias, in the drift dominated limit gives the target number of e-folds.

Return type

scalar