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,
    ext: str | None[str, None] = None,
    timestamp: float | None[float, None] = None,
    progress: Literal[‘standard’, ‘basic’, None] = standard,
)-> ‘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.
ext : str or None The extensions to map.
timestamp : int or float Time stamp indicating the minimum mtime.
progress The type of progress bar to use. None disables progress bar and
“basic” is best for low latency scenarios. Can also acceted a single
callable that takes a generator as its ownly argument.

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)