Skip to content

Commit

Permalink
Remove noisy points (when a probe hits the reticle surface, it's in n…
Browse files Browse the repository at this point in the history
…egative z coords. Remove these points in training
  • Loading branch information
hannalee2 committed May 28, 2024
1 parent 76fb9de commit 9a58056
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion parallax/probe_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _get_local_global_points(self):
# Extract local and global points
local_points = filtered_df[["local_x", "local_y", "local_z"]].values
global_points = filtered_df[["global_x", "global_y", "global_z"]].values

return local_points, global_points

def _get_transM_LR(self, local_points, global_points):
Expand Down Expand Up @@ -205,6 +205,10 @@ def _update_local_global_point(self, debug_info=None):
"""
Updates the CSV file with a new set of local and global points from the current stage position.
"""
# Check if stage_z_global is under 10 microns
if self.stage.stage_z_global < 10:
return # Do not update if condition is met (to avoid noise)

with open(self.csv_file, "a", newline='') as file:
writer = csv.writer(file)
row_data = [
Expand Down

0 comments on commit 9a58056

Please sign in to comment.