Wherever the current working directory is move to ~/cerebmodels.

[1]:
!pwd
/home/main-dev/cerebtests/docs/notebooks
[3]:
cd ..
/home/main-dev/cerebtests/docs
[4]:
cd ..
/home/main-dev/cerebtests
[5]:
cd ..
/home/main-dev
[6]:
cd cerebmodels/
/home/main-dev/cerebmodels

1. Load executive control

[9]:
from executive import ExecutiveControl as ec
[10]:
#ec.list_modelscales()
#ec.list_models( modelscale="cells" )
exc = ec()

1.1. Load desired model

[11]:
%%capture
desired_model = ec.choose_model( modelscale="cells", modelname="PC2003Khaliq" )

2. Load dataset

[12]:
import requests
import json
[13]:
datasetlink = "https://raw.githubusercontent.com/cerebunit/cerebdata/master/expdata/cells/PurkinjeCell/Llinas_Sugimori_1980_soma_restVm.json"
[14]:
dataset = json.loads( requests.get(datasetlink).text )

3. Load desired validation test

[15]:
from cerebunit.validation_tests.cells.Purkinje import SomaRestingVmTest as srvt

3.1. Instantiate test class

[16]:
vtest = srvt(dataset)
Validate Observation ...
Validated.
/envs/py3-cerebmodels/lib/python3.5/site-packages/scipy/stats/stats.py:1450: UserWarning: kurtosistest only valid for n>=20 ... continuing anyway, n=10
  "anyway, n=%i" % int(n))

3.2. Run validation test

[17]:
test_statistic = vtest.judge(desired_model)
Testing ...
Sim produce_soma v_restingVm starting ...
Simulation produce_voltage_response starting ...
--- 0.11563400000000001 seconds ---
File saving ...
File saved.
Simulation produce_voltage_response Done.
--- 0.19566200000000045 seconds ---
/envs/py3-cerebmodels/lib/python3.5/site-packages/pynwb/file.py:619: UserWarning: Date is missing timezone information. Updating to local timezone.
  warn("Date is missing timezone information. Updating to local timezone.")
Simulation produce_soma v_restingVm Done.
--- 3.605861 seconds ---
Computing score ...
Done.
eta0 = -63.99954201896992 mV, eta = -66.5 mV, n = 10
H0: eta = eta0
Ha: eta =/= eta0
Test statistic: z = 2.5298221281347035
Assuming H0 is true, p-value = 0.011412036386001651
[ ]: