Skip to content
Snippets Groups Projects
Commit a6ec3da0 authored by Francesco Tripaldi's avatar Francesco Tripaldi
Browse files

Add bpm_samples attribute

parent 6929de6d
No related branches found
No related tags found
No related merge requests found
......@@ -37,15 +37,16 @@ def main():
try:
while str(selfseq_dev.State()) == 'RUNNING':
bpm_samples = selfseq_dev.read_attribute("bpm_samples").value
turns_diff = 198*2*100*int(selfseq_dev.read_attribute("delta_time_198x2x100xn").value)
selfseq_dev.write_attribute("extraction_delay_on_shake",starting_time + turns_diff)
posx = np.mean(bpm_dev.command_inout('GetHorPos',[0,2]))
posx = np.mean(bpm_dev.command_inout('GetHorPos',[0,bpm_samples]))
timing_dev.write_attribute("ExtractionDelay", starting_time + turns_diff)
time.sleep(interval)
deltax = np.mean(bpm_dev.command_inout('GetHorPos',[0,2])) - posx
deltax = np.mean(bpm_dev.command_inout('GetHorPos',[0,bpm_samples])) - posx
timing_dev.write_attribute("ExtractionDelay", starting_time)
......@@ -56,8 +57,8 @@ def main():
except Exception as e:
timing_dev.write_attribute("ExtractionDelay", starting_time)
selfseq_dev.write_attribute("ScriptErr", str(e))
finally
timing_dev.write_attribute("ExtractionDelay", starting_time)
if __name__ == '__main__':
main()
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