def runTest(self):
        ws = LoadRaw(Filename='WISH00038237.raw', OutputWorkspace='38237')
        ws = ConvertUnits(ws, 'dSpacing', OutputWorkspace='38237')
        UB = np.array([[-0.00601763,  0.07397297,  0.05865706],
                       [ 0.05373321,  0.050198,   -0.05651455],
                       [-0.07822144,  0.0295911,  -0.04489172]])

        SetUB(ws, UB=UB)

        self._peaks = PredictPeaks(ws, WavelengthMin=0.1, WavelengthMax=100,
                                   OutputWorkspace='peaks')
        # We specifically want to check peak -5 -1 -7 exists, so filter for it
        self._filtered = FilterPeaks(self._peaks, "h^2+k^2+l^2", 75, '=',
                                     OutputWorkspace='filtered')

        SaveIsawPeaks(self._peaks, Filename='WISHSXReductionPeaksTest.peaks')
Esempio n. 2
0
        FindUBUsingIndexedPeaks(PeaksWorkspace=peaks_ws, Tolerance=tolerance)

    else:
        print "Only integrating FOUND peaks ...."

    #
    #Delete MD workspace
    AnalysisDataService.remove(MDEW.name())

    #
    # Save UB and peaks file, so if something goes wrong latter, we can at least
    # see these partial results
    #
    SaveIsawUB(InputWorkspace=peaks_ws, Filename=run_niggli_matrix_file)
    SaveIsawPeaks(InputWorkspace=peaks_ws,
                  AppendFile=False,
                  Filename=run_niggli_integrate_file)

    #
    # Set the monitor counts for all the peaks that will be integrated
    #
    #
    # Set the monitor counts for all the peaks that will be integrated
    #
    num_peaks = peaks_ws.getNumberPeaks()
    for i in range(num_peaks):
        peak = peaks_ws.getPeak(i)
        if use_monitor_counts:
            peak.setMonitorCount(monitor_count)
        else:
            peak.setMonitorCount(proton_charge)