hnn-core
hnn-core copied to clipboard
Event random seed smaller than 0
Not sure if my understanding is correct. But if one loads drives from the parameter file default.json
, since we have
"prng_seedcore_input_prox": 2,
"prng_seedcore_input_dist": 2,
"prng_seedcore_extpois": 2,
"prng_seedcore_extgauss": 2,
"prng_seedcore_evprox_1": 2,
"prng_seedcore_evdist_1": 2,
"prng_seedcore_evprox_2": 2,
"prng_seedcore_evdist_2": 0,
and in params.py
we have
https://github.com/jonescompneurolab/hnn-core/blob/bab819687e40c866c7c1130e1aad3ab86124d3fe/hnn_core/params.py#L223
If we run Network(params, add_drives_from_params=True)
and before
https://github.com/jonescompneurolab/hnn-core/blob/bab819687e40c866c7c1130e1aad3ab86124d3fe/hnn_core/drives.py#L135
we insert
print(specs['type'], drive_name, specs['event_seed'])
the output will be
it seems that the corresponding resulting event_seed
could be -16 and thus cause errors in running simulation as the seed is smaller than 0
uffff ... @rythorpe I need your help here :-)
These values are set this way to maintain consistency with our previous "ground truth" default current dipole simulation. After these values get summed with the trial index and cell's GID (specifically for cell-specific, non-synchronous drives), the seed value that gets passed to the random number generator should be positive.
but now the seeds are determined by the cell's GID minus the GID of the first cell of that cell type. Is this still relevant in that case?
Oh yes, I had forgotten about that. We updated the event_seed
values in add_erp_drives_to_jones_model()
; however, I'm guessing that we forgot to update them in default.json
and _extract_drive_specs_from_hnn_params()
.