Spatialstats
spatialstats is collection of statistical tools and utility routines used to analyze the multi-scale structure of 2D and 3D spatial fields and particle distributions.
Install / Use
/learn @michael-0brien/SpatialstatsREADME
spatialstats
<tt>spatialstats</tt> is a collection of correlation function routines used to analyze the multi-scale structure of 2D and 3D spatial fields and particle distributions. As of August 2022, this package will no longer be maintained.
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.
paircount
Calculate two-point correlation multipoles using pair counting.
polyspectra
Compute power spectrum multipoles of scalar, vector, and tensor fields and particle data, and compute bispectra on 2D and 3D grids.
GPU usage
The following example demonstrates how to interact with the <tt>spatialstats</tt> 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
Clone from github and build by running
python setup.py install
Installation from PyPI has been discontinued.
Additional Dependencies
<tt>spatialstats</tt> does not load any of its routines until the time of import (lazy loading), so the only installation requirements are numpy and scipy. This is to keep the flexibility of <tt>spatialstats</tt> as a package of disconnected routines. Users may need to add additional dependencies after installation, such as numba>=0.50, cupy>=8.0, and pyfftw, finufft, and sympy.
Related Skills
next
A beautifully designed, floating Pomodoro timer that respects your workspace.
product-manager-skills
50PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
pm
PM Agent Rule This rule is triggered when the user types `@pm` and activates the Product Manager agent persona.
devplan-mcp-server
3MCP server for generating development plans, project roadmaps, and task breakdowns for Claude Code. Turn project ideas into paint-by-numbers implementation plans.
