quantumjot / btrack

Bayesian multi-object tracking
https://btrack.readthedocs.io
MIT License
311 stars 50 forks source link

Track write does not export dummy objects #194

Closed quantumjot closed 1 year ago

quantumjot commented 1 year ago

When using hdf.write_tracks directly, the exporter does not save dummy objects. Loading the file results in an obscure error:

File ~/analysis/BayesianTracker/btrack/dataio.py:677, in HDF5FileHandler.tracks.<locals>._get_txyz(_ref)
    675 if _ref >= 0:
    676     return obj[_ref]
--> 677 return dummy_obj[abs(_ref) - 1]

NameError: free variable 'dummy_obj' referenced before assignment in enclosing scope