DiamondLightSource / dodal

Ophyd devices and other utils that could be used across DLS beamlines
Apache License 2.0
2 stars 8 forks source link

Prepare `ZocaloResults` to use multiple results sources #559

Open dperl-dls opened 4 months ago

dperl-dls commented 4 months ago

I03 will soon have both GPU-based and traditional xray-centring results available. ZocaloResults should fetch both of these from the queue and pick which one to use based on input from hyperion.

DominicOram commented 2 months ago

Need to discuss with Nick on multiple messages vs single messages with both results

DominicOram commented 1 month ago

@ndevenish says it will be multiple messages. For implementing this lets assume the format is:

{
    "results": [
        {
            "centre_of_mass": [
                2.207133058984911,
                1.4175240054869684,
                13.317215363511659,
            ],
            "max_voxel": [2, 1, 13],
            "max_count": 702.0,
            "n_voxels": 12,
            "total_count": 5832.0,
            "bounding_box": [[1, 0, 12], [4, 3, 15]],
        }
    ],
    "status": "success",
    "type": "3d",
    "source": "gpu",
}

It'll be close to that I suspect. Nick, feel free to correct us if you have a better idea of the format.

ndevenish commented 3 weeks ago

You are listening to messages directly, right? Are you getting the messages back from the xrc.{ispyb_beamline} queue?

It might be in the message parameters, along with dcid/dcgid, is that okay?

olliesilvester commented 3 weeks ago

As discussed with @DominicOram:

olliesilvester commented 3 weeks ago

As part of this issue: if we are using gpu results, we would like to compare data from GPU and CPU results and include it in a debug log, and warn if the results differ by some tolerance (TBC)

This should be done asynchronously so we aren't still being blocked by slow CPU results

olliesilvester commented 3 weeks ago

Updated acceptance criteria:

DominicOram commented 1 week ago

Changes are currently on the beamline to use the CPU results no matter what. Update this accordingly