Closed glopesdev closed 8 months ago
Use StableSubjectsInArena for triggering the baseline. This will cap at the absolute maximum of observed animals and also avoid spurious triggers since it has a temporal smoothing component.
Actually, on further inspection the current baseline trigger logic is using SubjectsInArena
which already ensures a capped count. The baseline trigger period needs to be adjusted and tested.
The current subject weight is not baselined since the baseline trigger is never activated and only the
FilteredWeight
field is accessed during subject weight measurements. Also the calculation of the baseline trigger event is using the number of detected SLEAP pose bounding boxes, instead of the number of stable subjects in the arena center, which is error prone since multiple bounding boxes with the same ID can be reported by the model. Points for consideration:StableSubjectsInArena
for triggering the baseline. This will cap at the absolute maximum of observed animals and also avoid spurious triggers since it has a temporal smoothing component.BaselineTrigger
subject toBaselineWeight
subject (or replace the former with the latter). TheBaselineWeight
command was introduced as part of theWeightScale
module to simplify logging and interfacing when scaling up to multiple scales in the future.BaselinedWeight
for computing subject weights.BaselinedWeight
. ~One interesting option here would be to record a single three-column Harp bin file with raw / filtered / baselined weights instead of two or three separate files [NOTE: actually it is not just three-columns because of measurement confidence].~