run_cadzow_checkpoint
run_cadzow_checkpoint(
data,
out_npy,
h=None,
fs=250.0,
chunk=_CADZOW_CHUNK,
halo=_CADZOW_HALO,
n_jobs=4,
**cadzow_kwargs,
)Cadzow-denoise a decimated LFP array in overlapping chunks and save a contiguous checkpoint.
Each chunk of chunk samples is read with a halo-sample context on each side, denoised, then only the central chunk samples are written. The output .npy contains no guard bands and can be memory-mapped directly.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| data | (ndarray(ns, nc), float32) | Decimated LFP at fs Hz, time-first so time slices are contiguous on disk. |
required |
| out_npy | path - like | Output .npy file path. Shape (ns, nc), float32, time-first. | required |
| h | dict or None | Probe header with keys ‘x’ and ‘y’. Defaults to NP1 geometry for nc channels. | None |
| fs | float | Sampling rate [Hz]. Default 250. | 250.0 |
| chunk | int | Written chunk size (samples). chunk + 2*halo must be FFT-optimal. Default 640 → processed window = 640 + 2×64 = 768 = 3 × 256. | _CADZOW_CHUNK |
| halo | int | Context halo each side (samples). Default 64. | _CADZOW_HALO |
| n_jobs | int | Number of chunks processed in parallel via ProcessPoolExecutor. Each worker subprocess calls cadzow_denoiser with n_jobs=1 and writes its result directly to the output memmap. Default 4. | 4 |
| **cadzow_kwargs | Overrides of the Cadzow defaults for the probe geometry (see cadzow_lfp_kwargs). |
{} |
Returns
| Name | Type | Description |
|---|---|---|
| ndarray (ns, nc), float32 — also written to out_npy. |