Skip to content

Commit

Permalink
Add onset to results
Browse files Browse the repository at this point in the history
  • Loading branch information
adelavega committed Nov 9, 2022
1 parent 42faf0c commit b924099
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pliers/extractors/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def _get_timing(self, out, stim):
durations: durations of the output
orders: order of the output
"""
return None, None, None

return stim.onset, stim.duration, None

def _extract(self, stim):
inp = self._preprocess(stim)
Expand Down Expand Up @@ -213,7 +214,10 @@ def _get_timing(self, out, stim):
"""

durations = [stim.duration / out.shape[0]] * out.shape[0]
onsets = np.arange(0, stim.duration, durations[0]).tolist()
onsets = np.arange(0, stim.duration, durations[0])
if stim.onset is not None:
onsets += stim.onset
onsets = onsets.tolist()
orders = range(0, len(onsets))

return onsets, durations, orders
Expand Down

0 comments on commit b924099

Please sign in to comment.