Skip to content

Commit

Permalink
partial fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudon committed Sep 25, 2024
1 parent b36f6a1 commit 402f793
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 deletions.
1 change: 1 addition & 0 deletions emodel_generalisation/bluecellulab_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import efel
from bluecellulab.simulation.neuron_globals import NeuronGlobals
from bluepyparallel.evaluator import evaluate

from emodel_generalisation.utils import isolate

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion emodel_generalisation/model/bpopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ def __init__(
name=f"{name}.spike_count_stimint",
efel_feature_name="spike_count_stimint",
recording_names={"": f"{name}.{location.name}.v"},
stim_start=500, # discard begining to allow for a couple of initial APs
stim_start=500, # discard beginning to allow for a couple of initial APs
stim_end=2000,
exp_mean=1,
exp_std=0.1,
Expand Down
4 changes: 2 additions & 2 deletions emodel_generalisation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
from functools import partial
from hashlib import sha256
from itertools import cycle
from pathlib import Path
from multiprocessing.context import TimeoutError # pylint: disable=redefined-builtin
from bluepyparallel.parallel import NestedPool
from pathlib import Path

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from bluepyopt.ephys.responses import TimeVoltageResponse
from bluepyparallel.parallel import NestedPool
from matplotlib.backends.backend_pdf import PdfPages
from scipy.cluster.hierarchy import dendrogram
from scipy.cluster.hierarchy import linkage
Expand Down
10 changes: 5 additions & 5 deletions tests/data/adapt_df.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Unnamed: 0,mtype,layer,morphology,synapse_class,morph_class,hemisphere,etype,model_template,region,x,y,z,orientation,emodel,ais_scaler,soma_scaler,ais_model,soma_model
1,L5_TPC:A,5,hashed/be/fb/befbcea89657fdd07ae181b977b9e320,EXC,PYR,right,generic,hoc:generic_model,MOs@right,3887.062211566772,1924.0204607290975,6775.602532718369,"[[1. 0. 0.]
Unnamed: 0,morph_class,mtype,morphology,model_template,region,synapse_class,layer,hemisphere,etype,x,y,z,orientation,emodel,ais_scaler,soma_scaler,ais_model,soma_model
1,PYR,L5_TPC:A,hashed/be/fb/befbcea89657fdd07ae181b977b9e320,hoc:generic_model,MOs@right,EXC,5,right,generic,3887.062211566772,1924.0204607290975,6775.602532718369,"[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]",generic_model,1.0,1.0,"{""popt"": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}","{""soma_surface"": 1167.714655051592, ""soma_radius"": 10.0}"
2,L5_TPC:A,5,hashed/d6/a9/d6a9976c7588ae0111f17f28e39a1e6d,EXC,PYR,right,generic,hoc:generic_model,MOp@right,6291.256509715739,1139.1852640664094,6812.970413610967,"[[1. 0. 0.]
[0. 0. 1.]]",generic_model,1.1,1.1,"{""popt"": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}","{""soma_surface"": 1167.714655051592, ""soma_radius"": 10.0}"
2,PYR,L5_TPC:A,hashed/d6/a9/d6a9976c7588ae0111f17f28e39a1e6d,hoc:generic_model,MOp@right,EXC,5,right,generic,6291.256509715739,1139.1852640664094,6812.970413610967,"[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]",generic_model,1.0,1.0,"{""popt"": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}","{""soma_surface"": 1167.714655051592, ""soma_radius"": 10.0}"
[0. 0. 1.]]",generic_model,1.1,1.1,"{""popt"": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}","{""soma_surface"": 1167.714655051592, ""soma_radius"": 10.0}"
10 changes: 5 additions & 5 deletions tests/data/adapted_evaluation_df.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
etype,region,morph_class,mtype,morphology,synapse_class,hemisphere,model_template,layer,ais_scaler,soma_scaler,x,y,z,orientation,emodel,ais_model,soma_model,exception,features,scores,trace_data
generic,MOs@right,PYR,L5_TPC:A,hashed/be/fb/befbcea89657fdd07ae181b977b9e320,EXC,right,hoc:generic_model,5,1.0,1.0,3887.062211566772,1924.0204607290975,6775.602532718369,"[[1. 0. 0.]
morph_class,mtype,morphology,model_template,region,synapse_class,layer,hemisphere,etype,ais_scaler,soma_scaler,x,y,z,orientation,emodel,ais_model,soma_model,exception,features,scores,trace_data
PYR,L5_TPC:A,hashed/be/fb/befbcea89657fdd07ae181b977b9e320,hoc:generic_model,MOs@right,EXC,5,right,generic,1.1,1.1,3887.062211566772,1924.0204607290975,6775.602532718369,"[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]",generic_model,"{""popt"": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}","{""soma_radius"": 10.0, ""soma_surface"": 1167.714655051592}",,"{""IDRest_150.soma.v.mean_frequency"": 20.828084320123192, ""IDRest_150.soma.v.AP_amplitude"": 53.56395753781952, ""IDRest_200.soma.v.mean_frequency"": 27.934388253898348, ""IDRest_200.soma.v.AP_amplitude"": 53.779478010796346, ""IDRest_280.soma.v.mean_frequency"": 36.7291061470728, ""IDRest_280.soma.v.AP_amplitude"": 53.85104717835058, ""RMPProtocol.soma.v.voltage_base"": -69.31069436808355, ""RMPProtocol.soma.v.Spikecount"": 5.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": -0.053125000000000006, ""SearchHoldingCurrent.soma.v.voltage_base"": -83.0598896226535, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 171.29380609396492, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.052856673215615144}","{""IDRest_150.soma.v.mean_frequency"": 2.914042160061596, ""IDRest_150.soma.v.AP_amplitude"": 8.218021231090244, ""IDRest_200.soma.v.mean_frequency"": 3.967194126949174, ""IDRest_200.soma.v.AP_amplitude"": 8.110260994601823, ""IDRest_280.soma.v.mean_frequency"": 5.864553073536399, ""IDRest_280.soma.v.AP_amplitude"": 8.07447641082471, ""RMPProtocol.soma.v.voltage_base"": 1.5378611263832909, ""RMPProtocol.soma.v.Spikecount"": 250.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": 0.09375, ""SearchHoldingCurrent.soma.v.voltage_base"": 0.059889622653500396, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 3.287061939060351, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.8571334643123028}",
generic,MOp@right,PYR,L5_TPC:A,hashed/d6/a9/d6a9976c7588ae0111f17f28e39a1e6d,EXC,right,hoc:generic_model,5,1.0,1.0,6291.256509715739,1139.1852640664094,6812.970413610967,"[[1. 0. 0.]
[0. 0. 1.]]",generic_model,"{""popt"": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}","{""soma_radius"": 10.0, ""soma_surface"": 1167.714655051592}",,"{""IDRest_150.soma.v.mean_frequency"": 17.570535563419252, ""IDRest_150.soma.v.AP_amplitude"": 55.39737419147699, ""IDRest_200.soma.v.mean_frequency"": 24.347355606626557, ""IDRest_200.soma.v.AP_amplitude"": 55.783184825944716, ""IDRest_280.soma.v.mean_frequency"": 32.55285600443829, ""IDRest_280.soma.v.AP_amplitude"": 55.9149320756509, ""RMPProtocol.soma.v.voltage_base"": -70.28549140927481, ""RMPProtocol.soma.v.Spikecount"": 5.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": -0.053125000000000006, ""SearchHoldingCurrent.soma.v.voltage_base"": -83.00777720496266, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 169.91847638730917, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.046635434877685934}","{""IDRest_150.soma.v.mean_frequency"": 1.285267781709626, ""IDRest_150.soma.v.AP_amplitude"": 7.301312904261504, ""IDRest_200.soma.v.mean_frequency"": 2.1736778033132786, ""IDRest_200.soma.v.AP_amplitude"": 7.108407587027645, ""IDRest_280.soma.v.mean_frequency"": 3.776428002219145, ""IDRest_280.soma.v.AP_amplitude"": 7.0425339621745495, ""RMPProtocol.soma.v.voltage_base"": 1.3429017181450376, ""RMPProtocol.soma.v.Spikecount"": 250.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": 0.09375, ""SearchHoldingCurrent.soma.v.voltage_base"": 0.007777204962664541, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 3.3008152361269083, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.7327086975537186}",
PYR,L5_TPC:A,hashed/d6/a9/d6a9976c7588ae0111f17f28e39a1e6d,hoc:generic_model,MOp@right,EXC,5,right,generic,1.1,1.1,6291.256509715739,1139.1852640664094,6812.970413610967,"[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]",generic_model,"{""popt"": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}","{""soma_radius"": 10.0, ""soma_surface"": 1167.714655051592}",,"{""IDRest_150.soma.v.mean_frequency"": 18.211250505846717, ""IDRest_150.soma.v.AP_amplitude"": 51.5181063546671, ""IDRest_200.soma.v.mean_frequency"": 25.946536478752243, ""IDRest_200.soma.v.AP_amplitude"": 51.814606368747036, ""IDRest_280.soma.v.mean_frequency"": 35.25901817191464, ""IDRest_280.soma.v.AP_amplitude"": 51.92412071915578, ""RMPProtocol.soma.v.voltage_base"": -76.82035872240675, ""RMPProtocol.soma.v.Spikecount"": 6.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": -0.06796875000000001, ""SearchHoldingCurrent.soma.v.voltage_base"": -83.01598241401135, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 149.80419034227666, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.05688690378340191}","{""IDRest_150.soma.v.mean_frequency"": 1.6056252529233586, ""IDRest_150.soma.v.AP_amplitude"": 9.240946822666452, ""IDRest_200.soma.v.mean_frequency"": 2.9732682393761216, ""IDRest_200.soma.v.AP_amplitude"": 9.092696815626486, ""IDRest_280.soma.v.mean_frequency"": 5.12950908595732, ""IDRest_280.soma.v.AP_amplitude"": 9.037939640422106, ""RMPProtocol.soma.v.voltage_base"": 0.030766, ""RMPProtocol.soma.v.Spikecount"": 250.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": 0.0640625, ""SearchHoldingCurrent.soma.v.voltage_base"": 0.015982414011347146, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 3.501958096577233, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.9377380756680381}",
[0. 0. 1.]]",generic_model,"{""popt"": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}","{""soma_radius"": 10.0, ""soma_surface"": 1167.714655051592}",,"{""IDRest_150.soma.v.mean_frequency"": 19.51974691636182, ""IDRest_150.soma.v.AP_amplitude"": 53.64663901095507, ""IDRest_200.soma.v.mean_frequency"": 26.99191929412969, ""IDRest_200.soma.v.AP_amplitude"": 53.955235597646244, ""IDRest_280.soma.v.mean_frequency"": 36.01800900445903, ""IDRest_280.soma.v.AP_amplitude"": 54.06750345591785, ""RMPProtocol.soma.v.voltage_base"": -78.16946608707919, ""RMPProtocol.soma.v.Spikecount"": 6.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": -0.06875, ""SearchHoldingCurrent.soma.v.voltage_base"": -83.09902934622046, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 147.51245669415312, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.060956196156172524}","{""IDRest_150.soma.v.mean_frequency"": 2.259873458180911, ""IDRest_150.soma.v.AP_amplitude"": 8.176680494522463, ""IDRest_200.soma.v.mean_frequency"": 3.4959596470648453, ""IDRest_200.soma.v.AP_amplitude"": 8.022382201176882, ""IDRest_280.soma.v.mean_frequency"": 5.509004502229516, ""IDRest_280.soma.v.AP_amplitude"": 7.96624827204107, ""RMPProtocol.soma.v.voltage_base"": 0.2338932174158373, ""RMPProtocol.soma.v.Spikecount"": 250.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": 0.0625, ""SearchHoldingCurrent.soma.v.voltage_base"": 0.09902934622046189, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 3.524875433058469, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 1.0191239231234503}",
10 changes: 5 additions & 5 deletions tests/data/evaluation_df.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mtype,etype,model_template,morph_class,synapse_class,layer,region,hemisphere,morphology,x,y,z,orientation,emodel,ais_model,soma_model,exception,features,scores,trace_data
L5_TPC:A,generic,hoc:generic_model,PYR,EXC,5,MOs@right,right,hashed/be/fb/befbcea89657fdd07ae181b977b9e320,3887.062211566772,1924.0204607290975,6775.602532718369,"[[1. 0. 0.]
morph_class,mtype,morphology,model_template,region,synapse_class,layer,hemisphere,etype,x,y,z,orientation,emodel,exception,features,scores,trace_data
PYR,L5_TPC:A,hashed/be/fb/befbcea89657fdd07ae181b977b9e320,hoc:generic_model,MOs@right,EXC,5,right,generic,3887.062211566772,1924.0204607290975,6775.602532718369,"[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]",generic_model,"{""popt"": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}","{""soma_radius"": 10.0, ""soma_surface"": 1167.714655051592}",,"{""IDRest_150.soma.v.mean_frequency"": 17.01809022989483, ""IDRest_150.soma.v.AP_amplitude"": 57.74731715766996, ""IDRest_200.soma.v.mean_frequency"": 24.038862828210206, ""IDRest_200.soma.v.AP_amplitude"": 58.078713635979184, ""IDRest_280.soma.v.mean_frequency"": 32.58766421123901, ""IDRest_280.soma.v.AP_amplitude"": 58.245488451959865, ""RMPProtocol.soma.v.voltage_base"": -66.35232862203746, ""RMPProtocol.soma.v.Spikecount"": 5.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": -0.051562500000000004, ""SearchHoldingCurrent.soma.v.voltage_base"": -82.94181734045071, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 179.45614761441178, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.043736971847982836}","{""IDRest_150.soma.v.mean_frequency"": 1.0090451149474156, ""IDRest_150.soma.v.AP_amplitude"": 6.126341421165019, ""IDRest_200.soma.v.mean_frequency"": 2.019431414105103, ""IDRest_200.soma.v.AP_amplitude"": 5.960643182010407, ""IDRest_280.soma.v.mean_frequency"": 3.7938321056195043, ""IDRest_280.soma.v.AP_amplitude"": 5.877255774020064, ""RMPProtocol.soma.v.voltage_base"": 2.1295342755925075, ""RMPProtocol.soma.v.Spikecount"": 250.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": 0.096875, ""SearchHoldingCurrent.soma.v.voltage_base"": 0.058182659549288473, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 3.2054385238558827, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.6747394369596567}",
L5_TPC:A,generic,hoc:generic_model,PYR,EXC,5,MOp@right,right,hashed/d6/a9/d6a9976c7588ae0111f17f28e39a1e6d,6291.256509715739,1139.1852640664094,6812.970413610967,"[[1. 0. 0.]
[0. 0. 1.]]",generic_model,,"{""IDRest_150.soma.v.mean_frequency"": 17.01809022989483, ""IDRest_150.soma.v.AP_amplitude"": 57.74731715766996, ""IDRest_200.soma.v.mean_frequency"": 24.038862828210206, ""IDRest_200.soma.v.AP_amplitude"": 58.078713635979184, ""IDRest_280.soma.v.mean_frequency"": 32.58766421123901, ""IDRest_280.soma.v.AP_amplitude"": 58.245488451959865, ""RMPProtocol.soma.v.voltage_base"": -66.35232862203746, ""RMPProtocol.soma.v.Spikecount"": 5.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": -0.051562500000000004, ""SearchHoldingCurrent.soma.v.voltage_base"": -82.94169679712304, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 179.45614761441178, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.043736971847982836}","{""IDRest_150.soma.v.mean_frequency"": 1.0090451149474156, ""IDRest_150.soma.v.AP_amplitude"": 6.126341421165019, ""IDRest_200.soma.v.mean_frequency"": 2.019431414105103, ""IDRest_200.soma.v.AP_amplitude"": 5.960643182010407, ""IDRest_280.soma.v.mean_frequency"": 3.7938321056195043, ""IDRest_280.soma.v.AP_amplitude"": 5.877255774020064, ""RMPProtocol.soma.v.voltage_base"": 2.1295342755925075, ""RMPProtocol.soma.v.Spikecount"": 250.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": 0.096875, ""SearchHoldingCurrent.soma.v.voltage_base"": 0.05830320287695656, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 3.2054385238558827, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.6747394369596567}",
PYR,L5_TPC:A,hashed/d6/a9/d6a9976c7588ae0111f17f28e39a1e6d,hoc:generic_model,MOp@right,EXC,5,right,generic,6291.256509715739,1139.1852640664094,6812.970413610967,"[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]",generic_model,"{""popt"": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]}","{""soma_radius"": 10.0, ""soma_surface"": 1167.714655051592}",,"{""IDRest_150.soma.v.mean_frequency"": 21.307672480429662, ""IDRest_150.soma.v.AP_amplitude"": 51.276480916739004, ""IDRest_200.soma.v.mean_frequency"": 30.406432649716162, ""IDRest_200.soma.v.AP_amplitude"": 51.25679986852141, ""IDRest_280.soma.v.mean_frequency"": 41.679271284949614, ""IDRest_280.soma.v.AP_amplitude"": 50.94403679026918, ""RMPProtocol.soma.v.voltage_base"": -72.26510227533872, ""RMPProtocol.soma.v.Spikecount"": 6.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": -0.06718750000000001, ""SearchHoldingCurrent.soma.v.voltage_base"": -83.08857871429298, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 155.80389971422335, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.059734491885581026}","{""IDRest_150.soma.v.mean_frequency"": 3.153836240214831, ""IDRest_150.soma.v.AP_amplitude"": 9.361759541630494, ""IDRest_200.soma.v.mean_frequency"": 5.203216324858081, ""IDRest_200.soma.v.AP_amplitude"": 9.37160006573929, ""IDRest_280.soma.v.mean_frequency"": 8.339635642474807, ""IDRest_280.soma.v.AP_amplitude"": 9.52798160486541, ""RMPProtocol.soma.v.voltage_base"": 0.9469795449322561, ""RMPProtocol.soma.v.Spikecount"": 250.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": 0.06562499999999999, ""SearchHoldingCurrent.soma.v.voltage_base"": 0.08857871429297859, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 3.4419610028577665, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.9946898377116205}",
[0. 0. 1.]]",generic_model,,"{""IDRest_150.soma.v.mean_frequency"": 21.307672480429662, ""IDRest_150.soma.v.AP_amplitude"": 51.276480916739004, ""IDRest_200.soma.v.mean_frequency"": 30.406432649716162, ""IDRest_200.soma.v.AP_amplitude"": 51.25679986852141, ""IDRest_280.soma.v.mean_frequency"": 41.679271284949614, ""IDRest_280.soma.v.AP_amplitude"": 50.94403679026918, ""RMPProtocol.soma.v.voltage_base"": -72.26510227533872, ""RMPProtocol.soma.v.Spikecount"": 6.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": -0.06718750000000001, ""SearchHoldingCurrent.soma.v.voltage_base"": -83.08653117477492, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 155.80389971422335, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.059734491885581026}","{""IDRest_150.soma.v.mean_frequency"": 3.153836240214831, ""IDRest_150.soma.v.AP_amplitude"": 9.361759541630494, ""IDRest_200.soma.v.mean_frequency"": 5.203216324858081, ""IDRest_200.soma.v.AP_amplitude"": 9.37160006573929, ""IDRest_280.soma.v.mean_frequency"": 8.339635642474807, ""IDRest_280.soma.v.AP_amplitude"": 9.52798160486541, ""RMPProtocol.soma.v.voltage_base"": 0.9469795449322561, ""RMPProtocol.soma.v.Spikecount"": 250.0, ""SearchHoldingCurrent.soma.v.bpo_holding_current"": 0.06562499999999999, ""SearchHoldingCurrent.soma.v.voltage_base"": 0.0865311747749189, ""RinProtocol.soma.v.ohmic_input_resistance_vb_ssse"": 3.4419610028577665, ""SearchThresholdCurrent.soma.v.bpo_threshold_current"": 0.9946898377116205}",
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_compute_currents(cli_runner, tmpdir):


def test_evaluate(cli_runner, tmpdir):
"""Tetst cli evaluate."""
"""Test cli evaluate."""
# fmt: off
response = cli_runner.invoke(
tested.cli,
Expand Down
8 changes: 4 additions & 4 deletions tests/test_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def test_feature_evaluation(morphs_combos_df, access_point):
"IDRest_280.soma.v.AP_amplitude": 0.4711507560288358,
"RMPProtocol.soma.v.voltage_base": 0.33131119446020707,
"RMPProtocol.soma.v.Spikecount": 0.0,
"SearchHoldingCurrent.soma.v.bpo_holding_current": 0.18281250000000002,
"SearchHoldingCurrent.soma.v.voltage_base": 0.043970045446585004,
"SearchHoldingCurrent.soma.v.bpo_holding_current": 0.1828125,
"SearchHoldingCurrent.soma.v.voltage_base": 0.038499,
"RinProtocol.soma.v.ohmic_input_resistance_vb_ssse": 0.17312024013731503,
"SearchThresholdCurrent.soma.v.bpo_threshold_current": 0.10935385147499851,
}
Expand Down Expand Up @@ -84,7 +84,7 @@ def test_evaluate_soma_rin(morphs_combos_df, access_point):
def test_evaluate_ais_rin(morphs_combos_df, access_point):
""" """
df = evaluation.evaluate_ais_rin(morphs_combos_df, access_point)
assert_allclose(df.loc[0, "rin_ais"], 90942.204436, rtol=1e-5)
assert_allclose(df.loc[0, "rin_ais"], 131668.995389, rtol=1e-5)


def test_evaluate_somadend_rin(morphs_combos_df, access_point):
Expand All @@ -102,4 +102,4 @@ def test_evaluate_rho(morphs_combos_df, access_point):
def test_evaluate_rho_axon(morphs_combos_df, access_point):
""" """
df = evaluation.evaluate_rho_axon(morphs_combos_df, access_point)
assert_allclose(df.loc[0, "rho_axon"], 168.681031, rtol=1e-5)
assert_allclose(df.loc[0, "rho_axon"], 244.221723, rtol=1e-5)

0 comments on commit 402f793

Please sign in to comment.