nirspipe.pipeline.chromophores#

The chromophores an analysis writes, and HbT, made from the HbO-HbR pair where an analysis reads it.

Module Contents#

Functions#

in_order

The chosen chromophores once each, in the order hbo, hbr, hbt.

chroma_of

The chromophore a channel’s name ends with: “S1_D1 hbt” -> “hbt”.

hbt_names

The HbT channel of every pair both of whose halves are listed: “S1_D1 hbo”, “S1_D1 hbr” -> “S1_D1 hbt”.

hbt_of

HbO + HbR of each pair as one channel “<pair> hbt”, typed hbo as MNE has no HbT type, bad where either half is.

chroma_channels

A copy of raw holding one chromophore’s channels, HbT made from the pair.

with_hbt

A copy of raw with hbt_of() added when chromophores holds hbt, else raw itself; never written to a file.

Data#

API#

nirspipe.pipeline.chromophores.CHROMOPHORES = ('hbo', 'hbr', 'hbt')#
nirspipe.pipeline.chromophores.DEFAULT_CHROMOPHORES = ('hbo', 'hbr')#
nirspipe.pipeline.chromophores.in_order(chosen: Iterable[str]) → tuple[str, ...]#

The chosen chromophores once each, in the order hbo, hbr, hbt.

nirspipe.pipeline.chromophores.chroma_of(ch_name: str) → str#

The chromophore a channel’s name ends with: “S1_D1 hbt” -> “hbt”.

nirspipe.pipeline.chromophores.hbt_names(names: Iterable[str]) → list[str]#

The HbT channel of every pair both of whose halves are listed: “S1_D1 hbo”, “S1_D1 hbr” -> “S1_D1 hbt”.

nirspipe.pipeline.chromophores.hbt_of(raw: mne.io.BaseRaw) → mne.io.BaseRaw#

HbO + HbR of each pair as one channel “<pair> hbt”, typed hbo as MNE has no HbT type, bad where either half is.

nirspipe.pipeline.chromophores.chroma_channels(raw: mne.io.BaseRaw, chroma: str) → mne.io.BaseRaw#

A copy of raw holding one chromophore’s channels, HbT made from the pair.

nirspipe.pipeline.chromophores.with_hbt(raw: mne.io.BaseRaw, chromophores: Iterable[str]) → mne.io.BaseRaw#

A copy of raw with hbt_of() added when chromophores holds hbt, else raw itself; never written to a file.