You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Sad Catapella N3][Data integrity] Parameter channel indices silently truncate fractions and booleans #38
Parameters.select lines 144–153 also converts the requested channel identifiers via int(c) before membership validation, allowing 1.9 to be interpreted as channel 1 and True as channel 1.
Tests cover valid integer selection and unknown integer channels, but not fractional inputs, booleans or numeric strings.
Consequence / example
Parameters('z-score','image',None,True,(0.0,10.0),(1.0,1.0), channels=(0.0,1.9)) becomes channels (0,1) without warning. parameters.select([0.9]) silently selects channel 0 instead of rejecting an invalid channel identifier. This can associate normalization parameters with the wrong fluorescence marker.
Fix and tests
Require actual index-like integers (operator.index or explicit numbers.Integral policy) and reject bools. Validate no negatives and strictly increasing unique indices; preserve meaningful error messages. Test float fractions, float whole numbers, bool, text digits, NumPy integer scalar types, valid noncontiguous subsets, and mapping preservation. Do not silently round/truncate. No Numba role.
Activity