peaks_to_detID_omega.py 299 Bytes
Newer Older
1
from mantid.simpleapi import LoadNexus
2
import numpy as np
3
4
5
6
7

peaks = LoadNexus('peaks.nxs')

for p in range(peaks.getNumberPeaks()):
    peak = peaks.getPeak(p)
8
9
    g = peak.getGoniometerMatrix()
    print(peak.getDetectorID(), peak.getQSampleFrame(), np.mod(np.arctan(g[0,2]/g[0,0])*180/np.pi,-180))