eastack
SIMD-accelerated frame stacking powered by Ea kernels.
Stack N noisy exposures into a clean result. Signal reinforces, noise cancels by sqrt(N). Useful for astronomy, microscopy, video denoising, or any workflow that averages multiple frames.
Install
pip install eastack
Pre-built wheels include compiled SIMD kernels for Linux x86_64, Linux aarch64, and Windows x86_64.
Usage
import numpy as np
from eastack import stack_mean
# Stack 16 noisy frames into a clean mean
frames = [np.random.rand(1024, 1024).astype(np.float32) for _ in range(16)]
result = stack_mean(frames)
# Also accepts 3D arrays (N, H, W)
data = np.random.rand(16, 1024, 1024).astype(np.float32)
result = stack_mean(data)
API
| Function | Description |
|---|---|
stack_mean(frames) |
Stack and compute mean. Returns f32 array. |
stack(frames) |
Accumulate without dividing. Returns sum. |
frame_stats(data) |
Single-pass (min, max, sum) of a float32 array. |
Low-level kernel access:
| Function | Description |
|---|---|
accumulate_f32x8(acc, frame) |
acc += frame using SIMD |
accumulate_batch4_f32x8(acc, f0, f1, f2, f3) |
4 frames in one pass |
accumulate_batch8_f32x8(acc, f0..f7) |
8 frames in one pass |
scale_f32x8(data, out, factor) |
out = data * factor using SIMD |
How it works
Batched accumulation reduces memory traffic by processing multiple frames per pass over the accumulator:
- Single-frame:
acc += frame— 3N memory transactions per element (read acc, read frame, write acc) repeated N times - Batched (K=8):
acc += f0 + f1 + ... + f7— one acc read/write per 8 frames
The stack() function automatically dispatches: batch8 first, then batch4 for remainder, then singles.
Performance
On 4096x4096 frames (64 MB accumulator, single-threaded):
NumPy streaming (np.add loop) : 119 ms
Ea single-frame (same loop) : 110 ms
Ea batched (8 frames/pass) : 68 ms — 1.76x faster
The speedup grows with frame size because the accumulator exceeds L3 cache — reducing acc traffic has maximum impact in DRAM.
Building from source
EA_BIN=./ea ./build_kernels.sh
pip install -e .
Requirements
- Python 3.9+
- NumPy
Metadata
Release files for eastack 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eastack-0.1.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for eastack-0.1.0-py3-none-win_amd64.whl |
| eastack-0.1.0-py3-none-manylinux_2_17_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for eastack-0.1.0-py3-none-manylinux_2_17_x86_64.whl |
| eastack-0.1.0-py3-none-manylinux_2_17_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details for eastack-0.1.0-py3-none-manylinux_2_17_aarch64.whl |
Total release size: 25.3 kB
Release files / eastack-0.1.0-py3-none-win_amd64.whl
| Download URL | eastack-0.1.0-py3-none-win_amd64.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
be1f9f4a20d9e7c33363f7e0b22518520a06cb92468bbb21e97f2971a8486b0d
|
|
BLAKE2b-256 checksum How to use checksums |
db2ee842a0a3ac1dedd52978691e5a292117df278c0e2969fb2ecca3181327a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 3, 2026.
Transparency logRelease files / eastack-0.1.0-py3-none-manylinux_2_17_x86_64.whl
| Download URL | eastack-0.1.0-py3-none-manylinux_2_17_x86_64.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
3f6d4eb7d40387b2af49e0ba1fcee91c6e3dae88fb135403d974e03874f1c6b9
|
|
BLAKE2b-256 checksum How to use checksums |
e617d9015c02a835e5958d13e2adb09b34e62b571e75af726257c747ef5c8569
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 3, 2026.
Transparency logRelease files / eastack-0.1.0-py3-none-manylinux_2_17_aarch64.whl
| Download URL | eastack-0.1.0-py3-none-manylinux_2_17_aarch64.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
253972f130f25527ed9a4b8caa5434327afb18d6b130052567821163bea620df
|
|
BLAKE2b-256 checksum How to use checksums |
529f27b189b17c106a9decbf9e6a87addf6d7cc588612f60f13c0920a738b699
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 3, 2026.
Transparency logSecurity for eastack 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 3 files in this release have been uploaded with provenance metadata.
Attestation for eastack-0.1.0-py3-none-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.