spool

function of dascore.core.spool source

spool(
    obj: str | pathlib._local.Path | upath.core.UPath | dascore.core.spool.Spool | collections.abc.Sequence[str, Path, UPath, Spool, collections.abc.Sequence[Patch]] ,
    **kwargs ,
)-> ‘Spool’

Create a spool from a data source.

This is the main function for loading in DASCore.

Parameters

Parameter Description
obj An object from which a spool can be derived.

Examples

import dascore as dc

# Get a spool from a single file. An examples:// name refers to a
# file in DASCore's example data registry; use your own path here.
file_spool = dc.spool("examples://example_dasdae_event_1.h5")

# get a spool from a directory of files
directory_path = dc.examples.spool_to_directory(dc.get_example_spool())
directory_spool = dc.spool(directory_path)

# get a spool from a single patch
patch = dc.get_example_patch()
spool = dc.spool(patch)