Ticket #3773 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

ConvertToDiffractionMDWorkspace: Check on HKL transformation

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

Description (last modified by Janik Zikovsky) (diff)

Peaks from TOPAZ_3131 did not look aligned in the way you would expect when I last tried it. See the Diffraction_Workflow.py script.

To test: run the script to generate a MD workspace in HKL space. In Paraview (or the simple interface), load both the MDWorkspace and the PeaksWorkspace. A PeaksWorkspace of found peaks generated from the Q-space MDWorkspace will work too because it contains the HKL transformation too. Select that the Peaks should be viewed in HKL space. The peaks markers should overlap with the peaks in the data in HKL.

Attachments

offset.png (210.4 KB) - added by Owen Arnold 9 years ago.
Screenshot-ParaView 3.10.1 64-bit.png (227.2 KB) - added by Janik Zikovsky 9 years ago.
working_overplot.png (136.6 KB) - added by Owen Arnold 9 years ago.

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 [14925]:

Fixes #3773: event -> HKL conversion now works well. In TOPAZ_3131 (see sample diffraction workflow script) the peaks look perfectly aligned with the axes.

comment:3 Changed 9 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:4 Changed 9 years ago by Janik Zikovsky

  • Description modified (diff)

Changed 9 years ago by Owen Arnold

comment:5 Changed 9 years ago by Owen Arnold

See image. Peak positions seem offset.

comment:6 Changed 9 years ago by Owen Arnold

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:7 Changed 9 years ago by Janik Zikovsky

  • Status changed from reopened to accepted

Changed 9 years ago by Janik Zikovsky

comment:8 Changed 9 years ago by Janik Zikovsky

Hi Owen, I haven't been able to reproduce the issue (see my screenshot). You chose "HKL" in the Peaks paraview plugin?

Here is a simpler script:

# 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='150',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)
		
SaveIsawPeaks(InputWorkspace=ws+'_peaks', Filename="TOPAZ_3131_found.peaks") 

# Save the MD workspace in Q sample frame to a NXS file. 
#SaveMD(InputWorkspace=ws+'_MD', Filename='TOPAZ_3131_MD_q_sample.nxs')

# ----- Now Convert to HKL space to view in that space ----------- 

# Convert to reciprocal space, in the sample frame
ConvertToDiffractionMDWorkspace(InputWorkspace=ws,OutputWorkspace=ws+'_HKL',
		OutputDimensions='HKL',LorentzCorrection='1')

# Save that for later viewing in paraview
SaveMD(InputWorkspace=ws+'_HKL', Filename='TOPAZ_3131_MD_HKL.nxs')

Changed 9 years ago by Owen Arnold

comment:9 Changed 9 years ago by Owen Arnold

Followed the script above. Produces properly aligned peaks. They looked off in my earlier tests probably because I had too many events in my splatter plot and a truncated coloring range.

Please mark this ticket as accepted -> verified and I will mark it as completed.

comment:10 Changed 9 years ago by Janik Zikovsky

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

comment:11 Changed 9 years ago by Owen Arnold

  • Status changed from verify to verifying

comment:12 Changed 9 years ago by Owen Arnold

  • Status changed from verifying to closed

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4613

Note: See TracTickets for help on using tickets.