I'm not really sure what the intention of these lines is. self.options = options.item() if options is not None else options will set self.options to None if options is None. But then if None is set as the value, the next line, self._sampling_frequency = self.options["fs"] will fail because you are trying to use getattr on a None.
https://github.com/catalystneuro/roiextractors/blob/22ccdad19697284efa5b39db09d72e9d598eac81/src/roiextractors/extractors/suite2p/suite2psegmentationextractor.py#L153-L157
I'm not really sure what the intention of these lines is.
self.options = options.item() if options is not None else options
will setself.options
toNone
ifoptions is None
. But then ifNone
is set as the value, the next line,self._sampling_frequency = self.options["fs"]
will fail because you are trying to usegetattr
on aNone
.