Skip to content

Commit 1cb8875

Browse files
committed
Add load params restrictions
1 parent 9924e86 commit 1cb8875

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

hnn_ui/hnn_geppetto.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def get_evoked_dict(self, cfg):
287287
Parameters
288288
----------
289289
cfg : dict
290-
the cfg dictionary
290+
the cfg SimConfig
291291
292292
Returns
293293
-------
@@ -316,9 +316,45 @@ def get_evoked_dict(self, cfg):
316316
else:
317317
cfg_dict[key] = {inner_key: getattr(cfg, att)}
318318

319+
return self.filter_evoked_dict(cfg_dict)
320+
321+
def filter_evoked_dict(self, cfg_dict):
322+
"""
323+
324+
Returns a dictionary of valid evoked inputs
325+
326+
Parameters
327+
----------
328+
cfg_dict : dict
329+
the cfg_dict dictionary
330+
331+
Returns
332+
-------
333+
dict
334+
Returns a dictionary of valid evoked inputs as follow:
335+
evdist_1:
336+
gbar_L2Basket_ampa: 0.001229
337+
gbar_L2Basket_nmda: 0.002043
338+
evprox_1:
339+
gbar_L2Basket_ampa: 0.001229
340+
gbar_L2Basket_nmda: 0.002043
341+
"""
342+
keys_to_delete = []
343+
for ev_input in cfg_dict:
344+
if 'evdist' in ev_input:
345+
if bool(DISTAL.keys() - cfg_dict[ev_input].keys()):
346+
keys_to_delete.append(ev_input)
347+
elif 'evprox' in ev_input:
348+
if bool(PROXIMAL.keys() - cfg_dict[ev_input].keys()):
349+
keys_to_delete.append(ev_input)
350+
351+
for key in keys_to_delete:
352+
del cfg_dict[key]
353+
319354
return cfg_dict
320355

321356
def getEvokedInputs(self):
357+
322358
"""
323359
324360
Creates a list of all the evoked inputs present in evoked_dict.

load_examples/ERPYes100Trials.param

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ prng_seedcore_extgauss: 4
1818
prng_seedcore_evprox_1: 4
1919
prng_seedcore_evdist_1: 4
2020
prng_seedcore_evprox_2: 4
21+
prng_seedcore_evdist_2: 0
2122
L2Pyr_soma_L: 22.1
2223
L2Pyr_soma_diam: 23.4
2324
L2Pyr_soma_cm: 0.6195

0 commit comments

Comments
 (0)