From d859aff2e288fae6f8a5bd372828d8a64b12fe55 Mon Sep 17 00:00:00 2001 From: Rick Gerkin Date: Mon, 6 Aug 2018 16:44:46 -0700 Subject: [PATCH] Fix for compatibility with AllenSDK changes --- neuronunit/aibs.py | 7 +++---- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) mode change 100644 => 100755 neuronunit/aibs.py mode change 100644 => 100755 requirements.txt diff --git a/neuronunit/aibs.py b/neuronunit/aibs.py old mode 100644 new mode 100755 index 1e563a8e5..a433aba50 --- a/neuronunit/aibs.py +++ b/neuronunit/aibs.py @@ -74,10 +74,9 @@ def get_observation(dataset_id, kind, cached=True, quiet=False): ct = CellTypesApi() cmd = ct.get_cell(dataset_id) # Cell metadata if kind == 'rheobase': - sweep_id = cmd['ephys_features'][0]['rheobase_sweep_id'] - sp = get_sweep_params(dataset_id, sweep_id) - if kind == 'rheobase': - value = sp['stimulus_absolute_amplitude'] + kind = 'ef__threshold_i_long_square' + value = cmd[kind] + if kind in ['ef__threshold_i_long_square']: # A current value = np.round(value, 2) # Round to nearest hundredth of a pA. value *= pq.pA # Apply units. db[identifier] = value diff --git a/requirements.txt b/requirements.txt old mode 100644 new mode 100755 index 85993120b..13914a2bd --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ matplotlib>=2.0 neo==0.5.2 elephant==0.4.1 igor==0.3 -allensdk>=0.14.2 +allensdk==0.14.5 pyNeuroML>-0.3.10 pyNN>=0.9 execnet