3 """Write (append) target parameter to file for YAO use for a single dm
6 file_name : (str) : name of the file to append the parameter to
8 tars : (list[Param_target]) : compass target parameters list
11 sub_system : (int) : (optional), default 1 yao sub system index
13 f=open(file_name,
"a+")
14 f.write(
"\n\n//------------------------------")
15 f.write(
"\n//TAR parameters")
16 f.write(
"\n//------------------------------")
18 f.write(
"\ntarget.lambda = &(" + np.array2string(np.array( \
19 [t.Lambda
for t
in tars]), separator=
',', max_line_width=300) + \
21 f.write(
"\ntarget.xposition = &(" + np.array2string(np.array(\
22 [t.xpos
for t
in tars]), separator=
',', max_line_width=300) + \
24 f.write(
"\ntarget.yposition = &(" + np.array2string(np.array( \
25 [t.ypos
for t
in tars]), separator=
',', max_line_width=300) + \
27 dispzoom = np.ones((len(tars)))
28 f.write(
"\ntarget.dispzoom = &(" + np.array2string(dispzoom, \
29 separator=
',',max_line_width=300) +
") ; // not set by compass")
def write_targets(file_name, tars, *sub_system=1)
Write (append) target parameter to file for YAO use for a single dm.