yasa.Hypnogram.from_json#
- classmethod Hypnogram.from_json(fname)[source]#
Load a
Hypnogramfrom a JSON file saved withto_json.All metadata is restored: epoch duration, start datetime (including timezone), scorer name, and stage probabilities (if present).
This method delegates to
from_dictfor deserialization.Added in version 0.7.0.
- Parameters:
- fnamestr or path-like
Path to the JSON file.
- Returns:
- hyp
Hypnogram The loaded Hypnogram.
- hyp