Ticket #7729 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

[Indirect] - Q value in show detectors

Reported by: Samuel Jackson Owned by: Samuel Jackson
Priority: major Milestone: Release 3.0
Component: Indirect Inelastic Keywords:
Cc: spencer.howells@… Blocked By:
Blocking: Tester: Roman Tolchenov

Description

New ticket request from Spencer:

Right-clicking on WS name & selecting 'Show detectors' gives a window with a table of detector parameters including angle (theta). Our users would like this table to include the Q value. The routine would check if the instrument is Indirect Inelastic & if so calc Q. Code for doing this can be found in the alg ConvertSpectrumAxis - which is used in ElWin.

There is a routine (or 2) in the file IndirectCommon.py to calc Q & then change the x-values in the WS.

Attachments

qTest.py (213 bytes) - added by Samuel Jackson 7 years ago.
Reference script

Change History

comment:1 Changed 7 years ago by Samuel Jackson

  • Status changed from new to inprogress

Show detectors now shows Q value.

Refs #7729

Changeset: 35b40278f63be2c974958c83ac0e088fe93c0c7d

comment:2 Changed 7 years ago by Samuel Jackson

Refactoring and tidying up.

Refs #7729

Changeset: 2494b620d93d04e5cd924bafab44502c86a73f7c

comment:3 Changed 7 years ago by Russell Taylor

Last edited 7 years ago by Russell Taylor (previous) (diff)

comment:4 Changed 7 years ago by Samuel Jackson

Removed unused local variable.

Refs #7729

Changeset: 98c046861153cbce9e7fd1008b4550ec85f0703f

comment:5 Changed 7 years ago by Samuel Jackson

Swapped out using ConvertSpectrumAxis algorithm for just the raw calculations.

This should make calculation of Q a little more lightweight.

Refs #7729

Changeset: e6755eba83a6f64fa3d09974334c67769f740507

comment:6 Changed 7 years ago by Samuel Jackson

Added better output for when there is no EFixed value.

Refs #7729

Changeset: 74b0c95ce80c1d237cc8d2cace9883a944daf855

Changed 7 years ago by Samuel Jackson

Reference script

comment:7 Changed 7 years ago by Samuel Jackson

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

To Tester

Verify that the Q values are shown in the "Show detectors" table for indirect instruments. Check this by loading an appropriate file (such as irs26173_graphite002_red in system tests data) and selecting show detectors.

I've provided a script (qTest.py) which uses convert spectrum axis to calculate the Q values and print them. Check that the output from the script and the values shown in the table are the same.

I would also suggest checking that the column isn't shown when viewing the show detectors GUI with a direct instrument.

Finally check that running show detectors on a empty instrument doesn't break Mantid. I would suggest loading the IRIS definition file with LoadEmptyInstrument and checking that the Q value is set to "No Efixed"

comment:8 Changed 7 years ago by Samuel Jackson

  • Milestone changed from Backlog to Release 3.0

comment:9 Changed 7 years ago by Gesner Passos

  • Status changed from verify to verifying
  • Tester set to Gesner Passos

comment:10 Changed 7 years ago by Gesner Passos

  • Status changed from verifying to reopened
  • Resolution fixed deleted

If you try to execute:

ws = Load('BSS_11841_histo.dat')

it will crash mantid.

In order to test this ticket, I tried to load all the indirect data files that we have in mantid or system tests. It may be interesting to you while fixing this issue.

import sys
files = ['osi89757.raw', 'osi89758.raw', 'osi89759.raw', 'osi89760.raw', 'osi89761.raw', 'osi89816.raw', 'osi89817.raw', 'osi97935_graphite002_red.nxs', 'osi97935_graphite002_res.nxs', 'osi97936_graphite002_red.nxs', 'osiris00101300.raw', 'osiris_041_RES10.cal', 'OSI89813.raw', 'OSI89814.raw', 'OSI89815.raw', 'OSI97919.raw', 'OSI97935.raw', 'irs21360.raw', 'irs26173_graphite002_red.nxs', 'irs26173_graphite002_res.nxs', 'irs26176_graphite002_QLr_Parameters.nxs', 'irs26176_graphite002_red.nxs', 'irs53664_graphite002_red.nxs', 'irs53664_graphite002_res.nxs', 'irs53665_graphite002_red.nxs', 'IRS53664.raw', 'TSC11453.raw', 'BSS_13387_event.nxs', 'BSS_11841_event.nxs', 'BSS_11841_histo.dat']

for file in files:
	try:		
		ws = Load(file, OutputWorkspace=file)
		print 'Load', ws.getName()
	except:
		print sys.exc_info()

comment:11 Changed 7 years ago by Samuel Jackson

  • Status changed from reopened to inprogress

Changed to better method of finding Efixed value.

Refs #7729

Changeset: e3ffe7ad2e377d168078b0a37ba823972e74b0d9

comment:12 Changed 7 years ago by Samuel Jackson

Created ElasticQ conversion function.

Refs #7729

Changeset: c7267067c42a74392abbb00b44638c1fa27d84c6

comment:13 Changed 7 years ago by Samuel Jackson

A little refactoring to tidy up.

Refs #7729

Changeset: c5decbdd8f7b2fee057f8b292c69cbd018f89cc6

comment:14 Changed 7 years ago by Samuel Jackson

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

comment:15 Changed 7 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester changed from Gesner Passos to Roman Tolchenov

comment:16 Changed 7 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7729_q_val_in_show_detectors'

comment:17 Changed 7 years ago by Nick Draper

  • Component changed from Framework to Indirect Inelastic

comment:18 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8574

Note: See TracTickets for help on using tickets.