View source: R/pipeline-bidsify.R
bidsify | R Documentation |
This method provides a structured way to save out pupil data in a BIDS-like structure. The method saves out epoched data as well as the raw pupil timeseries, and formats the directory and filename structures based on the metadata you provide.
bidsify(
eyeris,
save_all = TRUE,
epochs_list = NULL,
merge_epochs = FALSE,
bids_dir = NULL,
participant_id = NULL,
session_num = NULL,
task_name = NULL,
run_num = NULL,
merge_runs = FALSE,
save_raw = TRUE,
html_report = TRUE,
report_seed = 0,
report_epoch_grouping_var_col = "matched_event",
verbose = TRUE,
pdf_report = deprecated()
)
eyeris |
An object of class |
save_all |
Logical flag indicating whether all epochs are to be saved
or only a subset of them. Defaults to |
epochs_list |
List of epochs to be saved. Defaults to |
merge_epochs |
Logical flag indicating whether epochs should be saved
as one file or as separate files. Defaults to |
bids_dir |
Base bids_directory. Defaults to |
participant_id |
BIDS subject ID. Defaults to |
session_num |
BIDS session ID. Defaults to |
task_name |
BIDS task ID. Defaults to |
run_num |
BIDS run ID. Optional override for the run number when there's
only one block of data present in a given |
merge_runs |
Logical flag indicating whether multiple runs (either
from multiple recording blocks existing within the same |
save_raw |
Logical flag indicating whether to save_raw pupil data in
addition to epoched data. Defaults to |
html_report |
Logical flag indicating whether to save out the |
report_seed |
Random seed for the plots that will appear in the report
Defaults to |
report_epoch_grouping_var_col |
String name of grouping column to use
for epoch-by-epoch diagnostic plots in an interactive rendered HTML report.
Column name must exist (i.e., be a custom grouping variable name set within
the metadata template of your |
verbose |
A flag to indicate whether to print detailed logging messages.
Defaults to |
pdf_report |
(Deprecated) Use |
In the future, we intend for this function to save out the data in an official BIDS format for eyetracking data (see the proposal currently under review here). At this time, however, this function instead takes a more BIDS-inspired approach to organizing the output files for preprocessed pupil data.
Invisibly returns NULL
. Called for its side effects
lifecycle::deprecate_warn()
# Bleed around blink periods just long enough to remove majority of
# deflections due to eyelid movements
demo_data <- eyelink_asc_demo_dataset()
# example with unepoched data
demo_data |>
eyeris::glassbox() |>
eyeris::bidsify(
bids_dir = tempdir(), # <- MAKE SURE TO UPDATE TO YOUR DESIRED LOCAL PATH
participant_id = "001",
session_num = "01",
task_name = "assocret",
run_num = "01",
save_raw = TRUE, # save out raw timeseries
html_report = TRUE, # generate interactive report document
report_seed = 0 # make randomly selected plot epochs reproducible
)
# example with epoched data
demo_data |>
eyeris::glassbox() |>
eyeris::epoch(
events = "PROBE_{type}_{trial}",
limits = c(-1, 1), # grab 1 second prior to and 1 second post event
label = "prePostProbe" # custom epoch label name
) |>
eyeris::bidsify(
bids_dir = tempdir(), # <- MAKE SURE TO UPDATE TO YOUR DESIRED LOCAL PATH
participant_id = "001",
session_num = "01",
task_name = "assocret",
run_num = "01"
)
# example with run_num for single block data
demo_data <- eyelink_asc_demo_dataset()
demo_data |>
eyeris::glassbox() |>
eyeris::epoch(
events = "PROBE_{type}_{trial}",
limits = c(-1, 1),
label = "prePostProbe"
) |>
eyeris::bidsify(
bids_dir = tempdir(),
participant_id = "001",
session_num = "01",
task_name = "assocret",
run_num = "03" # override default run-01 (block_1) to use run-03 instead
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.