Workflow Automation documentation

Experiment API reference

Process and Figure arguments, file routing and independent-group partitioning in sigclear-experiment 1.2.0.

Use this reference

Start with the Experiment package guide. These API details describe version 1.2.0. Execution profiles are documented in Execution and HPC setup.

Process definition

Transform source datasets into targets

Process(target, source, flow,
    nodes=None, ngroup=None, split="sgwindow --hist=ignore ",
    cat=None, src_split=None, *, chunks=1, resources=None,
    **options)

A Process defines one or more targets, their sources, and the Program flow that performs the transformation. Targets depend on the sources, Programs and parameters in the definition, so only affected Processes are rerun after a change.

By default, dataset names are resolved under data/ with the .sg suffix.

Use keyword arguments for optional settings. nodes is retained only for compatibility checking and must stay None; host dictionaries are no longer accepted.

Quality control

Generate dependency-aware Figures

Figure(target, sources, flow, **options)

When the source dataset has the same base name as the target, use the shorter form:

Figure(target, flow, **options)

Figure is a specialized Process for visual quality-control output. Its defaults accept SIGCLEAR datasets from data/, produce PostScript output, and suppress processing verbosity. PDF, PNG, GIF and JPEG targets are converted automatically from the generated PostScript stream.

Configuration

Common Process and Figure options

OptionProcess defaultFigure defaultPurpose
sprefixdata/data/Source path prefix
tprefixdata/data/Target path prefix
ssuffix.sg.sgSource suffix
tsuffix.sg.psTarget suffix
verbTrueFalseProgram verbosity
stdinTrueTruePass the first source through standard input
stdoutTrueTrueWrite standard output to the first target
chunks1Not applicableNumber of independent group partitions; one leaves the flow unpartitioned
ngroupNoneNot applicableDetect input group count when partitioning; optionally supply a known positive count
resourcesNoneNoneInherit the selected profile's per-action resources; override only when this action needs different resources

Scheduling

Choose parallelism that fits the experiment

LevelWork unitControl
ProgramThreads within a parallel-capable Program on one node--nthread, consistent with the action's CPU request
Within a ProcessIndependent ranges of SOIG groupsExplicit chunks; automatic ngroup=None
WorkflowDependency-ready Processes and chunk actionsProfile defaults, resource limits and optional scons -j N

Profiles do not partition datasets automatically. First validate the serial workflow, then opt into chunks only when each group can be processed independently:

Process('scaled', 'raw',
    'sgfieldmath data="2*data"', chunks=4)

This example requires at least four input groups and scales each group's data independently. The group count is detected after the input is built; missing count metadata requires an extra read pass. A known positive ngroup can avoid that scan. Chunk results are kept for ordered merging and incremental reuse.

Chunks share the workflow's job pool and resource budget; four chunks do not request four nodes or guarantee four concurrent actions. Each chunk's pipeline runs on one node. Global fits, cross-group filters and reductions need a scientifically valid split/merge design before partitioning. An explicit -j overrides the default job limit while resource and policy limits still apply.

When upgrading from earlier packages, replace host dictionaries with profiles and explicit chunks where appropriate. Legacy rsh, SGNODES and Python config.py node settings are no longer used.