Skip to content

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

Merged
ndg63276 merged 1 commit into
pre-release/2026-R2.3from
fix/LIMS-2139/dont-display-special-beam-as-beam-dump
Apr 21, 2026
Merged

LIMS-2139: Dont display special beam as beam dumps#1052
ndg63276 merged 1 commit into
pre-release/2026-R2.3from
fix/LIMS-2139/dont-display-special-beam-as-beam-dump

Conversation

@ndg63276
Copy link
Copy Markdown
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

@ndg63276 ndg63276 changed the base branch from master to pre-release/2026-R2.3 April 21, 2026 08:54
@ndg63276 ndg63276 merged commit 4247db8 into pre-release/2026-R2.3 Apr 21, 2026
2 checks passed
@ndg63276 ndg63276 deleted the fix/LIMS-2139/dont-display-special-beam-as-beam-dump branch April 21, 2026 08:56
ndg63276 added a commit that referenced this pull request May 1, 2026
* Add instruction for industry users (#1063)

* LIMS-1949: Use parentAutoProcProgramId field (#1062)

* LIMS-1949: Use parentAutoProcProgramId field

* LIMS-1949: Add config variable to example file

---------

Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>

* LIMS-2109: Require an email address when creating a plate (#1037)

* LIMS-2109: Require an email address when creating a plate

* Update php-jwt as much as possible and ignore security advisory

---------

Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>

* LIMS-2126: Add new strategy pipeline and tidy code (#1054)

Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>

* LIMS-2135: Update PHP Libraries (#1053)

* LIMS-2135: Update PHP Libraries

* LIMS-2135: Update tests for PHP 7.4.33

* LIMS-2135: Use global getallheaders

* LIMS-2135: Fix unit tests

* LIMS-2135: Fix unit tests

* LIMS-2135: Add bootstrap getallheaders function for CI tests

---------

Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>

* LIMS-2136: Fix editing priority processing pipeline (#1057)

Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>

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

Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>

* LIMS-2163: Notation change to dispensing CSV for 2 drop plates

---------

Co-authored-by: Guilherme Francisco <guilherme.de-freitas@diamond.ac.uk>
Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants