r/Python • u/AutoModerator • Nov 04 '26
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
37
Upvotes
r/Python • u/AutoModerator • Nov 04 '26
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
View all comments
1
u/Square_Clock5892 6d ago
PyTurbo_SF: fast structure functions for turbulence data, with error bars
Structure functions (how much a field changes between two points as a function of their distance) are a basic tool in turbulence research, but the textbook algorithm is O(N²) and gives you no uncertainty. PyTurbo_SF bootstraps blocks of the data at power-of-two spacings, so 1D drops to O(N log N), and each distance bin keeps resampling only until its standard error is below a threshold you choose. You get back an xarray Dataset with estimates, confidence intervals and a convergence flag per bin, computed in parallel.
It is aimed at people in physics, oceanography and atmospheric science working on large simulation or satellite datasets. FluidSF and fastSF do similar calculations; the difference here is the adaptive bootstrap and uncertainty on every value. Peer reviewed in JOSS.
pip install pyturbo_sf https://github.com/aayouche/pyturbo_sf https://pyturbo-sf.readthedocs.io
Feedback on the API is very welcome.