File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -408,8 +408,12 @@ def extract_stream_info(meta_file, meta):
408
408
# https://github.com/billkarsh/SpikeGLX/blob/15ec8898e17829f9f08c226bf04f46281f106e5f/Markdown/Metadata_30.md#imec
409
409
# We allow also LF streams for NP2.0 because CatGT can produce them
410
410
# See: https://github.com/SpikeInterface/spikeinterface/issues/1949
411
- per_channel_gain [:- 1 ] = 1 / 80.
412
- gain_factor = float (meta ['imAiRangeMax' ]) / 8192
411
+ if 'imChan0apGain' in meta :
412
+ per_channel_gain [:- 1 ] = 1 / float (meta ['imChan0apGain' ])
413
+ else :
414
+ per_channel_gain [:- 1 ] = 1 / 80.
415
+ max_int = int (meta ['imMaxInt' ]) if 'imMaxInt' in meta else 8192
416
+ gain_factor = float (meta ['imAiRangeMax' ]) / max_int
413
417
channel_gains = gain_factor * per_channel_gain * 1e6
414
418
else :
415
419
raise NotImplementedError ('This meta file version of spikeglx'
You can’t perform that action at this time.
0 commit comments