-
Notifications
You must be signed in to change notification settings - Fork 80
[BUG]: background channel is required even when skip_classification=True (single-channel flow breaks) #605
Description
Describe the bug
I found that the Python API still requires a background channel even when skip_classification=True.
This seems wrong because if classification is skipped, background should not be mandatory.
Right now this blocks single-channel detection-only use cases.
To Reproduce
- Create a valid 3D
signal_array. - Call
cellfinder.core.main.main(...)with:signal_array=<3D array>voxel_sizes=(5, 2, 2)(any valid voxel sizes)skip_classification=True- do not pass
background_array
- It fails with:
TypeError: main() missing 1 required positional argument: 'background_array'
I also checked classification function behavior with background_array=None and saw:
AttributeError: 'NoneType' object has no attribute 'ndim'
Expected behaviour
If skip_classification=True, run should work with signal-only input.
Background should only be required when classification is enabled.
Log file
No separate log file attached yet.
I reproduced using local script run:
python -u _bug_demo.py
and got the errors above consistently.
Screenshots
No screenshots (this report is based on Python/API repro, not UI testing).
Computer used (please complete the following information):
- OS: Windows
- Version: Windows 11
Additional context
This seems related to feature request #352 (make background channel optional).
I think this is a concrete blocker bug inside that larger feature work.