Ticket #1649 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Generalise ConvertSpectrumAxis

Reported by: Michael Whitty Owned by: Michael Whitty
Priority: major Milestone: Iteration 25
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Janik Zikovsky

Description

Adjust the ConvertSpectrumAxis algorithm to work with any unit that is defined in the UnitFactory.

Change History

comment:1 Changed 10 years ago by Michael Whitty

  • Status changed from new to accepted

comment:2 Changed 10 years ago by Michael Whitty

(In [6184]) re #1649 - adjusting ConvertSpectrumAxis so that it can work with any unit present in the UnitFactory, as well as the theta unit originally required

comment:3 Changed 10 years ago by Michael Whitty

(In [6186]) re #1649 - fixing linux build

comment:4 Changed 10 years ago by Michael Whitty

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:5 Changed 10 years ago by Janik Zikovsky

  • Status changed from verify to verifying
  • Tester set to Janik Zikovsky

comment:6 Changed 10 years ago by Janik Zikovsky

  • The use of this algorithm is unclear to me - why does anyone want to convert their spectra numbers to theta or some other unit? Some clarifications in the Wiki would be useful.
  • This works if the target is "theta" but is there any meaning to any of the other units? What does it mean to convert a detector ID or spectrum number to Wavelength?
  • Show Instrument (the 3D view) no longer works on the converted workspace.

comment:7 follow-up: ↓ 8 Changed 10 years ago by Janik Zikovsky

  • Another note, I tried to convert to "Wavelength" and a few other units and it did not work ("Detector with ID 601 not found" for a GEM file, for example.)

comment:8 in reply to: ↑ 7 Changed 10 years ago by Michael Whitty

I'm not a scientist, the people using the software are. If this is a tool that is useful to them, then they'll know what they're using it for. If it's not an algorithm that gives them any value, they just won't use it. I don't think we need to turn our documentation into a textbook on data analysis techniques, do we? I think the main reason is to plot against something that is more scientifically meaningful that the order at which the pixel appears in the instrument.

Replying to Janik Zikovsky:

  • Another note, I tried to convert to "Wavelength" and a few other units and it did not work ("Detector with ID 601 not found" for a GEM file, for example.)

The original aim was to have it either in Q (MomentumTransfer), Q2 (which are sub-products of theta) or, as the first iteration of this algorithm performed, in theta. This was expanded out to any unit in the unit factory because there was no technical reason for it not to be so and the idea of lumping in more and more "special cases" seemed ludicrous when we already have a system to convert the units.

Show Instrument will obviously not work because it relies on a call to spectraNo(). If the spectra-detector map is gone, then this is unavailable. This is something that the users will accept at this point in their analysis.

I managed to convert a spectrum axis to wavelength, but as you say - this doesn't really serve a purpose.

comment:9 Changed 10 years ago by Janik Zikovsky

  • Status changed from verifying to closed

Saw you updated the wiki

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2496

Note: See TracTickets for help on using tickets.