Skip to content

Commit

Permalink
remove value variable
Browse files Browse the repository at this point in the history
  • Loading branch information
gcroci2 committed May 10, 2024
1 parent 6d800ab commit 2cf6867
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions annubes/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2cf6867

Please sign in to comment.