DiamondLightSource / mx-bluesky

Bluesky plans, plan stubs, and utilities for MX beamlines
https://diamondlightsource.github.io/mx-bluesky/
Apache License 2.0
0 stars 2 forks source link

Occasional incorrect grid (potentially zoom level) #405

Open DominicOram opened 2 years ago

DominicOram commented 2 years ago

Occasionally GDA creates an entirely incorrect grid e.g. see https://ispyb.diamond.ac.uk/dc/visit/lb27009-50/dcg/8092583

Relevant logs from GDA:

2022-10-05 18:54:01,077 INFO  [server/21094@i03-control.diamond.ac.uk] gridscan.artemis_grid_scan - 22-10-05 18:54:01 GRIDSCAN Snapshots will be saved in /dls/i03/data/2022/lb27009-50/jpegs/xraycentring/manual/
2022-10-05 18:54:04,873 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonScannableMotor - Current thread "JythonCommandRunnerCommand_5995082187699697661.py" is not executing a move for the co
ntroller, so will need to get permission
2022-10-05 18:54:04,873 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - Move was not pending for OMEGA (but now is)
2022-10-05 18:54:04,873 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - Now executing a move of OMEGA
2022-10-05 18:54:04,873 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonScannableMotor - Current thread "pool-3-thread-1" is executing a move for the controller, so can go ahead
2022-10-05 18:54:04,873 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - Waiting for a move of OMEGA to finish
2022-10-05 18:54:04,973 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - OMEGA is no longer moving
2022-10-05 18:54:05,697 INFO  [server/21094@i03-control.diamond.ac.uk] gridscan.artemis_grid_scan - {0: {'maxY': 370.64201988570795, 'maxX': 1024.0, 'minY': 258.2905020427112, 'minX': 281.0}}
2022-10-05 18:54:05,698 INFO  [server/21094@i03-control.diamond.ac.uk] GridScanSampleImage - Capturing image of sample to /dls/i03/data/2022/lb27009-50/jpegs/xraycentring/manual//xrc_5_0.0.png
2022-10-05 18:54:05,698 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - gda.images.camera.MxOpticalCamera/getImage/getImage|1|MICROSECONDS
2022-10-05 18:54:05,698 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - gda.images.camera.MxOpticalCamera/captureImage/getImage|14|MICROSECONDS
2022-10-05 18:54:05,738 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - gda.images.camera.MxOpticalCamera/captureImage/write|40002|MICROSECONDS
2022-10-05 18:54:05,739 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.images.camera.MxOpticalCameraBase - Image saved to /dls/i03/data/2022/lb27009-50/jpegs/xraycentring/manual/xrc_5_0.0.png
2022-10-05 18:54:07,177 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonScannableMotor - Current thread "JythonCommandRunnerCommand_5995082187699697661.py" is not executing a move for the co
ntroller, so will need to get permission
2022-10-05 18:54:07,177 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - Move was not pending for OMEGA (but now is)
2022-10-05 18:54:07,177 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - Now executing a move of OMEGA
2022-10-05 18:54:07,177 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonScannableMotor - Current thread "pool-3-thread-1" is executing a move for the controller, so can go ahead
2022-10-05 18:54:07,178 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - Waiting for a move of OMEGA to finish
2022-10-05 18:54:07,979 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - OMEGA is no longer moving
2022-10-05 18:54:08,700 INFO  [server/21094@i03-control.diamond.ac.uk] gridscan.artemis_grid_scan - {90: {'maxY': 422.5542022012839, 'maxX': 1024.0, 'minY': 266.8046012515234, 'minX': 281.0}}
2022-10-05 18:54:08,700 INFO  [server/21094@i03-control.diamond.ac.uk] GridScanSampleImage - Capturing image of sample to /dls/i03/data/2022/lb27009-50/jpegs/xraycentring/manual//xrc_5_90.0.png
2022-10-05 18:54:08,700 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - gda.images.camera.MxOpticalCamera/getImage/getImage|1|MICROSECONDS
2022-10-05 18:54:08,700 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - gda.images.camera.MxOpticalCamera/captureImage/getImage|13|MICROSECONDS
2022-10-05 18:54:08,743 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - gda.images.camera.MxOpticalCamera/captureImage/write|42671|MICROSECONDS
2022-10-05 18:54:08,743 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.images.camera.MxOpticalCameraBase - Image saved to /dls/i03/data/2022/lb27009-50/jpegs/xraycentring/manual/xrc_5_90.0.png
2022-10-05 18:54:08,743 INFO  [server/21094@i03-control.diamond.ac.uk] GridScanSampleImage - Moving backlight to initial position...
2022-10-05 18:54:08,743 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonScannableMotor - Current thread "JythonCommandRunnerCommand_5995082187699697661.py" is not executing a move for the controller, so will need to get permission
2022-10-05 18:54:08,743 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - Move was not pending for OMEGA (but now is)
2022-10-05 18:54:08,743 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - Now executing a move of OMEGA
2022-10-05 18:54:08,743 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonScannableMotor - Current thread "pool-3-thread-1" is executing a move for the controller, so can go ahead
2022-10-05 18:54:08,744 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - Waiting for a move of OMEGA to finish
2022-10-05 18:54:09,544 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.smargon.SmarGonController - OMEGA is no longer moving
2022-10-05 18:54:09,655 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - grid_scan_snapshots/overlayGrid/read|9753|MICROSECONDS
2022-10-05 18:54:09,668 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - grid_scan_snapshots/overlayGrid/read|10111|MICROSECONDS
2022-10-05 18:54:09,713 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - grid_scan_snapshots/overlayGrid/write|39204|MICROSECONDS
2022-10-05 18:54:09,713 INFO  [server/21094@i03-control.diamond.ac.uk] gdascripts.messages.handle_messages - Created file /dls/i03/data/2022/lb27009-50/jpegs/xraycentring/manual/xrc_5_0.0.png
2022-10-05 18:54:09,723 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - grid_scan_snapshots/overlayGrid/read|10483|MICROSECONDS
2022-10-05 18:54:09,736 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - grid_scan_snapshots/overlayGrid/read|10343|MICROSECONDS
2022-10-05 18:54:09,779 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.px.metrics.Metric - grid_scan_snapshots/overlayGrid/write|41598|MICROSECONDS
2022-10-05 18:54:09,779 INFO  [server/21094@i03-control.diamond.ac.uk] gdascripts.messages.handle_messages - Created file /dls/i03/data/2022/lb27009-50/jpegs/xraycentring/manual/xrc_5_90.0.png
2022-10-05 18:54:09,780 DEBUG [server/21094@i03-control.diamond.ac.uk] gridscan.artemis_grid_scan - distanceToUpperLeft = (80.00, -70.00)
2022-10-05 18:54:09,781 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.rcp.mx.gridscan.model.GridScanController - Received GridScanLocation - Grid Status: Grid scan location: -80.0,-70.0 width:340.0 height:60.0
2022-10-05 18:54:09,781 DEBUG [server/21094@i03-control.diamond.ac.uk] gda.rcp.mx.gridscan.model.GridScanController - Received GridSize - Grid Status: Grid size is 17,3
DominicOram commented 2 years ago

This was a manual run, we haven't seen it under UDC. Current theory is that this is due to GDA not waiting on the zoom level of the OAV to change

DominicOram commented 2 years ago

https://ispyb.diamond.ac.uk/dc/visit/cm31105-4/dcg/8133278 looks similar, was not a manual move but was the first in the queue

DominicOram commented 2 years ago

https://ispyb.diamond.ac.uk/dc/visit/cm31105-4/dcg/8160427 may be the same, was the first in the queue

DominicOram commented 1 year ago

Spent a couple of hours on this today:

DominicOram commented 1 year ago

Given the time spent on this already I'm keen to prioritise https://github.com/DiamondLightSource/python-artemis/issues/373 over this. So moving this into the backlog

DominicOram commented 1 year ago

This seems present still after DiamondLightSource/hyperion#373. See https://ispyb.diamond.ac.uk/dc/visit/mx33658-4/dcg/9490482