def runTest(self):
        UseCompatibilityMode()
        LARMOR()
        Set1D()
        Detector("DetectorBench")
        MaskFile(
            'USER_LARMOR_151B_LarmorTeam_80tubes_BenchRot1p4_M4_r3699.txt')
        Gravity(True)
        AddRuns(('13065', '13065'), 'LARMOR', 'nxs', lowMem=True)

        AssignSample('13065-add.nxs')
        WavRangeReduction(2, 4, DefaultTrans)

        # Clean up
        for element in AnalysisDataService.getObjectNames():
            if AnalysisDataService.doesExist(
                    element) and element != "13065p1rear_1D_2.0_4.0":
                AnalysisDataService.remove(element)

        paths = [
            os.path.join(config['defaultsave.directory'],
                         'LARMOR00013065-add.nxs'),
            os.path.join(config['defaultsave.directory'], 'SANS2D00013065.log')
        ]  # noqa
        for path in paths:
            if os.path.exists(path):
                os.remove(path)
Ejemplo n.º 2
0
 def runTest(self):
     ZOOM()
     MaskFile(
         "USER_ZOOM_SANSteam_4m_SampleChanger_202A_12mm_Large_BEAMSTOP.txt")
     AssignSample("ZOOM9898")
     TransmissionSample("ZOOM9947_histo", "ZOOM9947_histo")
     WavRangeReduction()
Ejemplo n.º 3
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()
Ejemplo n.º 4
0
    def runTest(self):
        UseCompatibilityMode()
        ZOOM()
        MaskFile("16812_Userfile.toml")
        Set1D()

        AssignSample('16182')
        WavRangeReduction()
Ejemplo n.º 5
0
 def runTest(self):
     UseCompatibilityMode()
     SANS2D()
     Set2D()
     MaskFile("USER_SANS2D_212A_2p4_4m_M4_Sans2d_Team_8mm_Changer_After_GuideRealignment.toml")
     AssignSample("SANS2D00068982.nxs")
     TransmissionSample("SANS2D00068976.nxs", "SANS2D00069299.nxs")
     self.returned = WavRangeReduction()
    def runTest(self):
        UseCompatibilityMode()
        ZOOM()
        MaskFile(
            "USER_ZOOM_SANSteam_4m_SampleChanger_202A_12mm_Large_BEAMSTOP.txt")
        Set1D()

        AssignSample('16182')
        WavRangeReduction()
Ejemplo n.º 7
0
 def runTest(self):
     """
     Loads data using raw event transmission data
     """
     ZOOM()
     MaskFile(
         "USER_ZOOM_SANSteam_4m_SampleChanger_202A_12mm_Large_BEAMSTOP.txt")
     AssignSample("ZOOM9898")
     TransmissionSample("ZOOM9946", "ZOOM9946")
     WavRangeReduction()
Ejemplo n.º 8
0
 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')
    def runTest(self):
        UseCompatibilityMode()
        SANS2D()
        Set1D()
        Detector("rear-detector")
        MaskFile('Mask_SANS2D_091_options.toml')
        Gravity(True)

        AssignSample('5512')
        self.reduced = WavRangeReduction()
Ejemplo n.º 10
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')
Ejemplo n.º 11
0
    def runTest(self):
        pass
        UseCompatibilityMode()
        SANS2D()
        Set1D()
        Detector("rear-detector")
        MaskFile('MASKSANS2Doptions.091A')
        Gravity(True)

        AssignSample('5512')
        self.reduced = WavRangeReduction()
Ejemplo n.º 12
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)
Ejemplo n.º 13
0
    def runTest(self):
        UseCompatibilityMode()
        SANS2D()
        MaskFile('MASKSANS2D_094i_RKH.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)

        extraLength = 1
        Gravity(True, extraLength)
        Set1D()
        AssignSample('2500.nxs')
        WavRangeReduction(4.6, 12.85, 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)
Ejemplo n.º 15
0
    def runTest(self):
        UseCompatibilityMode()
        LOQ()
        Set2D()
        Detector("main-detector-bank")
        MaskFile('MASK_094AA.toml')
        # apply some small artificial shift
        SetDetectorOffsets('REAR', -1.0, 1.0, 0.0, 0.0, 0.0, 0.0)
        Gravity(True)

        AssignSample('99630.RAW')  # They file seems to be named wrongly.
        AssignCan('99631.RAW')  # The file seems to be named wrongly.

        WavRangeReduction(None, None, False)
Ejemplo n.º 16
0
 def runTest(self):
     LARMOR()
     Set1D()
     Detector("DetectorBench")
     MaskFile('USER_Larmor_163F_HePATest_r13038.txt')
     AssignSample('13038')
     # Different in V2. We need to call the reduction in order to load the data. Hence we add the
     # WaveRangeReduction here.
     WavRangeReduction()
     base_name = "13038_sans_nxs_"
     number_of_workspaces = 4
     self._check_if_all_multi_period_workspaces_have_the_same_position(
         base_name, number_of_workspaces)
     self._clean_up(base_name, number_of_workspaces)
Ejemplo n.º 17
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)
Ejemplo n.º 18
0
    def runTest(self):
        UseCompatibilityMode()
        SANS2D()
        Set1D()
        Detector("rear-detector")
        MaskFile('MASKSANS2Doptions.091A')
        Gravity(True)
        AddRuns(('5512', '5512'), 'SANS2D', 'nxs', lowMem=True)

        # one period of a multi-period Nexus file
        AssignSample('5512-add.nxs', period=7)

        WavRangeReduction(2, 4, DefaultTrans)
        paths = [os.path.join(config['defaultsave.directory'], 'SANS2D00005512-add.nxs'),
                 os.path.join(config['defaultsave.directory'], 'SANS2D00005512.log')]
        for path in paths:
            if os.path.exists(path):
                os.remove(path)
Ejemplo n.º 19
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")
 def runTest(self):
     UseCompatibilityMode()
     SANS2D()
     MaskFile('MaskSANS2DReductionGUI_LimitEventsTime.txt')
     AssignSample('22048')
     WavRangeReduction()