DDFBinaryMetadata (Deprecated)#

Deprecated since version Use: RecordingMetadata instead. DDFBinaryMetadata is maintained only for backward compatibility and will be removed in a future version.

class neurodent.core.DDFBinaryMetadata(*args, **kwargs)[source]#

Bases: RecordingMetadata

Deprecated: Use RecordingMetadata instead.

This class is maintained for backward compatibility but will be removed in a future version. The name DDFBinaryMetadata is no longer appropriate as the pipeline moves beyond DDF binary files with metadata sidecars.

__init__(*args, **kwargs)[source]#

Initialize RecordingMetadata either from a file path or direct parameters.

Parameters:
  • metadata_path (str | Path | None) – Path to metadata CSV file. If provided, other parameters are ignored and metadata is loaded from the file.

  • n_channels (int, optional) – Number of channels in the recording

  • f_s (float, optional) – Sampling frequency in Hz

  • dt_end (datetime, optional) – End datetime of recording

  • channel_names (list[str], optional) – List of channel names

  • V_units (str, optional) – Voltage units (e.g., ‘µV’, ‘mV’, ‘V’)

  • mult_to_uV (float, optional) – Multiplication factor to convert to microvolts

Raises:

ValueError – If metadata_path is None and required parameters are missing

classmethod from_dict(data: dict) RecordingMetadata#

Create RecordingMetadata from a dictionary (from JSON deserialization).

classmethod from_json(file_path: Path) RecordingMetadata#

Load RecordingMetadata from a JSON file.

to_dict() dict#

Convert RecordingMetadata to a dictionary for JSON serialization.

to_json(file_path: Path) None#

Save RecordingMetadata to a JSON file.

update_sampling_rate(new_f_s: float) None#

Update the sampling rate in this metadata object.

This should be called when the associated recording is resampled.