Skip to main content

Python Numpy Scipy License: GPL v3 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.9

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.9
File Size Uploaded Provenance Actions
rft1d-0.2.9.tar.gz 41.3 kB Without provenance Details for rft1d-0.2.9.tar.gz

Built distribution (wheel)

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

Total release size: 83.7 kB

Release files / rft1d-0.2.9.tar.gz

Download URL rft1d-0.2.9.tar.gz
Size 41.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e5573d86bbcccc0ed5c0b5917f88f932787a8716ca63b153b076dee07ded2141
BLAKE2b-256 checksum
How to use checksums
fd052acfc28ef97b3be0b2f74d91f8744e2162f4e3eb20653d5ae0ed1bad87a0
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.9-py3-none-any.whl

Download URL rft1d-0.2.9-py3-none-any.whl
Size 42.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4ff9d658e3c813a4ae3bff77d3813d3de56e149f285d91e51740af5db65342e
BLAKE2b-256 checksum
How to use checksums
920148bc6f7d9485390c1938f87990a5b95fff3430e102f4221eebfec6d396ea
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.9

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