DiamondLightSource / hyperion

Unattended Data Collection using BlueSky / Ophyd
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Rotation scans timeout at long exposures due to top up wait #1464

Open olliesilvester opened 2 weeks ago

olliesilvester commented 2 weeks ago

With long (~0.1s) exposures, data collections can take 6 minutes or more. If Hyperion is about to start a 6 minute collection, but there is a top-up due in 5 minutes, it will wait for 5 minutes before starting. The timeout for rotations is currently 10 minutes, so this causes an error. The simplest solution would just be to increase the time-out to ~30 mins. There are some more involved alternatives though:

olliesilvester commented 2 weeks ago

After discussion with Neil, for exposure times greater than a certain value, we can just continue with collection during top-up and not worry about waiting, since the flickering beam doesn't affect things very much

DominicOram commented 2 weeks ago

To work out what those values are take a look at the GDA properties:

gda.mx.topup.enabled = true
gda.mx.topup.threshold_percentage = 20
gda.mx.topup.instability_time = 27

and associated code. We think it's something like "if topup instability time >20% of total exposure then wait"