Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stefsmeets committed Jun 26, 2018
1 parent 0c7eae8 commit 2425945
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions instamatic/TEMController/TEMController.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ def y(self, value: int):
self.set(y=value)

def move_in_projection(self, delta_x: int, delta_y: int):
r"""y and z are always perpendicular to the sample stage. Any movement in the projection
should be broken down into the components z' and y' to achieve eucentric movement.
r"""y and z are always perpendicular to the sample stage. To achieve the movement
in the projection, x and yshould be broken down into the components z' and y'.
y = y' * cos(a)
z = y' * sin(a)
Expand All @@ -323,16 +323,18 @@ def move_in_projection(self, delta_x: int, delta_y: int):
\ y
"""
x, y, z, a, b = self.get()
a = np.radians(a)
x = x + delta_x
y = y + delta_y * np.cos(a)
z = z + delta_y * np.sin(a) # check signs
self.set(x=x, y=y)
z = z - delta_y * np.sin(a)
self.set(x=x, y=y, z=z)

def move_along_optical_axis(self, delta_z: int):
"""See `StagePosition.move_in_projection`"""
x, y, z, a, b = self.get()
y = y + delta_z * np.cos(a)
z = z + delta_z * np.sin(a) # check signs
a = np.radians(a)
y = y + delta_z * np.sin(a)
z = z + delta_z * np.cos(a)
self.set(y=y, z=z)

@property
Expand Down
2 changes: 1 addition & 1 deletion instamatic/experiments/cred/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, ctrl,

self.relax_beam_before_experiment = self.image_interval_enabled and config.cfg.cred_relax_beam_before_experiment

self.track_stage_position = config.cfg.cred_track_stage_position
self.track_stage_position = config.cfg.cred_track_stage_positions
self.stage_positions = []

def log_start_status(self):
Expand Down

0 comments on commit 2425945

Please sign in to comment.