Skip to content

Commit

Permalink
Included Robert's fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Dec 4, 2024
1 parent e101e45 commit bd07eac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion snudda/synaptic_fitting/optimise_synapses_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,12 @@ def setup_model(self,
if n_synapses_override is not None:
n_synapses = n_synapses_override
else:
n_synapses = c_prop["num_synapses"]
if "num_synapses" in c_prop:
n_synapses = c_prop["num_synapses"]
elif 'nSynapses' in c_prop:
n_synapses = c_prop['nSynapses']
else:
raise Exception('Setup error: number of synapses not no specified in setup file (which ever that is?)')

if "holding_current" in c_prop:
holding_current = c_prop["holding_current"]
Expand Down
8 changes: 4 additions & 4 deletions snudda/synaptic_fitting/run_little_synapse_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def __init__(self,
# Remove VClamp
self.v_clamp = None

self.i_clamp = neuron.h.i_clamp(self.soma(0.5))
self.i_clamp = neuron.h.IClamp(self.soma(0.5))
self.i_clamp.amp = cur # nA
self.i_clamp.dur = 2 * self.time * 1e3

Expand Down Expand Up @@ -248,9 +248,9 @@ def run(self, tau, tau_r, tau_f, u, cond=None, time=None):
# Convert from SI units to natural units that Neuron uses
self.nc_syn.weight[0] = 1 * cond * 1e6
self.little_synapse.tau = tau * 1e3
self.little_synapse.tau_r = tau_r * 1e3
self.little_synapse.tau_f = tau_f * 1e3
self.little_synapse.u = u
self.little_synapse.tauR = tau_r * 1e3
self.little_synapse.tauF = tau_f * 1e3
self.little_synapse.U = u

# print(self.littleSynapse.tau)

Expand Down

0 comments on commit bd07eac

Please sign in to comment.