pnpl.preprocessing.fif_to_h5

Contents

pnpl.preprocessing.fif_to_h5#

pnpl.preprocessing.fif_to_h5(raw, output_path, dtype=<class 'numpy.float32'>, chunk_size=50, compression=None, compression_opts=4)[source]#

Convert MNE Raw data to H5 format.

Creates an H5 file with structure: - data: (channels, time) - MEG data - times: (time,) - Time vector - Attributes: sample_frequency, highpass_cutoff, lowpass_cutoff,

channel_names, channel_types

Parameters:
  • raw (mne.io.Raw) – MNE Raw object (preprocessed)

  • output_path (str) – Output H5 file path

  • dtype (dtype) – Data type for storage (default: float32)

  • chunk_size (int) – Chunk size for H5 datasets

  • compression (str | None) – Compression algorithm (‘gzip’ or None)

  • compression_opts (int) – Compression level (1-9)

Returns:

Path to created H5 file

Return type:

str