-
-
Notifications
You must be signed in to change notification settings - Fork 6
Description
When I set a quad strength to a bad setting Pytao crashes:
python test2.py
Traceback (most recent call last):
File "/Users/vahidranjbar/Develop/RCS/RCS_2/RCS_DougH/May2024Lat/test2.py", line 17, in
error = tao.cmd("set element QF0 K1=.6")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vahidranjbar/miniconda3/lib/python3.11/site-packages/pytao/tao_ctypes/core.py", line 146, in cmd
raise RuntimeError(f"Command: {cmd} causes error: {err}")
RuntimeError: Command: set element QF0 K1=.6 causes error: ERROR detected: [ERROR | 2024-JUL-05 21:19:25] closed_orbit_calc:
PARTICLE LOST IN TRACKING!!
ABORTING CLOSED ORBIT SEARCH.
TRACKING BRANCH: 0:RING
This is the python script:
from pytao import Tao
import numpy
import sys
import time
import math
import subprocess
import os
from subprocess import Popen, PIPE
load_lattice ='-lat rcsl4s1-wig_henry.bmad -noplot'
tao=Tao(load_lattice)
#names = tao.ele_gen_attribs('k1')
#print(names[0:105])
#gammaT =float(names[42].split()[1]))
error = tao.cmd("set element QF0 K1=.6")
names = tao.cmd("show universe")
print(error)
print(names)