Exemple #1
0
from mantid.simpleapi import *
import tube

tube.readCalibrationFile(
    'CalibTable',
    '/SNS/users/rwp/corelli/tube_calibration2/CalibTable2_combined.txt')

corelli = LoadEmptyInstrument(InstrumentName='CORELLI')
ApplyCalibration('corelli', 'CalibTable')
LoadIsawDetCal('corelli',
               '/SNS/users/rwp/corelli/cal_2018_05/a/Aligned3.nxs.detcal')

SaveNexus('corelli',
          '/SNS/users/rwp/corelli/cal_2018_05/a/TubeCalib+DetCal.nxs')
Exemple #2
0
from mantid.simpleapi import SaveNexus
import tube

tube.readCalibrationFile(
    'CalibTable',
    '/SNS/users/rwp/corelli/tube_calibration/calib_quad_new3.txt')
SaveNexus('CalibTable',
          '/SNS/users/rwp/corelli/tube_calibration/calibtable.nxs')
from mantid.simpleapi import LoadDiffCal, mtd, LoadEmptyInstrument, CalculateDIFC, MaskBTP, CloneWorkspace, SaveDiffCal, ApplyCalibration
import matplotlib.pyplot as plt
import tube
import numpy as np
import numpy.ma as ma

tube.readCalibrationFile(
    'CalibTable', '/SNS/users/rwp/corelli/tube_calibration/CalibTableNew.txt')

corelli = LoadEmptyInstrument(InstrumentName='CORELLI')
corelli = CalculateDIFC(corelli)
difc0 = corelli.extractY().flatten()
ApplyCalibration('corelli', 'CalibTable')
corelli = CalculateDIFC(corelli)
difc = corelli.extractY().flatten()

plt.plot(difc / difc0)
plt.show()

LoadDiffCal(
    Filename='../cal_Si_C60/cal_Si2_47327-47334_TubeCal_sum16_mask_lt_2.cal',
    InstrumentName='CORELLI',
    WorkspaceName='si')
MaskBTP(Workspace='si_mask', Pixel="1-16,241-256")

LoadDiffCal(
    Filename='../cal_Si_C60/cal_C60_2_47367-47382_TubeCal_sum16_mask_lt_2.h5',
    InstrumentName='CORELLI',
    WorkspaceName='c60')
MaskBTP(Workspace='c60_mask', Pixel="1-16,241-256")
Exemple #4
0
import tube
tube.readCalibrationFile('CalibTable','/SNS/users/rwp/corelli/tube_calibration/calib.txt')

data_org=LoadEventNexus('/SNS/CORELLI/IPTS-18479/nexus/CORELLI_47301.nxs.h5',BankName='bank33,bank45,bank57')
data=LoadEventNexus('/SNS/CORELLI/IPTS-18479/nexus/CORELLI_47301.nxs.h5',BankName='bank33,bank45,bank57')

ApplyCalibration(data,'CalibTable')


tube.readCalibrationFile('CalibTable','/SNS/users/rwp/corelli/tube_calibration/calib.txt')

data_org=Load('CORELLI_47301-47304',BankName='bank33,bank45,bank57')
data=Load('CORELLI_47301-47304',BankName='bank33,bank45,bank57')

ApplyCalibration(data,'CalibTable')


tube.readCalibrationFile('CalibTable2','/SNS/users/rwp/corelli/tube_calibration/calib2.txt')

data2=Load('CORELLI_47301-47304',BankName='bank33,bank45,bank57')

ApplyCalibration(data2,'CalibTable2')


tube.readCalibrationFile('CalibTable3','/SNS/users/rwp/corelli/tube_calibration/calib3.txt')

data3=Load('CORELLI_47301-47304',BankName='bank33,bank45,bank57')

ApplyCalibration(data3,'CalibTable3')