You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running neurodesign, the process fails with the following error:
C:\Users\User\anaconda3\lib\site-packages\neurodesign\neurodesign.py:561: RuntimeWarning: divide by zero encountered in log
s = np.array(s)
This corresponds to the spm_Gpdf function. In this, the line
res = (h - 1) * np.log(s) + h * np.log(l) - l * s - np.log(gamma(h))
appears to be trying to calculate the log of zero as the first value of the variable s is 0. s is generated in the canonical function from the line
s = np.array(range(int(np.ceil(p[6] / dt)))).
It is not clear why this behaviour occurs since it doesn't appear to be a problem for anyone else. I've altered the code slightly to make it compatible with python3, but there isn't an obvious link between those changes and this behaviour.
The input used was:
TR = 2.0,
n_trials = 200,
P = [0.5, 0.5],
C = [[1.0, 0.0], [0.0, 1.0], [-0.5, 0.5], [0.5, -0.5], [1.0, 0.0], [0.0, 1.0], [0.5, -0.5]],
duration = None,
n_stimuli = 2,
rho = 0.3,
stim_duration = 2.0,
restnum = 40,
restdur = 20.0,
ITImodel = 'uniform',
ITImin = 2.0,
ITImean = 3.0,
ITImax = 4.0,
confoundorder = 10,
maxrep = 10,
hardprob = False,
t_pre = 1.0,
t_post = 1.0,
)```
These values were obtained through the neurodesign web tool.
Any clues to what might be the problem would be appreciated!
The text was updated successfully, but these errors were encountered:
When running neurodesign, the process fails with the following error:
This corresponds to the
spm_Gpdf
function. In this, the lineres = (h - 1) * np.log(s) + h * np.log(l) - l * s - np.log(gamma(h))
appears to be trying to calculate the log of zero as the first value of the variable
s
is 0.s
is generated in thecanonical
function from the lines = np.array(range(int(np.ceil(p[6] / dt))))
.It is not clear why this behaviour occurs since it doesn't appear to be a problem for anyone else. I've altered the code slightly to make it compatible with python3, but there isn't an obvious link between those changes and this behaviour.
The input used was:
The text was updated successfully, but these errors were encountered: