Ticket #3772 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

PredictPeaks: incorrect QSample of predicted peaks?

Reported by: Janik Zikovsky Owned by: Janik Zikovsky
Priority: major Milestone: Release 2.0
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Andrei Savici

Description

# Basic parameters
filename = "TOPAZ_3131_event.nxs"
#Name of the workspaces to create
ws = "TOPAZ_3131"

# Load the original data
LoadEventNexus(Filename=filename,OutputWorkspace=ws)

# Convert to reciprocal space, in the sample frame
ConvertToDiffractionMDWorkspace(InputWorkspace=ws,OutputWorkspace=ws+'_MD',
		OutputDimensions='Q (sample frame)',LorentzCorrection='1')
		
# Find peaks
FindPeaksMD(InputWorkspace=ws+'_MD',MaxPeaks='50',OutputWorkspace=ws+'_peaks')

# Find the UB matrix using the peaks and known lattice parameters
FindUBUsingLatticeParameters(PeaksWorkspace=ws+'_peaks',a='10.3522',b='6.0768',c='4.7276',
		alpha='90',beta='90',gamma='90', NumInitial='20', Tolerance='0.12')
# And index to HKL		
IndexPeaks(PeaksWorkspace=ws+'_peaks', Tolerance='0.12')
		
# Copy the UB matrix back to the original workspace
CopySample(InputWorkspace=ws+'_peaks',OutputWorkspace=ws,
		CopyName='0',CopyMaterial='0',CopyEnvironment='0',CopyShape='0',  CopyLattice=1)

# Integrate in reciprocal space
IntegratePeaksMD(InputWorkspace=ws+'_MD', CoordinatesToUse='Q (sample frame)', PeakRadius=0.1, BackgroundRadius=0.0, \
				PeaksWorkspace=ws+'_peaks_centered', OutputWorkspace=ws+'_peaks_centered_integ')

# ------ Now predict peaks and integrate those -----------
PredictPeaks(InputWorkspace=ws, MinDSpacing=0.75, OutputWorkspace=ws+'_peaks_predicted')
IntegratePeaksMD(InputWorkspace=ws+'_MD', CoordinatesToUse='Q (sample frame)', PeakRadius=0.1, BackgroundRadius=0.0, \
				PeaksWorkspace=ws+'_peaks_predicted', OutputWorkspace=ws+'_peaks_predicted_integ')

The Q(sample) of the predicted peaks does not match that from FindPeaksMD. Perhaps the goniometer setting is being lost/ignored?

Also, the input workspace should be allowed to be a MDEventWorkspace.

Change History

comment:1 Changed 9 years ago by Janik Zikovsky

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Janik Zikovsky

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

In [14924]:

Fixes #3772: QSample of predicted peaks is corrected. Also tweaked prediction and allowed using any workspace type as input.

comment:3 Changed 9 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

comment:4 Changed 9 years ago by Andrei Savici

  • Status changed from verifying to closed

Had some problems with the new python, and the script has problems with integrate (to be solved in a different ticket), but the Qs are similar

comment:5 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4620

Note: See TracTickets for help on using tickets.