ingest_pipeline
Classes:
Name | Description |
---|---|
IngestPipeline |
|
Classes#
IngestPipeline #
Bases: Pipeline
Pipeline class designed to read in raw, unstandardized time series data and enhance its quality and usability by converting it into a standard format, embedding metadata, applying quality checks and controls, generating reference plots, and saving the data in an accessible format so it can be used later in scientific analyses or in higher-level tsdat Pipelines.
Methods:
Name | Description |
---|---|
get_ancillary_filepath |
Returns the path to where an ancillary file should be saved so that it can be |
hook_customize_dataset |
|
hook_finalize_dataset |
|
hook_plot_dataset |
|
run |
|
Attributes:
Name | Type | Description |
---|---|---|
ds |
Optional[Dataset]
|
|
tmp_dir |
Optional[Path]
|
|
Attributes#
Functions#
get_ancillary_filepath #
Returns the path to where an ancillary file should be saved so that it can be synced to the storage area automatically.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title
|
str
|
The title to use for the plot filename. Should only contain alphanumeric and '_' characters. |
required |
extension
|
str
|
The file extension. Defaults to "png". |
'png'
|
Returns:
Name | Type | Description |
---|---|---|
Path |
Path
|
The ancillary filepath. |
Source code in tsdat/pipeline/pipelines/ingest_pipeline.py
hook_customize_dataset #
Code hook to customize the retrieved dataset prior to qc being applied.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset
|
Dataset
|
The output dataset structure returned by the retriever API. |
required |
Returns:
Type | Description |
---|---|
Dataset
|
xr.Dataset: The customized dataset. |
Source code in tsdat/pipeline/pipelines/ingest_pipeline.py
hook_finalize_dataset #
Code hook to finalize the dataset after qc is applied but before it is saved.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset
|
Dataset
|
The output dataset returned by the retriever API and
modified by the |
required |
Returns:
Type | Description |
---|---|
Dataset
|
xr.Dataset: The finalized dataset, ready to be saved. |
Source code in tsdat/pipeline/pipelines/ingest_pipeline.py
hook_plot_dataset #
Code hook to create plots for the data which runs after the dataset has been saved.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset
|
Dataset
|
The dataset to plot. |
required |