Closed jonzarling closed 2 years ago
Great idea! Maybe there could be a "max" option. Or any large number could be the "max" option.
I like @markdalton's idea - in principle we could change the code that throws the error to have the RCDB override the max endpoint if it's too high, but having an explicit maximum value is more transparent.
I think this was implemented in commit 38519c9. See #80
Example case: user supplies Max Photon E = 11.4 GeV and spring 2020 runs 71350-73266.
Currently the project will fail to test properly, then digging into the logs you'll find "Error: Requested Max photon energy 11.40 is above the electron beam energy 11.374!".
Instead of allowing jobs to proceed and fail, how about we store the max photon energy for different run periods, and use that instead if the user supplies a larger value? For the example above, the job encounters the user value of 11.40 and runs in the 7XXXX range and instead uses 11.374. Maybe with a warning somewhere if not too tricky to implement. I don't recall if any of the major run periods changed beam energy throughout, but a simple stopgap would be better than nothing.