Skip to main content

Python Numpy Scipy License: GPL-3.0-or-later version downloads

rft1d

One-Dimensional Random Field Theory in Python.

rft1d is a Python package for exploring and validating Random Field Theory (RFT) expectations regarding upcrossings in univariate and multivariate 1D continua. These expectations can be used to make statistical inferences regarding signals observed in experimentally measured 1D continua including scalar and vector time series.

Please cite:

Pataky TC (2016) RFT1D: Smooth One-Dimensional Random Field Upcrossing Probabilities in Python. Journal of Statistical Software 71(7): 1-22. https://doi.org/10.18637/jss.v071.i07


rft1d is a component of the spm1d.org project


Documentation is available at: www.spm1d.org/rft1d


Find this package useful? Please press star ★ , thank you!



Installation

pip install rft1d

rft1d requires Python 3.9 or later, along with numpy, scipy and matplotlib.

rft1d has been tested on Python 3.9 through 3.13.


Running examples:

The scripts in ./examples call import rft1d so they need the package importable. Either install rft1d, or add the ./src directory to your PYTHONPATH.

The scripts in ./examples/paper reproduce the figures and code examples from the Journal of Statistical Software paper. Run ./examples/paper/all_results.py to run generate everything in one pass.


Development

The package uses a src layout, and the test suite adds ./src to sys.path itself (see tests/conftest.py), so no installation step is needed to work on the source:

git clone https://github.com/spm1d-org/rft1d.git
cd rft1d
pip install pytest numpy scipy matplotlib

Running tests:

pytest                      # the whole suite
pytest -m "not slow"        # skip the 100,000-case validation (about 20 s)
pytest tests/test_p_RF.py   # a single file

The tests are:

  • test_p_RF.py and test_uc_RF.py check rft1d's probabilities and critical thresholds against reference values computed with SPM12b, which are stored in tests/data-spm12b. These establish that rft1d's probability calculations are correct.
  • test_geom.py checks cluster labeling, resel counts and cluster metrics against hand-calculated values.
  • test_random_rng.py checks that random fields are reproducible when a seed or generator is passed as rng.

Contributing

Please see the spm1d.org contributing guidelines and AI policy.


Issues

Please report software bugs or other problems by searching existing issues or creating a new issue here.

Metadata

Release files for rft1d 0.2.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rft1d 0.2.10
File Size Uploaded Provenance Actions
rft1d-0.2.10.tar.gz 41.4 kB Without provenance Details for rft1d-0.2.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rft1d 0.2.10
File Interpreter ABI Platform Actions
rft1d-0.2.10-py3-none-any.whl Python 3 none any Details for rft1d-0.2.10-py3-none-any.whl

Total release size: 83.9 kB

Release files / rft1d-0.2.10.tar.gz

Download URL rft1d-0.2.10.tar.gz
Size 41.4 kB
Tags Source
SHA-256 checksum
How to use checksums
258f75443da97031dca3d7e163c3949617ce119e1f17d7afdde8f924a30efc11
BLAKE2b-256 checksum
How to use checksums
b899ab35556d5f9977be23616cbd8a79ea8303da187683817a9e79deb49c7791
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / rft1d-0.2.10-py3-none-any.whl

Download URL rft1d-0.2.10-py3-none-any.whl
Size 42.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c03779e9065baf0b9fa94fa65b89f01c7a5888dee17a3c9621f88eaff54f330
BLAKE2b-256 checksum
How to use checksums
8a53463284f13733da31830b99638aae104fb04c8e7097811e05bbd702d676c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for rft1d 0.2.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page