File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ prng_seedcore_extgauss: 4
1818prng_seedcore_evprox_1: 4
1919prng_seedcore_evdist_1: 4
2020prng_seedcore_evprox_2: 4
21+ prng_seedcore_evdist_2: 0
2122L2Pyr_soma_L: 22.1
2223L2Pyr_soma_diam: 23.4
2324L2Pyr_soma_cm: 0.6195
You can’t perform that action at this time.
0 commit comments