In extraction/dcnv.py::preprocess:
elif baseline == "constant":
Flow = gaussian_filter(F, [0., sig_baseline])
Flow = np.amin(Flow)
F -= Flow
np.amin runs over the whole (n_neurons, n_frames) array, so the same scalar — the smoothed minimum of the lowest neuron — is subtracted from every trace. Any neuron whose own minimum is above that value keeps a positive floor, which the non-negative, unpenalised OASIS step then turns into a steady stream of small "spikes". The parameter description ("Width of Gaussian filter in frames (applied to find constant or before maximin filter)") reads as a per-trace constant, which would be np.amin(Flow, axis=1, keepdims=True). Present since at least v0.14.4; the default maximin is unaffected.
Is the global scalar intended? If not I am happy to send the one-line per-trace change.
Generated by Claude Code
In
extraction/dcnv.py::preprocess:np.aminruns over the whole(n_neurons, n_frames)array, so the same scalar — the smoothed minimum of the lowest neuron — is subtracted from every trace. Any neuron whose own minimum is above that value keeps a positive floor, which the non-negative, unpenalised OASIS step then turns into a steady stream of small "spikes". The parameter description ("Width of Gaussian filter in frames (applied to find constant or before maximin filter)") reads as a per-trace constant, which would benp.amin(Flow, axis=1, keepdims=True). Present since at least v0.14.4; the defaultmaximinis unaffected.Is the global scalar intended? If not I am happy to send the one-line per-trace change.
Generated by Claude Code