We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 400c042 commit 5d66db8Copy full SHA for 5d66db8
neo/rawio/maxwellrawio.py
@@ -100,7 +100,15 @@ def _parse_header(self):
100
elif int(version) > 20160704:
101
settings = h5['wells'][stream_id][self.rec_name]['settings']
102
sr = settings['sampling'][:][0]
103
- gain_uV = settings['lsb'][:][0] * 1e6
+ if 'lsb' in settings:
104
+ gain_uV = settings['lsb'][:][0] * 1e6
105
+ else:
106
+ if "gain" not in settings:
107
+ print("'gain' amd 'lsb' not found in settings. Setting gain to 512 (default)")
108
+ gain = 512
109
110
+ gain = settings['gain'][:][0]
111
+ gain_uV = 3.3 / (1024 * gain) * 1e6
112
mapping = settings['mapping']
113
sigs = h5['wells'][stream_id][self.rec_name]['groups']['routed']['raw']
114
0 commit comments