The options, flow, and program objects attempt to allow the simplicity of simple programs that perform a single operation, with the advantage of a shared parameter space. A SEP.opt_base.options is an extension of the SEP.args.basic class. It has several additional abilities:
The SEP.opt_base.options is currently inherited by four classes. The SEP.opt_none.options is for a group of options that aren't associated with a job. The prep_run and clean_files routines are by default empty. The SEP.opt_prog.options is for a set of options associated with a serial code. The prep_run function executes the code with the parameters associated with the object. The final two children, SEP.par_job.par_job and SEP.solv_base.solver, are discussed later.
The SEP.flow.flow object is a collection of parameter groups and flows. In the migration example we might have the velocity selection and migration as independent programs, where each has a parameter group associated with them. The angle gathers might be a flow composed of transposing the data and then creating the angle gathers. The SEP.opt_flow.flow object is initialized with a set of flows, a set of parameter groups, the order in which to run them, and potentially prefixes associated with the individual flows and parameter groups. The prefixes argument is a dictionary linking a given parameter group or flow to the prefix that all of its parameters will be initialized with.
The flow object has two basic functions: add_options and prep_run. The first function takes in a set of parameters args and runs read_params(args,prefix). It then runs build_check_params on each parameter group and flow.
The prep_run call in a flow prep_run and clean_files parameter groups and flows. It is also regulated by a SEP.stat_sep.status object that allows that job to be restarted.
The final object, SEP.prog.prog inherits from the flow object. In addition, it has the concept of description and usage blocks for documentation, and by default uses the command line arguments when parsing parameters.