Skip to content

LIMS-2055: Use Compton cutoff energy from the results file#1043

Merged
ndg63276 merged 4 commits intopre-release/2026-R2.1from
improvement/LIMS-2055/use-compton-cutoff-from-results-file
Mar 24, 2026
Merged

LIMS-2055: Use Compton cutoff energy from the results file#1043
ndg63276 merged 4 commits intopre-release/2026-R2.1from
improvement/LIMS-2055/use-compton-cutoff-from-results-file

Conversation

@ndg63276
Copy link
Copy Markdown
Collaborator

@ndg63276 ndg63276 commented Mar 5, 2026

JIRA ticket: LIMS-2055

Summary:

Data analysis have suggested adding header rows to .results.dat files, eg

# COMPTON_CUTOFF_EV 9585.53
# COLUMN_HEADERS: Element-Edge Counts Sigma

This means ignoring those lines when it comes to labelling peaks, and reading in the Compton cutoff energy to plot the graph in a different colour.

Changes:

  • Swap the order of reading the results.dat file and the .dat file
  • Ignore lines starting with '#' for the peak plotting, and still only report the first 5 elements
  • Pull out the Compton cutoff energy if given, or use energy - 1100 as a default

To test:

  • Go to a visit with MCA spectra, eg /dc/visit/cm44137-1/ty/mca (NB permalinks to individual MCA spectra is broken in 2026-R1.4)
  • Open the relevant .results.dat file (found in visit/processed/pymca)
  • Add the header from above to the top of the .results.dat file
  • Check the light grey line now starts from 9585eV (may look different as the autoscaling is affected)
  • Change the COMPTON_CUTOFF_EV to 14900 in the .results.dat file, check the spectra looks like it does on production
  • Check a maximum of 5 elements are displayed, though the front end cuts off some of the smaller ones

@ndg63276 ndg63276 changed the base branch from master to pre-release/2026-R2.1 March 24, 2026 10:16
@ndg63276 ndg63276 merged commit f996f76 into pre-release/2026-R2.1 Mar 24, 2026
2 checks passed
@ndg63276 ndg63276 deleted the improvement/LIMS-2055/use-compton-cutoff-from-results-file branch March 24, 2026 10:30
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