Implement the PostProcess Adaptation
You can go through the introduction here: Post Processor
Create the script mentioned in the
chimera_config.yaml
file under thepostprocessor.module_path
.In the script, declare the subclass mentioned in the
chimera_config.yaml
file under thepostprocessor.class_name
Start with the following code snippet:
from chimera.postprocess_functions import PostProcessFunctions class NisarPostProcessFunctions(PostProcessFunctions): def __init__(self, context, pge_config, settings, psuedo_context): PostProcessFunctions.__init__(self, context, pge_config, settings, psuedo_context)
The variables you have available throughout this subclass are:
Context - contents of
_context.json
of the SciFlo job. You can access it asself._context
in the precondition functionsPGE’s configuration - contents of the respective PGE’s configuration file. Can be accessed as
self._pge_config
Settings file - content of
settings.yaml file
accessible asself._settings
Psuedo context - This is a the runconfig that the PGE job needs to run with. It can be accessed as
self._
psuedo_context
You can add any functions to this class that you want to run in addition to the nominal functionality of constructing a psuedo context to pass on to the next PGE’s (if any) Input preprocessor.
This is the place where you can implement functions to report accountability of job runs or any other post PGE run task required by your project.