infer_source_software#
- movement.io.load.infer_source_software(file, **loader_kwargs)[source]#
Infer the
source_softwarefrom a given input file.Tries the file validators registered for each built-in loader and returns the name of the matching source software. If multiple candidates match (i.e. the file format is shared across software packages, as with DeepLabCut-style CSV files), a combined label is returned (e.g.
"DeepLabCut/LightningPose").- Parameters:
file (
Path|str|NWBFile) – Input file path or anpynwb.file.NWBFileobject.**loader_kwargs – Optional keyword arguments forwarded to file validators (when they accept additional parameters, e.g. VIA-tracks frame_regexp).
- Returns:
The inferred source software name.
- Return type:
TypeAliasType- Raises:
ValueError – If no registered validator matches the file or if multiple
source_softwarecandidates (beyond the expected DeepLabCut/LightningPose case) match the file.