scan

function of dascore.io.core source

scan(
    path: Path | str | Patch | BaseSpool | IOResourceManager ,
    file_format: str | None[str, None] = None,
    file_version: str | None[str, None] = None,
)-> ‘list[dc.PatchAttrs]’

Scan a potential patch source, return a list of PatchAttrs.

Parameters

Parameter Description
path A resource containing Fiber data.
file_format Format of the file. If not provided DASCore will try to determine it.
Only applicable for path-like inputs.
file_version Version of the file. If not provided DASCore will try to determine it.
Only applicable for path-like inputs.

Returns

A list of PatchAttrs or subclasses which may have extra fields.

Examples

import dascore as dc
from dascore.utils.downloader import fetch

file_path = fetch("prodml_2.1.h5")

attr_list = dc.scan(file_path)