neuralfetch.utils.bids.study_to_bids

neuralfetch.utils.bids.study_to_bids(study: Study, path: Path, device: str, task: str | None = None, anonymize: dict[str, Any] | None = None, overwrite: bool = False, infra_bids: MapInfra | None = None) Path[source][source]

Export a Neuralset Study to BIDS format.

Convenience wrapper around BidsExporter. Pass infra_bids to parallelise per-timeline writes across SLURM or local workers.

Currently supports neurophysiology modalities only: EEG, MEG, iEEG, EMG, and fNIRS. Neuroimaging modalities such as fMRI are not yet supported.

Parameters:
  • study – A neuralset Study instance.

  • path – Root directory for the BIDS output.

  • device – Neurophysiology recording type. Must be one of "Eeg", "Meg", "Ieeg", "Emg", or "Fnirs".

  • task – BIDS task label. If None, the "task" column in the events DataFrame is used.

  • anonymize – Follows the format of the anonymize parameter in mne_bids.write_raw_bids. Requires a daysback key. If None, no anonymization is performed.

  • overwrite – If True, overwrite existing BIDS files.

  • infra_bids – Optional compute/cache backend. If None, a local process pool is used. Pass exca.MapInfra(cluster="slurm", ...) to dispatch each timeline to a SLURM job.

Returns:

The BIDS root directory (path).

Return type:

Path