scan_payloads

function of dascore.io.core source

scan_payloads(
    path: str | pathlib._local.Path | upath.core.UPath | dascore.core.patch_meta.PatchMeta | dascore.core.spool.Spool | dascore.utils.io.IOResourceManager | collections.abc.Iterable[str, Path, UPath, PatchMeta, Spool, IOResourceManager, collections.abc.Iterable[str | pathlib._local.Path | upath.core.UPath | dascore.core.patch_meta.PatchMeta | dascore.utils.io.IOResourceManager[str, Path, UPath, PatchMeta, 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, False] | Progress = standard,
    snap: bool | str | collections.abc.Collection[bool, str, collections.abc.Collection[str], None] = None,
)-> ‘list[dc.PatchMeta]’

Scan a potential patch source and return full coordinate payloads.

Parameters

Parameter Description
path A resource containing fiber data.
file_format File format. DASCore detects it when omitted. Only applies to path-like inputs.
file_version File version. DASCore detects it when omitted. Only applies to path-like inputs.
ext The extensions to map.
timestamp Minimum modification time.
progress The type of progress bar to use. None disables the progress bar.
snap The dimensions whose stored labels come back on a grid. None (the
default) snaps the names the format’s reader defaults to, shown in
its get_metadata signature; True every one-dimensional numeric or
time-like dimension; False none, returning every coordinate exactly
as stored; a name or tuple of names those dimensions, raising if a
patch has no such dimension. Where a stored label sits more than
dascore.config.max_shift steps off its grid, a reader keeps the
labels as stored and warns, naming the file. See rule 3 of the
coordinate guidelines.

Returns

A list of PatchMeta objects with full coordinate managers, dtype, and private source provenance.

Note

Scan payloads retain real coordinate arrays and can use substantially more memory than scan summaries. Prefer scanning specific files and discard payloads promptly when probing many resources.