-
Christoph.Fischer authoredChristoph.Fischer authored
pipeline.rst 3.75 KiB
Feature Pipeline
TODO: Workflow description here.
Usage Example
TODO
from enstools.feature import FeaturePipeline
from enstools.feature.identification.STRATEGY import SomeIdentification
from enstools.feature.tracking.STRATEGY import SomeTracking
# Configure suitable identification and tracking strategies
ident_tech = SomeIdentification(...)
track_tech = SomeTracking(...)
# Configure the feature pipeline: apply the strategies chosen above and
# provide an input dataset
pipeline = FeaturePipeline(processing_mode="2d")
pipeline.set_identification_strategy(ident_tech)
pipeline.set_tracking_strategy(track_tech) # omit or set to None if no tracking desired
pipeline.set_data_path("path/to/input/data.nc") # or directly provide a Dataset with set_data
# Run the identification and tracking on the data
pipeline.execute()
# TODO: output handling
Quickstart
Here is a usage example, if you want to apply existing strategies in the code base to your data set. First, we need some imports, namely the
- :py:class:`enstools.feature.pipeline.FeaturePipeline`, which executes the identification pipeline
- :py:class:`enstools.feature.identification.template.IdentificationTemplate`, this is the identification strategy, edit this accordingly
- :py:class:`enstools.feature.tracking.template.TrackingTemplate`, this is the tracking strategy, edit this accordingly
- :py:class:`enstools.feature._proto_gen.template_pb2`, this is the on run auto-generated protobuf python file from the set description. Use the one that matches your detection strategy. They are named *_pb2, where * is the name of the identification module.