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

Enter Time of Flight user properties in Spectrum Viewer #2159

Merged
merged 9 commits into from
Apr 23, 2024

Conversation

MikeSullivan7
Copy link
Collaborator

@MikeSullivan7 MikeSullivan7 commented Apr 5, 2024

Issue

Closes #2158

Description

A section has been added to the left hand side of the spectrum viewer which allows users to enter the Flight Path (meters) and the Time Delay (microseconds) used as these can change from experiment to experiment. The time delay can be used to artificially alter the neutron wavelength range. It was requested by IMAT that these option be "on show" rather than hidden away in a right click menu for example.

When the values in the spinboxes are changed, the associated attribute is altered in the unit_conversion object in the spectrum viewer model. This ensures that the converted data is recalculated properly when the ToF properties are changed and any alterations are contained in the UnitConversion class.

Testing

make check

Acceptance Criteria

  • Open MI and load data with no spectrum.txt data
  • In the SV, the Right Click Units option should be disabled and the ToF properties options on the left should be greyed out
  • Load in data with a spectrum.txt file, e.g. the Brass dataset.
  • The ToF properties box will be enabled and you can alter the Flight Path (FP) and Time Delay (TD).
  • The defaults should be FP = 56m and TD = 0.
  • For the Image Index mode, the FP and TD should not alter the data.
  • For the Wavelength mode, the increasing the FP implies faster neutrons (with a fixed time of flight) so the wavelength should shift to a smaller number.
  • For the Energy mode, the increasing the FP implies faster neutrons (with a fixed time of flight) so the wavelength should shift to a higher number.
  • For the ToF us mode, changing the FP should not change the data but the TD will shift the data to the left or right by the value of the TD.
  • For the Corrected Brass Dataset (\\isis\shares\IMAT\ExampleData\Brass\Corrected_Sample_PH20), there should be a Bragg Edge around 4.3 angstroms.

Documentation

Will add Release Note

@coveralls
Copy link

Coverage Status

coverage: 73.812% (-0.5%) from 74.286%
when pulling 5210976 on 2158_Tof_user_properties
into b6087e8 on main.

@MikeSullivan7 MikeSullivan7 force-pushed the 2158_Tof_user_properties branch from 5210976 to eaf1028 Compare April 15, 2024 13:19
@MikeSullivan7 MikeSullivan7 marked this pull request as ready for review April 15, 2024 13:19
@MikeSullivan7 MikeSullivan7 force-pushed the 2158_Tof_user_properties branch from eaf1028 to 5c0ecca Compare April 22, 2024 08:23
mantidimaging/core/utility/unit_conversion.py Outdated Show resolved Hide resolved
mantidimaging/core/utility/unit_conversion.py Outdated Show resolved Hide resolved
mantidimaging/core/utility/unit_conversion.py Outdated Show resolved Hide resolved
@samtygier-stfc samtygier-stfc added this pull request to the merge queue Apr 23, 2024
@MikeSullivan7 MikeSullivan7 self-assigned this Apr 23, 2024
Merged via the queue into main with commit fff535e Apr 23, 2024
8 checks passed
@samtygier-stfc samtygier-stfc deleted the 2158_Tof_user_properties branch April 23, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Allow users to enter Time of Flight properties in Spectrum Viewer
3 participants