Skip to content

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

Open
ndg63276 wants to merge 1 commit intomasterfrom
improvement/LIMS-2055/use-compton-cutoff-from-results-file
Open

LIMS-2055: Use Compton cutoff energy from the results file#1043
ndg63276 wants to merge 1 commit intomasterfrom
improvement/LIMS-2055/use-compton-cutoff-from-results-file

Conversation

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

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