Resolved data tracking error.
This commit is contained in:
parent
f501e7741d
commit
e95f31d832
1 changed files with 10 additions and 2 deletions
|
|
@ -366,6 +366,11 @@ class RomDataTracker:
|
||||||
self.stage_coords.append(current_pos)
|
self.stage_coords.append(current_pos)
|
||||||
self.cor_lat_steps.append(cor)
|
self.cor_lat_steps.append(cor)
|
||||||
|
|
||||||
|
def reset_tracker(self):
|
||||||
|
"""Empty the rom tracker."""
|
||||||
|
self.stage_coords.clear()
|
||||||
|
self.cor_lat_steps.clear()
|
||||||
|
|
||||||
|
|
||||||
class RangeofMotionThing(lt.Thing):
|
class RangeofMotionThing(lt.Thing):
|
||||||
"""A class used to measure the range of motion of the stage in X and Y."""
|
"""A class used to measure the range of motion of the stage in X and Y."""
|
||||||
|
|
@ -484,10 +489,13 @@ class RangeofMotionThing(lt.Thing):
|
||||||
)
|
)
|
||||||
|
|
||||||
axis_results = {
|
axis_results = {
|
||||||
"correlation_lateral_steps": rom_data.cor_lat_steps,
|
"correlation_lateral_steps": rom_data.cor_lat_steps.copy(),
|
||||||
"stage_positions": rom_data.stage_coords,
|
"stage_positions": rom_data.stage_coords.copy(),
|
||||||
"final_position": final_pos,
|
"final_position": final_pos,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rom_data.reset_tracker()
|
||||||
|
|
||||||
except AssertionError:
|
except AssertionError:
|
||||||
logger.info("Parasitic motion detected.")
|
logger.info("Parasitic motion detected.")
|
||||||
finally:
|
finally:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue