Skip to content
Snippets Groups Projects
example_template.py 1012 B
Newer Older
# Usage Example

from enstools.feature.pipeline import FeaturePipeline
from enstools.feature.identification.template import IdentificationTemplate
from enstools.feature.tracking.template_object_compare import TrackingCompareTemplate
from enstools.feature.tracking.template import TrackingTemplate
import os

pipeline = FeaturePipeline()

# change this to an identification technique that actually does something: existing one or implement your own
i_strat = IdentificationTemplate(some_parameter='foo') # TODO change here
t_strat = TrackingTemplate()

pipeline.set_identification_strategy(i_strat)
pipeline.set_tracking_strategy(t_strat) # or None as argument if no tracking

path = "/home/muffin/phd/data/tracked/S2S_test/plot_test.nc" # None # TODO set data path(s) here
pipeline.set_data_path(path)

pipeline.execute()

out_json_path = path + '.json' # TODO set path to out-json, and also if needed out-netcdf
pipeline.save_result(description_type='json', description_path=out_json_path, dataset_path=None)