Commit d067a616 authored by bliss administrator's avatar bliss administrator
Browse files

Correction of a bug due to merge of pcotomo and tomo

parent 56b55d88
......@@ -312,8 +312,8 @@ class Tomo(TomoParameters):
self.sequence = "tomo:basic"
self.field_of_view = "Full"
self.active_tomo = self.fasttomo
self.active_tomo.tomo_scan.acc_margin = config["rotation"].get("acc_margin", 0.0)
self.active_tomo.tomo_scan.use_step_size = config["rotation"].get("use_step_size", False)
self.acc_margin = config["rotation"].get("acc_margin", 0.0)
self.use_step_size = config["rotation"].get("use_step_size", False)
self.scan_motors = [self.rotation_axis]
self.in_pars = {}
......@@ -1511,7 +1511,7 @@ class Tomo(TomoParameters):
if self.pcotomo.parameters.mode == "consecutive":
self.pcotomo.parameters.noread = 1
elif self.pcotomo.parameters.mode == "multiple":
self.pcotomo.parameters.noread = 0
self.pcotomo.parameters.noread = 1
elif self.pcotomo.parameters.mode == "endless":
self.pcotomo.parameters.noread = 0
else:
......
......@@ -192,9 +192,9 @@ class TomoScan:
# create the acquisition chain
chain = AcquisitionChain()
acc_margin = self.acc_margin
acc_margin = self.tomo.acc_margin
if self.use_step_size:
if self.tomo.use_step_size:
# undershoot start margin is added to be sure motor will reach scan speed
acc_margin = abs(scan_step_size)
......@@ -298,9 +298,9 @@ class TomoScan:
# create the acquisition chain
chain = AcquisitionChain()
acc_margin = self.acc_margin
acc_margin = self.tomo.acc_margin
if self.use_step_size:
if self.tomo.use_step_size:
# undershoot start margin is added to be sure motor will reach scan speed
acc_margin = abs(scan_step_size)
......@@ -387,9 +387,9 @@ class TomoScan:
# create the acquisition chain
chain = AcquisitionChain()
acc_margin = self.acc_margin
acc_margin = self.tomo.acc_margin
if self.use_step_size:
if self.tomo.use_step_size:
# undershoot start margin is added to be sure motor will reach scan speed
acc_margin = abs(scan_step_size)
......
......@@ -260,8 +260,8 @@ class TomoTools():
step_size = scan_range/self.parameters.tomo_n
one_move_disp = step_size*self.parameters.ref_on
else:
acc_margin = self.tomo.active_tomo.tomo_scan.acc_margin
if self.tomo.active_tomo.tomo_scan.use_step_size:
acc_margin = self.tomo.acc_margin
if self.tomo.use_step_size:
acc_margin = abs(self.tomo.active_tomo.tomo_scan.in_pars['scan_step_size'])
undershoot = self.tomo.active_tomo.tomo_scan.in_pars['scan_speed']**2 / (2*motor.acceleration)
return_img = 0
......@@ -308,8 +308,8 @@ class TomoTools():
end_pos = self.tomo.in_pars['start_group_pos'][1]
nb_points = nb_points / self.tomo.in_pars['nb_groups']
acc_margin = self.tomo.active_tomo.tomo_scan.acc_margin
if self.tomo.active_tomo.tomo_scan.use_step_size:
acc_margin = self.tomo.acc_margin
if self.tomo.use_step_size:
acc_margin = abs(self.tomo.active_tomo.tomo_scan.in_pars['scan_step_size']) / abs(self.tomo.tomo_ccd.detector.accumulation.nb_frames)
undershoot = self.tomo.active_tomo.tomo_scan.in_pars['scan_speed']**2 / (2*motor.acceleration)
......@@ -343,8 +343,8 @@ class TomoTools():
if self.tomo.in_pars['nb_groups'] > 1:
end_pos = self.tomo.in_pars['start_group_pos'][1]
acc_margin = self.tomo.active_tomo.tomo_scan.acc_margin
if self.tomo.active_tomo.tomo_scan.use_step_size:
acc_margin = self.tomo.acc_margin
if self.tomo.use_step_size:
acc_margin = abs(self.tomo.active_tomo.tomo_scan.in_pars['scan_step_size'])
undershoot = self.tomo.active_tomo.tomo_scan.in_pars['scan_speed']**2 / (2*motor.acceleration)
......@@ -415,8 +415,8 @@ class TopoTools(TomoTools):
"""
Estimates sweep scan duration.
"""
acc_margin = self.tomo.active_tomo.tomo_scan.acc_margin
if self.tomo.active_tomo.tomo_scan.use_step_size:
acc_margin = self.tomo.acc_margin
if self.tomo.use_step_size:
acc_margin = abs(self.tomo.active_tomo.tomo_scan.in_pars['scan_step_size'])
undershoot = self.tomo.active_tomo.tomo_scan.in_pars['scan_speed']**2 / (2*motor.acceleration)
......@@ -444,8 +444,8 @@ class TopoTools(TomoTools):
"""
Estimates continuous scan duration.
"""
acc_margin = self.tomo.active_tomo.tomo_scan.acc_margin
if self.tomo.active_tomo.tomo_scan.use_step_size:
acc_margin = self.tomo.acc_margin
if self.tomo.use_step_size:
acc_margin = abs(self.tomo.active_tomo.tomo_scan.in_pars['scan_step_size'])
undershoot = self.tomo.active_tomo.tomo_scan.in_pars['scan_speed']**2 / (2*motor.acceleration)
......
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