catalystneuro / roiextractors

Python-based module for extracting from, converting between, and handling optical imaging data from several file formats. Inspired by SpikeInterface.
https://roiextractors.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
11 stars 7 forks source link

suite2p allowing for options=None #329

Closed bendichter closed 3 months ago

bendichter commented 3 months ago

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 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.