Computational toolbox for large scale Calcium Imaging Analysis, including movie handling, motion correction, source extraction, spike deconvolution and result visualization.
I encountered a bug when running a CNMF refit after loading the CNMF object from HDF5. This was caused by params.spatial['medw'] being b'NoneType' rather than None.
None parameters are currently converted to the string 'NoneType' during saving, which is read back into Python as b'NoneType', and this should be converted back to None, but due to the way the conditionals are structured, parameters which should be converted to tuples if not None are not converted if they equal b'NoneType'. (They are converted if they are the regular string 'NoneType'.) I fixed it so that both NoneType cases are handled first, and otherwise simplified the conditional structure (but that should be the only change in behavior).
Partially addresses #1264.
Type of change
Please delete options that are not relevant.
[x] Bug fix (non-breaking change which fixes an issue)
Has your PR been tested?
Yes, caimanmanager test and caimanmanager demotest pass.
Description
I encountered a bug when running a CNMF refit after loading the CNMF object from HDF5. This was caused by
params.spatial['medw']
beingb'NoneType'
rather thanNone
.None
parameters are currently converted to the string 'NoneType' during saving, which is read back into Python asb'NoneType'
, and this should be converted back toNone
, but due to the way the conditionals are structured, parameters which should be converted to tuples if not None are not converted if they equalb'NoneType'
. (They are converted if they are the regular string'NoneType'
.) I fixed it so that both NoneType cases are handled first, and otherwise simplified the conditional structure (but that should be the only change in behavior).Partially addresses #1264.
Type of change
Please delete options that are not relevant.
Has your PR been tested?
Yes,
caimanmanager test
andcaimanmanager demotest
pass.