diff --git a/README.md b/README.md index bdd8196..6f3c4d0 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/bids/generate_task_description_files.py b/bids/generate_task_description_files.py index 2aac671..b32e077 100644 --- a/bids/generate_task_description_files.py +++ b/bids/generate_task_description_files.py @@ -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."), }, }, } diff --git a/config.yml b/config.yml index 82bc8a2..ad1bdac 100644 --- a/config.yml +++ b/config.yml @@ -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 diff --git a/fLoc.py b/fLoc.py index b31060b..fc6dca2 100644 --- a/fLoc.py +++ b/fLoc.py @@ -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 @@ -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