DDFBinaryMetadata#
- class neurodent.core.DDFBinaryMetadata(metadata_path: str | Path | None, *, n_channels: int | None = None, f_s: float | None = None, dt_end: datetime | None = None, channel_names: list[str] | None = None, V_units: str | None = None, mult_to_uV: float | None = None) None[source]#
Bases:
object- Parameters:
metadata_path (str | Path | None)
n_channels (int | None)
f_s (float | None)
dt_end (datetime | None)
channel_names (list[str] | None)
V_units (str | None)
mult_to_uV (float | None)
- __init__(metadata_path: str | Path | None, *, n_channels: int | None = None, f_s: float | None = None, dt_end: datetime | None = None, channel_names: list[str] | None = None, V_units: str | None = None, mult_to_uV: float | None = None) None[source]#
Initialize DDFBinaryMetadata either from a file path or direct parameters.
- Parameters:
metadata_path (
str, optional) – Path to metadata CSV file. If provided, other parameters are ignored.n_channels (
int, optional) – Number of channelsf_s (
float, optional) – Sampling frequency in Hzdt_end (
datetime, optional) – End datetime of recordingchannel_names (
list, optional) – List of channel namesV_units (
str, optional) – Voltage units (e.g., ‘µV’, ‘mV’, ‘V’)mult_to_uV (
float, optional) – Multiplication factor to convert to microvolts
- Return type:
None
- to_dict() dict[source]#
Convert DDFBinaryMetadata to a dictionary for JSON serialization.
- Return type:
dict
- classmethod from_dict(data: dict) DDFBinaryMetadata[source]#
Create DDFBinaryMetadata from a dictionary (from JSON deserialization).
- Return type:
- Parameters:
data (dict)
- to_json(file_path: Path) None[source]#
Save DDFBinaryMetadata to a JSON file.
- Return type:
None- Parameters:
file_path (Path)
- classmethod from_json(file_path: Path) DDFBinaryMetadata[source]#
Load DDFBinaryMetadata from a JSON file.
- Return type:
- Parameters:
file_path (Path)