API Documentation

mne_bids

mne_bids:

MNE software for easily interacting with BIDS compatible datasets.

write_raw_bids(raw, bids_path[, …])

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 json for a dataset description.

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_bad_channels(ch_names[, descriptions, …])

Update which channels are marked as “bad” 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.

get_anonymization_daysback(raws)

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

print_dir_tree(folder[, max_depth, return_str])

Recursively print a directory tree.

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)

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.

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 a EEGLAB files to a new location and adjust pointer to ‘.fdt’ file.

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.