예제 #1
0
    def runTest(self):
        UseCompatibilityMode()
        SANS2DTUBES()
        MaskFile('USER_SANS2D_143ZC_2p4_4m_M4_Knowles_12mm.txt')
        SetDetectorOffsets('REAR', -16.0, 58.0, 0.0, 0.0, 0.0, 0.0)
        SetDetectorOffsets('FRONT', -44.0, -20.0, 47.0, 0.0, 1.0, 1.0)
        Gravity(False)
        Set1D()

        # add files (SAMPLE and CAN)
        time_shifts = [1]
        SANSadd2.add_runs(('28827', '28797'),
                          'SANS2DTUBES',
                          '.nxs',
                          rawTypes=('.add', '.raw', '.s*'),
                          lowMem=False,
                          saveAsEvent=True,
                          isOverlay=True,
                          time_shifts=time_shifts)
        SANSadd2.add_runs(('28823', '28793'),
                          'SANS2DTUBES',
                          '.nxs',
                          rawTypes=('.add', '.raw', '.s*'),
                          lowMem=False,
                          saveAsEvent=True,
                          isOverlay=True,
                          time_shifts=time_shifts)

        AssignSample(r'SANS2D00028797-add.nxs', reload=True)
        AssignCan(r'SANS2D00028793-add.nxs', reload=True)
        TransmissionSample(r'SANS2D00028808.nxs', r'SANS2D00028784.nxs')
        TransmissionCan(r'SANS2D00028823.nxs', r'SANS2D00028784.nxs')

        WavRangeReduction()
 def runTest(self):
     UseCompatibilityMode()
     SANS2D()
     MaskFile('MaskSANS2DReductionGUI.txt')
     AssignSample('22048')
     AssignCan('22023')
     TransmissionSample('22041', '22024')
     TransmissionCan('22024', '22024')
     reduced = WavRangeReduction()
     RenameWorkspace(reduced, OutputWorkspace='trans_test_rear')
예제 #3
0
 def runTest(self):
     UseCompatibilityMode()
     SANS2D()
     MaskFile(MASKFILE)
     AssignSample('22048')
     AssignCan('22023')
     TransmissionSample('22041', '22024')
     TransmissionCan('22024', '22024')
     SetEventSlices("0.0-450, 5-10")
     reduced = WavRangeReduction()
     RenameWorkspace(reduced, OutputWorkspace='trans_test_rear')
예제 #4
0
    def runTest(self):
        UseCompatibilityMode()
        SANS2D()
        MaskFile('MASKSANS2D.091A')
        Gravity(True)
        Set1D()

        AssignSample('992.raw')
        TransmissionSample('988.raw', '987.raw')
        AssignCan('993.raw')
        TransmissionCan('989.raw', '987.raw')
        CompWavRanges([3, 5, 7, 11], False)
 def runTest(self):
     UseCompatibilityMode()
     SANS2D()
     MaskFile('MaskSANS2DReductionGUI.txt')
     AssignSample('22048')
     AssignCan('22023')
     TransmissionSample('22041', '22024')
     TransmissionCan('22024', '22024')
     centre = FindBeamCentre(rlow=41.0, rupp=280.0, xstart=float(150)/1000., ystart=float(-160)/1000.,
                             tolerance=0.0001251, MaxIter=3, reduction_method=True)
     self.assertDelta(centre['pos2'], -0.145, 0.0001)
     self.assertDelta(centre['pos1'], 0.15, 0.0001)
예제 #6
0
    def runTest(self):
        UseCompatibilityMode()
        LOQ()
        Set1D()
        Detector("rear-detector")
        MaskFile('MASK.094AA')
        Gravity(False)
        SetCentre(324.765, 327.670)

        AssignSample('54431.raw')
        TransmissionSample('54435.raw', '54433.raw')
        AssignCan('54432.raw')
        TransmissionCan('54434.raw', '54433.raw')

        WavRangeReduction(3, 9, DefaultTrans)
예제 #7
0
    def runTest(self):
        # Select instrument and user file
        UseCompatibilityMode()
        SANS2DTUBES()
        MaskFile(file_name='USER_SANS2D_143ZC_2p4_4m_M4_Knowles_12mm.txt')

        # Setup detector positions
        SetDetectorOffsets(bank='REAR',
                           x=-16.0,
                           y=58.0,
                           z=0.0,
                           rot=0.0,
                           radius=0.0,
                           side=0.0)
        SetDetectorOffsets(bank='FRONT',
                           x=-44.0,
                           y=-20.0,
                           z=47.0,
                           rot=0.0,
                           radius=1.0,
                           side=1.0)
        Gravity(False)

        # Set the front detector fitting
        SetFrontDetRescaleShift(scale=1.0,
                                shift=0.0,
                                fitScale=True,
                                fitShift=True)
        Set1D()

        # Assign data
        AssignSample(r'SANS2D00028797.nxs', reload=True)
        AssignCan(r'SANS2D00028793.nxs', reload=True)
        TransmissionSample(r'SANS2D00028808.nxs', r'SANS2D00028784.nxs')
        TransmissionCan(r'SANS2D00028823.nxs', r'SANS2D00028784.nxs')

        # Run the reduction and request FRONT and BACK to be merged
        WavRangeReduction(combineDet="merged")