Skip to content

LIMS-2139: Dont display special beam as beam dumps#1052

Open
ndg63276 wants to merge 1 commit intomasterfrom
fix/LIMS-2139/dont-display-special-beam-as-beam-dump
Open

LIMS-2139: Dont display special beam as beam dumps#1052
ndg63276 wants to merge 1 commit intomasterfrom
fix/LIMS-2139/dont-display-special-beam-as-beam-dump

Conversation

@ndg63276
Copy link
Collaborator

JIRA ticket: LIMS-2139

Summary:

If the Synchrotron is in "Special Beam" mode, the visit stats page shouldn't record that as a beam dump, as it is usable beam. See eg https://ispyb.diamond.ac.uk/stats/visit/mx41044-27

Changes:

  • Move the name of the beam mode PV into config
  • Also put the "beam on" PV values into the config
  • Remove arbitrary 3600 seconds offset removed in one file and re-added in another
  • Use the start of the beam dump or the start of the visit, whichever is later, as users should not care about the time before their visit
  • Tidy some of the loop logic to make the workings clearer
  • Fix bug where beamlines without a defined elog logbook would throw an error

To test:

  • Add these to the config
    $beam_mode_pv = 'CS-CS-MSTAT-01:MODE';
    $beam_mode_pv_beam_on_values = array(4, 5);
  • Go to the visit stats for a page with lots of special beam time, eg /stats/visit/mx41044-27. Check there are no beam dumps shown in the visit breakdown or the pie chart
  • Go to the visit stats page of a visit that has a beam dump, eg /stats/visit/in37773-44. Check the beam dump lasts 2.3 hours
  • Go to the visit stats page for a visit that started during a beam dump, eg /stats/visit/mx41137-28. Check the beam dump starts when the visit starts at 14:56, finishes at 09:00, and the beam dump duration is therefore 18.1 hours.
  • Go to the visit stats page for a visit that ended during a beam dump, eg /stats/visit/mx40148-41. Check the beam dump starts correctly at 9am March 13th, and runs until the vist ends at 14:43 March 14th, and thus displays as 29.7hrs (32 hours total)
  • Go to the visit stats page for a visit during BST, eg /stats/visit/mx40148-20. Check the beam dump starts from 9am.
  • Go to the visit stats page for an i02-1 visit eg /stats/visit/mx41137-28. Check no errors occur from the fact that i02-1 has no logbook defined in $bl_types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant