示例#1
0
    def loadSettings(self):
        i.ReductionSingleton().instrument.setDetector('rear-detector')
        i.SetCentre('155.45', '-169.6', 'rear')
        i.SetCentre('155.45', '-169.6', 'front')
        SCATTER_SAMPLE, logvalues = i.AssignSample(r'SANS2D00022048.nxs',
                                                   reload=True,
                                                   period=1)

        dummy_1 = SCATTER_SAMPLE
        dummy_2 = logvalues

        i.SetCentre('155.45', '-169.6', 'rear')
        i.SetCentre('155.45', '-169.6', 'front')
        SCATTER_SAMPLE, logvalues = i.AssignCan(r'SANS2D00022023.nxs',
                                                reload=True,
                                                period=1)

        dummy_3 = SCATTER_SAMPLE
        dummy_4 = logvalues

        t1, t2 = i.TransmissionSample(r'SANS2D00022041.nxs',
                                      r'SANS2D00022024.nxs',
                                      period_t=1,
                                      period_d=1)

        t1, t2 = i.TransmissionCan(r'SANS2D00022024.nxs',
                                   r'SANS2D00022024.nxs',
                                   period_t=1,
                                   period_d=1)
示例#2
0
    def runTest(self):

        i.SANS2DTUBES()
        i.MaskFile('USER_SANS2D_143ZC_2p4_4m_M4_Knowles_12mm.txt')
        i.SetDetectorOffsets('REAR', -16.0, 58.0, 0.0, 0.0, 0.0, 0.0)
        i.SetDetectorOffsets('FRONT', -44.0, -20.0, 47.0, 0.0, 1.0, 1.0)
        i.Gravity(False)
        i.Set1D()

        # add files (SAMPLE and CAN)
        time_shifts=[1]
        import SANSadd2
        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)

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

        i.WavRangeReduction()
示例#3
0
 def runTest(self):
     i.SANS2D()
     i.MaskFile(MASKFILE)
     i.AssignSample('22048')
     i.AssignCan('22023')
     i.TransmissionSample('22041', '22024')
     i.TransmissionCan('22024', '22024')
     reduced = i.WavRangeReduction()
     RenameWorkspace(reduced, OutputWorkspace='trans_test_rear_1D_1.5_12.5')
示例#4
0
 def runTest(self):
     i.SANS2D()
     i.MaskFile(MASKFILE)
     i.AssignSample('22048')
     i.AssignCan('22023')
     i.TransmissionSample('22041','22024')
     i.TransmissionCan('22024', '22024')
     i.SetEventSlices("0.0-450, 5-10")
     reduced = i.WavRangeReduction()
     RenameWorkspace(reduced, OutputWorkspace='trans_test_rear')
    def runTest(self):
        self.initialization()

        self.checkFirstPart()

        # add files (SAMPLE and CAN)
        import SANSadd2
        SANSadd2.add_runs(('22048', '22048'),
                          'SANS2D',
                          '.nxs',
                          rawTypes=('.add', '.raw', '.s*'),
                          lowMem=False)
        SANSadd2.add_runs(('22023', '22023'),
                          'SANS2D',
                          '.nxs',
                          rawTypes=('.add', '.raw', '.s*'),
                          lowMem=False)

        # load values:
        i.SetCentre('155.45', '-169.6', 'rear')
        i.SetCentre('155.45', '-169.6', 'front')
        i.AssignSample(r'SANS2D00022048-add.nxs', reload=True, period=1)
        i.AssignCan(r'SANS2D00022023-add.nxs', reload=True, period=1)
        i.TransmissionSample(r'SANS2D00022041.nxs',
                             r'SANS2D00022024.nxs',
                             period_t=1,
                             period_d=1)
        i.TransmissionCan(r'SANS2D00022024.nxs',
                          r'SANS2D00022024.nxs',
                          period_t=1,
                          period_d=1)

        self.checkAfterLoad()

        self.applyGUISettings()

        self.applySampleSettings()
        _user_settings_copy = copy.deepcopy(
            i.ReductionSingleton().user_settings)

        reduced = i.WavRangeReduction(full_trans_wav=False, resetSetup=False)
        RenameWorkspace(reduced, OutputWorkspace='trans_test_rear')

        self.checkFittingSettings()
        self.cleanReduction(_user_settings_copy)
示例#6
0
    def runTest(self):

        i.SANS2DTUBES()
        i.MaskFile('USER_SANS2D_143ZC_2p4_4m_M4_Knowles_12mm.txt')
        i.SetDetectorOffsets('REAR', -16.0, 58.0, 0.0, 0.0, 0.0, 0.0)
        i.SetDetectorOffsets('FRONT', -44.0, -20.0, 47.0, 0.0, 1.0, 1.0)
        i.Gravity(False)
        i.Set1D()

        # add files (SAMPLE and CAN) using the ISISCommandInterface
        runs_sample = ('28827','28797')
        i.AddRuns(runs_sample, instrument = 'SANS2DTUBES', saveAsEvent=True)
        runs_can = ('28823','28793')
        i.AddRuns(runs_can, instrument = 'SANS2DTUBES', saveAsEvent=True)

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

        i.WavRangeReduction()
示例#7
0
    def runTest(self):
        # Select instrument and user file
        i.SANS2DTUBES()
        i.MaskFile(file_name = 'USER_SANS2D_143ZC_2p4_4m_M4_Knowles_12mm.txt')

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

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

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

        # Run the reduction and request FRONT and BACK to be merged
        i.WavRangeReduction(combineDet="merged")
    return mtd[name]


###############################################
##  REDUCTION TESTS
#################################################


###########
# required
############
ici.LARMOR()
ici.MaskFile('~/MaskLarmor.txt')

ici.AssignSample('73') 

##########
# optional
##########
# TransmissionSample (transmission, direct)
ici.TransmissionSample('73', '53')
# AssignCan
ici.AssignCan('70')
# TransmissionCan (transmission, direct)
ici.TransmissionCan('70','72')

############
# required
############
reduced = bankReduction(ici.ReductionSingleton())