Welcome to PyFPT’s documentation!
This is the documentation for a Python/Cython package to run first-passage time (FPT) simulations using importance sampling.
This package will let you numerically investigate the tail of the probability density for first passage times, for a general 1D Langevin equation. See the guide section for how to install PyFPT, as well as a how-to on running your first simulation.
The tail of the probability density is investigated using the method of importance sampling, where a bias increases the probability of large FPTs, resulting in a sample distribution, which are then weighted to reproduce the rare events of the target distribution. The Numerics module both runs the simulations and performs the data analysis.
This package was originally developed to solve FPT problems in stochastic slow-roll inflation, and as such it also comes with functionality to compare the numerical results with analytical expectations, see Analytical Functions.
Contents:
- Getting Started
- Analytical Functions
- Drift of Slow-Roll Inflation
slow_roll_drift()- Diffusion of Slow-Roll Inflation
slow_roll_diffusion()- Classicality Criterion
classicality_criterion()- Mean Number of e-folds
mean_efolds()- Variance of the Number of e-folds
variance_efolds()- Skewness of the Number of e-folds
skewness_efolds()- Kurtosis of the Number of e-folds
kurtosis_efolds()- Third Central Moment of the Number of e-folds
third_central_moment_efolds()- Fourth Central Moment of the Number of e-folds
fourth_central_moment_efolds()- Reduced Potential
reduced_potential()- Reduced Potential Derivative
reduced_potential_diff()- Reduced Potential Second Derivative
reduced_potential_ddiff()- Gaussian PDF
gaussian_pdf()- Edgeworth PDF
edgeworth_pdf()- Gaussian Deviation
gaussian_deviation()- Quadratic Inflation Large Mass PDF
quadratic_inflation_large_mass_pdf()- Quadratic Inflation Near Tail PDF
quadratic_inflation_near_tail_pdf()- Optimal Bias Amplitude
optimal_bias_amplitude()
- Numerics
- Importance Sampling Simulation
is_simulation()- Probability Density of the Data
data_points_pdf()- Re-Processing
re_processing()- Histogram Normalisation
histogram_normalisation()- Data in Histogram Bins
data_in_histogram_bins()- Histogram Data Truncation
histogram_data_truncation()- Jackknife Errors
jackknife_errors()- Save Data to File
save_data_to_file()- Multiprocessing Error
multi_processing_error()- Lognormal Error
log_normal_error()- Lognormal Height
log_normal_height()- Lognormal Mean
log_normal_mean()- Lognormality Check
lognormality_check()