From 2cf6867712a1a4744c1ba2185e275cb4d36f5084 Mon Sep 17 00:00:00 2001 From: gcroci2 Date: Fri, 10 May 2024 14:57:42 +0200 Subject: [PATCH] remove value variable --- annubes/task.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/annubes/task.py b/annubes/task.py index 8f8accc..c5d4af1 100644 --- a/annubes/task.py +++ b/annubes/task.py @@ -471,13 +471,9 @@ def _build_trials_inputs(self) -> NDArray[np.float64]: dtype=np.float32, ) for idx, mod in enumerate(self._modalities): - value = ( - self._rng.choice(self.stim_intensities, 1) - if (self._modality_seq[n] != "X" and self._modality_seq[n] == mod) - else 0 - ) + if self._modality_seq[n] != "X" and self._modality_seq[n] == mod: + x[n][self._phases[n]["input"], idx] = self._rng.choice(self.stim_intensities, 1) x[n][self._phases[n]["fix_time"], idx] = self.fix_intensity - x[n][self._phases[n]["input"], idx] = value x[n][self._phases[n]["input"], self._n_inputs - 1] = 1 # start cue # add noise x[n] += noise_factor * self._rng.normal(loc=0, scale=1, size=x[n].shape)