Ticket #9729: Rebert_Dalgleish01.py

File Rebert_Dalgleish01.py, 685 bytes (added by Karl Palmen, 6 years ago)

A LARMOR tube calibration script that works for release 3.1.0

Line 
1import numpy as np
2#import matplotlib.pyplot as plt
3from tube import calibrate
4from tube_spec import TubeSpec
5
6#high intensity Version 30x30mm beam
7w258=Load("258")
8for i in range(259,266):
9                print i
10                wtemp=Load(str(i))
11                w258=w258+wtemp
12
13w258int=Integration(w258,20000.0,100000.0)
14ws2=Integration(w258,45000.0,100000.0)
15
16known_pos1 = np.array([-0.297,-0.2,-0.1,0.0,0.1,0.2])
17known_pos1 = known_pos1 +(0.6165-0.571)
18print known_pos1
19
20peaks_form1 = 6*[1] # all the peaks are gaussian peaks
21tubes1=['LARMOR/LARMORSANSDetector/tube%d'%(i) for i in range(1,81)]
22print tubes1
23
24calibrationTable = calibrate(ws2,tubes1,known_pos1, peaks_form1,margin=20)
25
26