function of dascore.core.spool source

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

Create a spool from a data source.

This is the main function for loading in DASCore.


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


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

# Get a spool from a single file
single_file_path = fetch("example_dasdae_event_1.h5")
file_spool = dc.spool(single_file_path)

# get a spool from a directory of files
directory_path = fetch("example_dasdae_event_1.h5").parent
directory_spool = dc.spool(directory_path)

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