Skip to content

Commit

Permalink
update sonata-network with snapV2
Browse files Browse the repository at this point in the history
  • Loading branch information
anilbey committed Nov 30, 2023
1 parent d975564 commit af29fb9
Showing 1 changed file with 37 additions and 34 deletions.
71 changes: 37 additions & 34 deletions examples/2-sonata-network/sonata-network.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 37,
"metadata": {
"vscode": {
"languageId": "shellscript"
Expand All @@ -35,7 +35,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"/home/anil/git-repos/BlueCelluLab/examples/2-sonata-network\n",
"/home/anilbey/.virtualenvs/bluecellulab311/bin/nrnivmodl:10: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html\n",
" from pkg_resources import working_set\n",
"/home/anilbey/git-repos/BlueCelluLab/examples/2-sonata-network\n",
"Mod files: \"../mechanisms/../mechanisms/CaDynamics_DC0.mod\" \"../mechanisms/../mechanisms/CaDynamics_E2.mod\" \"../mechanisms/../mechanisms/Ca_HVA2.mod\" \"../mechanisms/../mechanisms/Ca_HVA.mod\" \"../mechanisms/../mechanisms/Ca_LVAst.mod\" \"../mechanisms/../mechanisms/Ca.mod\" \"../mechanisms/../mechanisms/DetAMPANMDA.mod\" \"../mechanisms/../mechanisms/DetGABAAB.mod\" \"../mechanisms/../mechanisms/gap.mod\" \"../mechanisms/../mechanisms/GluSynapse.mod\" \"../mechanisms/../mechanisms/Ih.mod\" \"../mechanisms/../mechanisms/Im.mod\" \"../mechanisms/../mechanisms/KdShu2007.mod\" \"../mechanisms/../mechanisms/K_Pst.mod\" \"../mechanisms/../mechanisms/K_Tst.mod\" \"../mechanisms/../mechanisms/Nap_Et2.mod\" \"../mechanisms/../mechanisms/NaTa_t.mod\" \"../mechanisms/../mechanisms/NaTg.mod\" \"../mechanisms/../mechanisms/NaTs2_t.mod\" \"../mechanisms/../mechanisms/netstim_inhpoisson.mod\" \"../mechanisms/../mechanisms/ProbAMPANMDA_EMS.mod\" \"../mechanisms/../mechanisms/ProbGABAAB_EMS.mod\" \"../mechanisms/../mechanisms/SK_E2.mod\" \"../mechanisms/../mechanisms/SKv3_1.mod\" \"../mechanisms/../mechanisms/StochKv3.mod\" \"../mechanisms/../mechanisms/StochKv.mod\" \"../mechanisms/../mechanisms/TTXDynamicsSwitch.mod\" \"../mechanisms/../mechanisms/VecStim.mod\"\n",
"\n",
" -> \u001b[32mCompiling\u001b[0m mod_func.cpp\n",
Expand All @@ -58,7 +60,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 38,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -84,7 +86,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": 39,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -101,7 +103,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": 40,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -119,7 +121,7 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": 41,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -195,7 +197,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 42,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -228,17 +230,9 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 43,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[32mNo Error: Success.\u001b[0m\n"
]
}
],
"outputs": [],
"source": [
"sim = SSim(simulation_config)"
]
Expand All @@ -253,16 +247,16 @@
},
{
"cell_type": "code",
"execution_count": 42,
"execution_count": 44,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[Hyperpolarizing(pattern=<Pattern.HYPERPOLARIZING: 'hyperpolarizing'>, target='Mosaic_A', delay=0.0, duration=4000.0)]"
"[Hyperpolarizing(target='Mosaic_A', delay=0.0, duration=4000.0)]"
]
},
"execution_count": 42,
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -274,16 +268,16 @@
},
{
"cell_type": "code",
"execution_count": 43,
"execution_count": 45,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Hyperpolarizing(pattern=<Pattern.HYPERPOLARIZING: 'hyperpolarizing'>, target='Mosaic_A', delay=0.0, duration=4000.0)"
"Hyperpolarizing(target='Mosaic_A', delay=0.0, duration=4000.0)"
]
},
"execution_count": 43,
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -307,7 +301,7 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": 46,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -324,7 +318,7 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 47,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -343,7 +337,16 @@
},
{
"cell_type": "code",
"execution_count": 46,
"execution_count": 51,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -535,13 +538,13 @@
"[3 rows x 21 columns]"
]
},
"execution_count": 46,
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"snap_access.circuit.nodes.get(\"Mosaic_A\")"
"pd.concat([x[1] for x in snap_access.circuit.nodes.get(\"Mosaic_A\")])"
]
},
{
Expand All @@ -560,7 +563,7 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 57,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -813,13 +816,13 @@
"[5 rows x 21 columns]"
]
},
"execution_count": 47,
"execution_count": 57,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"all_nodes = snap_access.circuit.nodes.get()\n",
"all_nodes = pd.concat([x[1] for x in snap_access.circuit.nodes.get()])\n",
"all_nodes"
]
},
Expand All @@ -833,7 +836,7 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": 58,
"metadata": {},
"outputs": [
{
Expand All @@ -842,7 +845,7 @@
"[('NodeA', 0), ('NodeA', 1), ('NodeB', 0), ('NodeB', 1)]"
]
},
"execution_count": 48,
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -854,7 +857,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 59,
"metadata": {},
"outputs": [],
"source": [
Expand Down

0 comments on commit af29fb9

Please sign in to comment.