Small utility module that returns mpacts ‘gates’ from dictionary that specify the gate’s name

In order to be able to use this module import it like this:

#or assign it to a shorter name
import as gat, top_parent)

Given a dictionary with arguments (passed e.g. to a particle container command), will return an mpacts gate (CommandGateBase) with the appropriate gate parameters

  • namedict – Dictionary containing ‘types’ of gate and their properties. Accepted are: ‘executeOnce’, ‘executeEvery’, ‘executeInterval’ and ‘executeTimes’.
  • top_parent – Parent level object (e.g. the simulation itself), which is used to extract e.g. timestep information for certain gate types., cmd, top_parent)

From a dictionary, produces an mpacts gate (see get_gate() for information) and sets it to a given command (cmd)