Skip to content

Auto button for loader rotation_angles parameter sets value incorrectly #99

@yousefmoazzam

Description

@yousefmoazzam

The typescript type used to represent the rotation_angles parameter of the loader is not quite correct regarding where the auto should be placed. The type has this: https://github.com/DiamondLightSource/TomoHub/blob/1bc40efd239fd37e575970a062e9dea8bea53f2f/frontend/src/contexts/LoaderContext.tsx#L15-L21

but the auto should be for the entire rotation_angles field, not the data_path subfield.

Ie, the type should look something like this instead:

  rotation_angles: {
    data_path?: string
    user_defined?: {
      start_angle: number;
      stop_angle: number;
      angles_total: number;
    }  | "auto" | null; // Allow null and 'auto';

A consequence of the incorrect type is that when the auto toggle button in the Loader component is toggled on, this causes the rotation_angles parameter config to be this:

rotation_angles: {
  data_path: "auto"
}

which is incorrect, it should be:

rotation_angles: "auto"

This ultimately leads to a workflow triggered with the auto button toggled on to fail, because httomo is given an incorrect configuration of the rotation_angles parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions