mantidproject / mslice

Source code for Mantid MSlice
http://mantidproject.github.io/mslice
1 stars 2 forks source link

Check 'Degrees' and '2Theta' for x dimension #866

Closed SilkeSchomann closed 1 year ago

SilkeSchomann commented 1 year ago

Description of work:

When updating the cut axis for an interactive cut plot along 2Theta the comparison of units failed as 2Theta was compared with Degrees. This can be avoided by using the is_twotheta method for both units as they are then seen as equal.

This fixes both issues regarding cut plots along 2Theta.

To test:

Follow instructions for both original issues. There should be no exception anymore but an interactive cut plot displayed for #859 and no error message for a cut plot via the cut tab for #860.

Fixes #859 Fixes #860

MialLewis commented 1 year ago

Solution works, should we perhaps define an is_energy function, then incorporate the three label functions up into an are_axis_units_equivalent function and import that?

I think we will need to do similar comparisons elsewhere, I think I do this in the GDOS fix PR.