Skip to content

Commit

Permalink
Updated code
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Oct 28, 2024
1 parent 089d4fe commit 71df2f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/parallel/KTH_PDC/VBT_kir_scan/simulate_kir_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ def simulate(network_path, output_path, kir_factor=1.0, time=1.0):
# Next we need to reduce kir by a factor
print("Reduce the KIR channel conductance in SPN")

print(f"Before: {sim.neurons[0].icell.soma[0](0.5).kir_ms.gbar = }")
if 0 in sim.neurons and "SPN" in sim.neurons[0].name:
print(f"Before: {sim.neurons[0].icell.soma[0](0.5).kir_ms.gbar = }")

for sec in sim.sim.neuron.h.allsec():
for seg in sec:
if sim.sim.neuron.h.ismembrane("kir_ms", sec=sec):
# Scale the conductance parameter for each segment
seg.kir_ms.gbar *= kir_factor


print(f"After: {sim.neurons[0].icell.soma[0](0.5).kir_ms.gbar = }")

if 0 in sim.neurons and "SPN" in sim.neurons[0].name:
print(f"After: {sim.neurons[0].icell.soma[0](0.5).kir_ms.gbar = }")

sim.run(t=time*1e3)
sim.write_output()
Expand Down

0 comments on commit 71df2f8

Please sign in to comment.