eegdash.corpus_recipes#

The recipes a corpus can be converted with, all defined here.

A Recipe is every number the conversion applies to the signal. It has no default values: a recipe is written out in full below, added to RECIPES, and from there written into each converted part, so a store can be checked against the recipe it claims:

python -m eegdash.corpus_recipes      # every recipe, as JSON

The rules that give a channel its position (the position bank, the cap templates, the alignment of a dataset’s electrodes.tsv) live in eegdash.corpus_convert; a change to them is a new version of the recipes that use them.

Functions

get_recipe(recipe)

A Recipe, by name or as given.

main()

Print every recipe as JSON.

Classes

Recipe(name, version, sfreq, l_freq, h_freq, ...)

The preprocessing a part was converted with; written into every part.

class eegdash.corpus_recipes.Recipe(name: str, version: int, sfreq: int, l_freq: float, h_freq: float, h_freq_max_ratio: float, resample_method: str, window: int, min_channels: int, units: str, refused: frozenset[str])[source]

Bases: object

The preprocessing a part was converted with; written into every part.

Parameters:
  • name (str, int) – What a store is checked against before parts are merged into it.

  • version (str, int) – What a store is checked against before parts are merged into it.

  • sfreq (int) – Sampling rate of the samples, Hz. A slower recording is skipped.

  • l_freq (float) – Band-pass edges, Hz.

  • h_freq (float) – Band-pass edges, Hz.

  • h_freq_max_ratio (float) – The upper edge is lowered to this fraction of a recording’s own rate when that is below h_freq.

  • resample_method (str) – The method of mne.io.Raw.resample.

  • window (int) – Timesteps per sample. A recording of window timesteps or fewer after resampling is skipped.

  • min_channels (int) – A recording with fewer channels of known position is skipped.

  • units (str) – Unit of the stored signal.

  • refused (frozenset of str) – Dataset ids never converted: the benchmark’s own sources.

name: str
version: int
sfreq: int
l_freq: float
h_freq: float
h_freq_max_ratio: float
resample_method: str
window: int
min_channels: int
units: str
refused: frozenset[str]
refuses(dataset_id: str) → bool[source]

Whether dataset_id, or the same dataset under its other archive id, is refused.

to_dict() → dict[str, Any][source]

The recipe as JSON-ready values.

eegdash.corpus_recipes.get_recipe(recipe: str | Recipe) → Recipe[source]

A Recipe, by name or as given.

eegdash.corpus_recipes.main() → int[source]

Print every recipe as JSON.