Metadata-Version: 2.4
Name: spm1d
Version: 0.5.0
Summary: One-Dimensional Statistical Parametric Mapping
Author-email: Todd Pataky <0todd0@gmail.com>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://spm1d.org
Project-URL: Documentation, https://spm1d.org/spm1d-v0.5/
Project-URL: Source, https://github.com/spm1d-org/spm1d-v0.5
Project-URL: Bug Reports, https://github.com/spm1d-org/spm1d-v0.5/issues
Keywords: statistics,probability,hypothesis testing,functional data analysis,time series analysis,continuum data analysis
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: matplotlib
Requires-Dist: rft1d>=0.2.7
Requires-Dist: h5py
Requires-Dist: formulaic
Provides-Extra: data
Requires-Dist: jiku-data>=0.2.1; extra == "data"
Provides-Extra: io
Provides-Extra: formula
Dynamic: license-file

# spm1d

**One-dimensional Statistical Parametric Mapping**: hypothesis testing for
smooth one-dimensional data (time series, trajectories, curves) using random field theory and related inference methods.

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



[![Python](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue)](https://www.python.org)
[![Numpy](https://img.shields.io/badge/Numpy-777BB4?style=for-the-badge&logo=numpy&logoColor=white)](https://numpy.org)
[![Scipy](https://img.shields.io/badge/SciPy-654FF0?style=for-the-badge&logo=SciPy&logoColor=white)](https://scipy.org)
[![PyPI](https://img.shields.io/pypi/v/spm1d)](https://pypi.org/project/spm1d/)
[![Python](https://img.shields.io/pypi/pyversions/spm1d)](https://pypi.org/project/spm1d/)
[![License: GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-blue)](LICENSE.txt)
![version](https://img.shields.io/badge/version-0.5.0-blue)


## Documentation

- See the [gallery](https://spm1d.org/spm1d-v0.5/gallery) for an overview.
- Full documentation is available [here](https://spm1d.org/spm1d-v0.5/).
- **spm1d** 0.5 is a major new version. Refer to: [changes from 0.4.](https://spm1d.org/spm1d-v0.5/start_here/migration)



## Install

**spm1d** 0.5 requires Python 3.10 or newer. Install using:

```bash
pip install spm1d
```

To also install the example datasets used in the documentation:

```bash
pip install "spm1d[data]"
```

to revert to version 0.4 use:

```bash
pip install "spm1d<0.5"
```



## Example

```python
import spm1d
import jikudata as jd

dataset = jd.PlantarArchAngle()   # 1D dataset
y, A    = dataset.y, dataset.x    # (20,101) array of responses, and (20,) array of condition labels
y0      = y[ A == 0 ]             # (10,101) array:  group 0
y1      = y[ A == 1 ]             # (10,101) array:  group 1
t       = spm1d.stats.ttest_paired( y1, y0 )  # test statistic for  y1 - y0
ti      = t.inference( 0.05 )     # inference at alpha = 0.05 
print( ti )                       # threshold, clusters, p values 
ti.plot()                         # test statistic field with suprathreshold clusters
```

![example analysis](https://raw.githubusercontent.com/spm1d-org/spm1d-v0.5/main/.github/readme_example.png)





## Support

Support is provided by the spm1d.org organization.

Please refer to [spm1d.org/support](https://spm1d.org/support) for details.



## Citing

If spm1d contributes to published work, please cite:

> Pataky TC (2012). One-dimensional statistical parametric mapping in Python.
> *Computer Methods in Biomechanics and Biomedical Engineering* 15(3): 295–301.
> https://doi.org/10.1080/10255842.2010.527837



Machine-readable citation: [CITATION.cff](CITATION.cff).



## Contributing

Please see the [spm1d.org contributing guidelines and AI policy](https://spm1d.org/contributing/).



## License

GPL-3.0-or-later. See [LICENSE.txt](LICENSE.txt).
