matlab identification code
This commit is contained in:
@@ -27,7 +27,6 @@ import matplotlib as mpl
|
||||
#mpl.use('GTKAgg')
|
||||
import matplotlib.pyplot as plt
|
||||
from scipy import signal
|
||||
from utilities import *
|
||||
|
||||
sys.path.insert(0,os.path.expanduser('~/Documents/prj/SwissFEL/PBTools/'))
|
||||
#import pbtools.misc.pp_comm as pp_comm -> pp_comm.PPComm
|
||||
@@ -231,6 +230,13 @@ Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
|
||||
fig=plt.figure(mot)
|
||||
tune.bode_current(motor=mot, magMove=1000, magPhase=500, dwell=10, file=fn,fig=fig)
|
||||
plt.show(block=False)
|
||||
f=np.load(fn)
|
||||
fn=fn[:-3]+'mat'
|
||||
import scipy.io
|
||||
scipy.io.savemat(fn, mdict=f)
|
||||
print('save to matlab file:'+fn)
|
||||
|
||||
|
||||
elif mode==2: # full recording open loop
|
||||
for mot in (1, 2):
|
||||
fsin=os.path.join(base, 'sine_ol_mot%d.npz' % (mot))
|
||||
|
||||
Reference in New Issue
Block a user