40 script test to simulate a closed loop
43 closed_loop.py <parameters_filename> [options]
45 with 'parameters_filename' the path to the parameters file
48 -h --help Show this help message and exit
49 --brahma Distribute data with brahma
50 --bench For a timed call
51 -i --interactive keep the script interactive
52 -d --devices devices Specify the devices
53 -n --niter niter Number of iterations
54 -g --generic Use generic controller
55 -f --fast Compute PSF only during monitoring
58 from docopt
import docopt
60 if __name__ ==
"__main__":
61 arguments = docopt(__doc__)
63 param_file = arguments[
"<parameters_filename>"]
64 compute_tar_psf =
not arguments[
"--fast"]
69 if arguments[
"--bench"]:
71 elif arguments[
"--brahma"]:
76 if arguments[
"--devices"]:
77 config.p_loop.set_devices([
78 int(device)
for device
in arguments[
"--devices"].
split(
",")
81 if arguments[
"--generic"]:
82 config.p_controllers[0].set_type(
"generic")
83 print(
"Using GENERIC controller...")
85 if arguments[
"--niter"]:
86 config.p_loop.set_niter(int(arguments[
"--niter"]))
88 supervisor = Supervisor(config)
90 supervisor.loop(supervisor.config.p_loop.niter, compute_tar_psf=compute_tar_psf)
92 if arguments[
"--interactive"]:
94 from os.path
import basename
95 embed(basename(__file__), locals())
Shesha parameters configuration class.
void split(std::vector< std::string > &tokens, const std::string &text, char sep)
Parameter classes for COMPASS.
Initialization and execution of a Bench supervisor.
Initialization and execution of a CANAPASS supervisor.
Initialization and execution of a COMPASS supervisor.