Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid parameters erroneously contain values in mm when variables are in um #220

Open
rtuck99 opened this issue Jul 25, 2024 · 1 comment · May be fixed by DiamondLightSource/dodal#892 or #623
Open
Assignees
Labels

Comments

@rtuck99
Copy link
Contributor

rtuck99 commented Jul 25, 2024

get_grid_detection_callback.py contains the following code:

    def get_grid_parameters(self) -> GridParamUpdate:
        return {
            "x_start_um": self.start_positions[0][0],
            "y_start_um": self.start_positions[0][1],
            "y2_start_um": self.start_positions[0][1],
            "z_start_um": self.start_positions[1][2],
            "z2_start_um": self.start_positions[1][2],
            "x_steps": self.box_numbers[0][0],
            "y_steps": self.box_numbers[0][1],
            "z_steps": self.box_numbers[1][1],
            "x_step_size_um": self.x_step_size_mm,
            "y_step_size_um": self.y_step_size_mm,
            "z_step_size_um": self.z_step_size_mm,
        }

these mm values are then propagated elsewhere to other parameter values which are also named as being in microns.
start_positions also contains values in mm, because the values derive from calculate_x_y_z_of_pixel() which uses motor positions which are in mm

@DominicOram DominicOram transferred this issue from DiamondLightSource/hyperion Sep 2, 2024
@DominicOram DominicOram moved this from Backlog to Candidates for Next Sprint in Hyperion Oct 14, 2024
@rtuck99
Copy link
Contributor Author

rtuck99 commented Oct 15, 2024

see also calls toZebraGridScanParams / PandAGridScanParams constructors in gridscan.py which take values supposedly in microns and then populate values that are then interpreted as being in mm, which cancels out the previous error

@DominicOram DominicOram self-assigned this Nov 6, 2024
@DominicOram DominicOram moved this from Todo This Sprint to In Progress in Hyperion Nov 6, 2024
@DominicOram DominicOram moved this from In Progress to Review in Hyperion Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Review
2 participants