Skip to main content

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.

Metadata

Release files for spatialstats 1.1.2

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

Source distribution (sdist)

Source distribution for spatialstats 1.1.2
File Size Uploaded
spatialstats-1.1.2.tar.gz 31.2 kB Details

Built distribution (wheel)

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

Total release size: 75.8 kB

Release files / spatialstats-1.1.2.tar.gz

Download URL spatialstats-1.1.2.tar.gz
Size 31.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b145bafd4f6c108572ae0a095f6dd99aa103ae8e0e7827be7ff25259206de390
BLAKE2b-256 checksum
How to use checksums
2880438912ebbe220b46b9279c30da4aff2153a7ddbf7c0d6de85c9017b817e3
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / spatialstats-1.1.2-py3-none-any.whl

Download URL spatialstats-1.1.2-py3-none-any.whl
Size 44.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11ead55024be3da2701b59868fc92a86b0a78fb2cf65fc765aab46ed2d79e0db
BLAKE2b-256 checksum
How to use checksums
30512a81f5c5c887560a0b4c435abc93eb6597c5ff48b1e677681b454721305d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1.0

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

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