Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Nov 26, 2023
1 parent 17acaf7 commit e4aa38c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,20 @@ To keep participants focused on the task,
there is also a behavioral task that participants will perform throughout the localizer.
There are three options for this task: oddball, one-back, and two-back.

The task does not include any kind of jitter.

### Configuration

You should modify the configuration file (``config.yml``) based on the following elements:

1. The current configuration has 4-minute runs. The VPN lab recommends acquiring at least 4 runs.
2. The repetition time (TR) of fMRI data for the localizer experiment must be a factor of its miniblock duration (6 s by default).
The original paper used a TR of 2 seconds.
3. If you want, you can replace the VPN lab's stimuli with another set.
Each stimulus set *must* have a "baseline" category (for all tasks) and a "scrambled" category (for the oddball task).

### Differences from the original task

While we have attempted to maximize similarity between this task and the VPN lab's task,
there are differences.
I'm not sure what those differences are, unfortunately.
I'm not sure what those differences are, unfortunately, since I wrote this task a few years ago.
4 changes: 2 additions & 2 deletions bids/generate_task_description_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
'Also referred to as a "hit".'
),
"false_positive": (
"An incorrect button-press on a baseline trial. "
"An incorrect button-press on a baseline or category trial. "
'Also referred to as a "false alarm".'
),
"false_negative": (
"An incorrect non-press on a task target trial. "
'Also referred to as a "miss".'
),
"true_negative": ("A correct non-press on a baseline trial."),
"true_negative": ("A correct non-press on a baseline or category trial."),
},
},
}
Expand Down
20 changes: 10 additions & 10 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
constants:
# Countdown presented at the beginning of each run, in seconds
COUNTDOWN_DURATION: 12
# Final screen presented at the end of each run, in seconds
END_SCREEN_DURATION: 2
# Proportion of trials in which to do the task (default = 50%)
TASK_RATE: 0.5
# How long each stimulus is presented, in seconds
IMAGE_DURATION: 0.4
# Number of single-category blocks
N_BLOCKS: 36
# Number of stimuli per block
N_STIMULI_PER_BLOCK: 12
# Interstimulus interval. Trial duration is IMAGE_DURATION + TARGET_ISI.
TARGET_ISI: 0.1
# How long to wait after start of presentation of stimulus to accept response
RESPONSE_WINDOW: 1
# Interstimulus interval
TARGET_ISI: 0.1
# Proportion of trials in which to do the task
TASK_RATE: 0.5
# Number of stimuli per block
N_STIMULI_PER_BLOCK: 12
# Number of single-category blocks per run
N_BLOCKS: 36
# Final screen presented at the end of each run, in seconds
END_SCREEN_DURATION: 2
# Total run duration, in seconds
TOTAL_DURATION: 240
# The different sets of categories that determine which stimuli are used
Expand Down
4 changes: 3 additions & 1 deletion fLoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def allocate_responses(events_df, response_times, response_window=1.0):
# Looping backwards lets us keep earliest response for RT
for rt in response_times[::-1]:
if onset <= rt < next_onset:
# Ignore response window and use current trial's duration only
# Ignore response window and use current trial's duration only,
# since we really don't know which trial elicited the false positive.
events_df.loc[trial_idx, "accuracy"] = 0
events_df.loc[trial_idx, "classification"] = "false_positive"
events_df.loc[trial_idx, "response_time"] = rt - onset
Expand Down Expand Up @@ -393,6 +394,7 @@ def main(config):
]
stimuli[category] = stimulus_files
else:
# TODO: Support stimulus for baseline trials
stimuli[category] = None # baseline trials just have fixation

# Determine which trials will be task
Expand Down

0 comments on commit e4aa38c

Please sign in to comment.