Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIMS-1515: Add energy value to data collections #853

Conversation

ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Nov 1, 2024

JIRA ticket: LIMS-1515

Summary:

Currently only wavelength is displayed in Synchweb for most data collection types, we should show energy in eV as well.

Changes:

  • Define the eV/A conversion factor (value from https://en.wikipedia.org/wiki/Electronvolt#Wavelength)
  • Add return values to the _data_collections function for the energy in eV, and also the wavelength in A for MCA spectra and peak (wpk) and inflection (win) wavelengths for edge scans
  • Add labels to a few more columns, these are redundant as the union will use the labels from the first select statement, but help to identify where values are coming from
  • Return energies to 0 decimal places and wavelengths to 4 decimal places, except for edge scan results which have 1 and 5 respectively (these are results so more precision is needed)
  • Display these values, taking conversion factor out of the JS
  • Make the edge scan filename a double width column, so that E(peak) is displayed next to the peak f''/f' results, and the same for E(inflection). Cut all f''/f' values to 2 decimal places.

To test:

  • View a standard data collection (eg /dc/visit/cm37235-4/id/15542386), check the wavelength and energy are displayed as Wavelength: 0.9537Å (13,000eV)
  • View a grid scan (eg /dc/visit/cm37235-4/id/15542377), check the wavelength and energy are displayed as Wavelength: 0.9537Å (13,000eV)
  • View an MCA spectrum (eg /dc/visit/cm37235-4/ty/mca/id/15813), check the energy is displayed as Energy: 18,000eV (0.6888Å)
  • View an edge scan (eg /dc/visit/cm37235-4/ty/edge/id/61197), check:
    • energies have 1 decimal place, wavelengths have 5 decimal places
    • f''/f' values have 2 decimal places, and e- as units
    • peak f''/f' is displayed next to peak energy, inflection f''/f' is displayed next to inflection energy, ie
      image

api/src/Page/DC.php Outdated Show resolved Hide resolved
@ndg63276 ndg63276 changed the base branch from master to pre-release/2024-R5.2 November 12, 2024 10:03
@ndg63276 ndg63276 merged commit d19fb86 into pre-release/2024-R5.2 Nov 12, 2024
2 checks passed
@ndg63276 ndg63276 deleted the improvement/LIMS-1515/add-energy-to-data-collections branch November 12, 2024 10:06
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