API Documentation#

mne_bids#

mne_bids:

MNE software for easily interacting with BIDS compatible datasets.

write_raw_bids(raw, bids_path[, events, ...])

Save raw data to a BIDS-compliant folder structure.

read_raw_bids(bids_path[, extra_params, verbose])

Read BIDS compatible data.

write_meg_calibration(calibration, bids_path, *)

Write the Elekta/Neuromag/MEGIN fine-calibration matrix to disk.

write_meg_crosstalk(fname, bids_path[, verbose])

Write the Elekta/Neuromag/MEGIN crosstalk information to disk.

BIDSPath([subject, session, task, ...])

A BIDS path object.

make_dataset_description(*, path, name[, ...])

Create a dataset_description.json file for a BIDS dataset.

make_report(root[, session, verbose])

Create a methods paragraph string from BIDS dataset.

write_anat(image, bids_path[, landmarks, ...])

Put anatomical MRI data into a BIDS format.

mark_channels(bids_path, *, ch_names, status)

Update status and description of channels in an existing BIDS dataset.

get_anat_landmarks(image, info, trans, ...)

Get anatomical landmarks in MRI voxel coordinates.

update_anat_landmarks(bids_path, landmarks, *)

Update the anatomical landmark coordinates of an MRI scan.

get_head_mri_trans(bids_path[, ...])

Produce transformation matrix from MEG and MRI landmark points.

convert_montage_to_mri(montage, subject[, ...])

Convert a montage from scanner RAS (m) to surface RAS (m).

convert_montage_to_ras(montage, subject[, ...])

Convert a montage from surface RAS (m) to scanner RAS (m).

template_to_head(info, space[, coord_frame, ...])

Transform a BIDS standard template montage to the head coordinate frame.

get_anonymization_daysback(raws[, verbose])

Get the group min and max number of daysback necessary for BIDS specs.

search_folder_for_text(entry, folder[, ...])

Find any particular string entry in the text files of a folder.

print_dir_tree(folder[, max_depth, return_str])

Recursively print a directory tree.

get_bids_path_from_fname(fname[, check, verbose])

Retrieve a BIDSPath object from a filename.

get_entities_from_fname(fname[, on_error, ...])

Retrieve a dictionary of BIDS entities from a filename.

get_entity_vals(root, entity_key, *[, ...])

Get list of values associated with an entity_key in a BIDS dataset.

get_datatypes(root[, verbose])

Get list of data types ("modalities") present in a BIDS dataset.

inspect_dataset(bids_path[, find_flat, ...])

Inspect and annotate BIDS raw data.

update_sidecar_json(bids_path, entries[, ...])

Update sidecar files using a dictionary or JSON file.

anonymize_dataset(bids_root_in, bids_root_out)

Anonymize a BIDS dataset.

find_matching_paths(root[, subjects, ...])

Get list of all matching paths for all matching entity values.

mne_bids.stats#

mne_bids.stats:

Some functions to extract stats from a BIDS dataset.

count_events(root_or_path[, datatype])

Count events present in dataset.

mne_bids.copyfiles#

mne_bids.copyfiles:

Utility functions to copy raw data files.

When writing BIDS datasets, we often move and/or rename raw data files. several original data formats have properties that restrict such operations. That is, moving/renaming raw data files naively might lead to broken files, for example due to internal pointers that are not being updated.

copyfile_brainvision(vhdr_src, vhdr_dest[, ...])

Copy a BrainVision file triplet to a new location and repair links.

copyfile_edf(src, dest[, anonymize])

Copy an EDF, EDF+, or BDF file to a new location, optionally anonymize.

copyfile_eeglab(src, dest)

Copy an EEGLAB file to a new location.

copyfile_ctf(src, dest)

Copy and rename CTF files to a new location.

copyfile_bti(raw, dest)

Copy BTi data.

copyfile_kit(src, dest, subject_id, ...)

Copy and rename KIT files to a new location.