Commit 614e2c06 authored by Claudio Scafuri's avatar Claudio Scafuri 💬
Browse files

some further tests ok

parent fba0dab5
......@@ -44,13 +44,11 @@ class delay_shifter_calc(object):
@return: delay compensation in [ps]
@raise ValueError: if one of the two wavelenghts is out of range
'''
#print 'get_compensation_delay iw :',initial_wavelength,' fw :',final_wavelength,self._lambda_min,self._lambda_max
# print 'get_compensation_delay iw :',initial_wavelength,' fw :',final_wavelength,self._lambda_min,self._lambda_max
if initial_wavelength < self._lambda_min or initial_wavelength > self._lambda_max:
raise ValueError('initial wavelength out of range')
if final_wavelength < self._lambda_min or final_wavelength > self._lambda_max:
raise ValueError('final wavelength out of range')
#dly_i = self._cal(initial_wavelength)
#dly_f = self._cal(final_wavelength)
dly_i = self._cal(numpy.array([initial_wavelength]))
dly_f = self._cal(numpy.array([final_wavelength]))
retval = (dly_f - dly_i).item(0)
......
......@@ -80,7 +80,6 @@ class harmoncalc(object):
while go_up and feasible:
lmin = self.lopa_min / float(hnlow)
lmax = self.lopa_max / float(hnlow)
#lmin_next = self.lopa_min / (hnlow + 1)
lmax_next = self.lopa_max / (hnlow + 1)
if (lfel <= lmax and lfel >= lmin) or hnlow == (self.hmax - 1):
go_up = False
......@@ -96,7 +95,6 @@ class harmoncalc(object):
while go_down and feasible:
lmin = self.lopa_min / hnhigh
lmax = self.lopa_max / hnhigh
#lmin_next = self.lopa_min / (hnhigh - 1)
lmax_next = self.lopa_max / (hnhigh - 1)
if (lfel <= lmax and lfel >= lmin) or hnhigh == (self.hmin + 1):
go_down = False
......
......@@ -235,7 +235,6 @@ class opathread(threading.Thread):
if self.master.delay_line2:
dly2 = self.master.delay_line2.read_attribute('Position').value
self.master.info_stream('step 5 (237): delay: %f comp: %f' % (dly, delaycomp))
# newdelay[0] = dly + delaycomp
newdelay = dly + delaycomp
self.master.info_stream('step 5 (240): newdelay: %f' % (newdelay))
# self.master.info_stream('step 5 (555): newdelay: %f' % (newdelay[0]))
......
......@@ -14,8 +14,8 @@ delay_line = tango.DeviceProxy('sl/motor/trls_sl.04')
delay_line2 = tango.DeviceProxy('sl/motor/trls_sl.08')
lStart = 240.0
lStop = 265.0
lStart = 238.0
lStop = 268.0
lopa = lStart
lStep = 1.0
......@@ -24,7 +24,7 @@ steps = arange(lStart,lStop, lStep).tolist()
lmb0 = 256.5 # initial OPA wavelnght (simulated)
tsleep = .1 # time t wait for nex setting
tsleep = 6 # time t wait for nex setting
# simulate the increasing lambda
print ('lmb newdelay newdelay2 delay_line delay_line2 delta delta2')
for lmb in steps:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment