Statistical routines to analyze the spatial structure of 2D and 3D spatial fields and particle distributions.
Project description
spatialstats
spatialstats is a collection of statistical tools and utility routines used to analyze the multi-scale structure of 2D and 3D spatial fields and particle distributions.
Routines are designed to work with large datasets and some include optional CuPy acceleration. Each routine aims to be independent from the rest of the package, so feel free to just pull out the routine that you need!
You can read the docs at https://spatialstats.readthedocs.io/.
If you have a routine that you think would fit in this package, please do reach out! I currently have no plans to implement specific routines--only ones that come up in my research.
polyspectra
Calculate the bispectrum and power spectrum of 2D and 3D grids.
particles
Calculate statistics about the multi-scale structure of 2D and 3D particle distributions, like the spatial distribution function and structure factor.
GPU usage
The following example demonstrates how to interact with the spatialstats configuration object to toggle gpu usage
import numpy as np
import spatialstats as ss
ss.config.gpu = True
shape = (100, 100)
data = np.random.rand(*shape)
result = ss.polyspectra.bispectrum(data)
Installation
Option 1
Clone from github and build by running
python setup.py install
This is the recommended method of installation.
Option 2
Install from PyPI
pip install spatialstats
Additional Dependencies
spatialstats does not load any of its routines until the time of import (lazy loading), so the only installation requirement is numpy. This is to keep the flexibility of spatialstats as a package of disconnected routines. Users may need to add additional dependencies after installation, such as scipy, numba>=0.50, cupy>=8.0, and pyfftw.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file spatialstats-1.1.2.tar.gz
.
File metadata
- Download URL: spatialstats-1.1.2.tar.gz
- Upload date:
- Size: 31.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b145bafd4f6c108572ae0a095f6dd99aa103ae8e0e7827be7ff25259206de390 |
|
MD5 | 59af871f6fce65bd787dc147705986b6 |
|
BLAKE2b-256 | 2880438912ebbe220b46b9279c30da4aff2153a7ddbf7c0d6de85c9017b817e3 |
File details
Details for the file spatialstats-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: spatialstats-1.1.2-py3-none-any.whl
- Upload date:
- Size: 44.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11ead55024be3da2701b59868fc92a86b0a78fb2cf65fc765aab46ed2d79e0db |
|
MD5 | 3504ed35f88d8ecbb6567eb0f182304a |
|
BLAKE2b-256 | 30512a81f5c5c887560a0b4c435abc93eb6597c5ff48b1e677681b454721305d |