Hi Randy,
yes, the Analysis/External plugin can start a Python script repeatedly *during* a simulation. For an example model (starting awk scripts repeatedly) please see
https://identifiers.org/morpheus/M0007.
Please also see the GUI's Documentation panel at MorpheusML/Analysis/External, this has three Python examples and offers to "execute shell command periodically or at the end of simulation, e.g. to perform analysis using external command line tools...Use "%" (percentage) to provide global symbols as arguments in the script. For instance the substring "%time" will be replaced with the symbol "time", the current simulation time...The attribute "detach" lets you run the process in the background while continuing simulation. Note that "timeout" with default 30sec is the maximum time the command may run after the simulation finished."
The attribute "time-step" controls when the script is started and you may test inside the script if other conditions for its execution are fulfilled.
To send more simulation data (than few global symbols) to the script, you need to first write the data to file with a Logger. The script could then run at the same time step after the Logger (as in
https://identifiers.org/morpheus/M0007). A proper Python API and documentation thereof remain work in progress.
Best,
Lutz