Skip to content

Commit

Permalink
Merge ace324a into 3ed4706
Browse files Browse the repository at this point in the history
  • Loading branch information
jpgill86 committed Dec 8, 2019
2 parents 3ed4706 + ace324a commit bdd6c3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions neurotic/datasets/data.py
Expand Up @@ -6,6 +6,7 @@
.. autofunction:: load_dataset
"""

import inspect
from packaging import version
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -139,13 +140,13 @@ def _read_data_file(metadata, lazy=False, signal_group_mode='split-all'):
lazy = False
print(f'NOTE: Not reading signals in lazy mode because Neo\'s {io.__class__.__name__} reader does not support it.')

if type(io) is not neo.io.AsciiSignalIO:
if 'signal_group_mode' in inspect.signature(io.read_block).parameters.keys():
# - signal_group_mode='split-all' is the default because this ensures
# every channel gets its own AnalogSignal, which is important for
# indexing in EphyviewerConfigurator
blk = io.read_block(lazy=lazy, signal_group_mode=signal_group_mode)
else:
# AsciiSignalIO.read_block does not have the signal_group_mode argument
# some IOs do not have signal_group_mode
blk = io.read_block(lazy=lazy)

# load all objects except analog signals
Expand Down

0 comments on commit bdd6c3e

Please sign in to comment.