Skip to content

Commit 14aecdf

Browse files
committed
Moe data for plotting to dashui
1 parent 667ba32 commit 14aecdf

16 files changed

Lines changed: 1097 additions & 12 deletions

dashui/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def main():
7474
if len(sys.argv)>1 and '--single' in sys.argv:
7575
global single_user_mode
7676
single_user_mode = True
77+
import webbrowser
78+
webbrowser.open_new('http://localhost:8050/')
7779

7880
if len(sys.argv)>1 and sys.argv[1] == 'debug':
7981
app.run_server(debug=True, threaded=True)

dashui/arcs/V_Cali_Int_Res_FC1_2018_v2.dat

Lines changed: 299 additions & 0 deletions
Large diffs are not rendered by default.

dashui/arcs/V_Cali_Int_Res_FC1_HighRes_2018_v2.dat

Lines changed: 129 additions & 0 deletions
Large diffs are not rendered by default.

dashui/arcs/V_Cali_Int_Res_FC2_2018_v2.dat

Lines changed: 185 additions & 0 deletions
Large diffs are not rendered by default.

dashui/arcs/arcs-09122018.yaml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: ARCS
2+
# Input file for PyChop2 for the ARCS spectrometer at SNS.
3+
4+
chopper_system:
5+
name: ARCS chopper system
6+
chop_sam: 2.0 # Distance (x1) from final chopper to sample (m)
7+
sam_det: 3.0 # Distance (x2) from sample to detector (m)
8+
aperture_width: 0.1751 # Width of aperture at moderator face (m)
9+
aperture_height: 0.1955 # Height of aperture at moderator face (m)
10+
choppers:
11+
- # Each entry must have a dash on an otherwise empty line!
12+
name: ARCS Fermi
13+
distance: 11.61 # Distance from moderator to this chopper in metres
14+
aperture_distance: 9.342 # Distance from aperture (moderator face) to this chopper (only for Fermi)
15+
packages: # A hash of chopper packages
16+
ARCS-100-1.5-AST:
17+
name: ARCS 100 meV Sloppy
18+
pslit: 1.52 # Neutron transparent slit width (mm)
19+
pslat: 0.35 # Neutron absorbing slat width (mm)
20+
radius: 50.0 # Chopper package radius (mm)
21+
rho: 580.0 # Chopper package curvature (mm)
22+
tjit: 0.0 # Jitter time (us)
23+
fluxcorr: 3.0 # (Empirical/Fudge) factor to scale calculated flux by
24+
isPi: False # Should the PI pulse (at 180 deg rotation) be transmitted by this package?
25+
ARCS-700-1.5-AST:
26+
name: ARCS 700 meV Sloppy
27+
pslit: 1.52 # Neutron transparent slit width (mm)
28+
pslat: 0.35 # Neutron absorbing slat width (mm)
29+
radius: 50.0 # Chopper package radius (mm)
30+
rho: 1535.0 # Chopper package curvature (mm)
31+
tjit: 0.0 # Jitter time (us)
32+
fluxcorr: 3.0 # (Empirical/Fudge) factor to scale calculated flux by
33+
isPi: False # Should the PI pulse (at 180 deg rotation) be transmitted by this package?
34+
ARCS-700-0.5-AST:
35+
name: ARCS 700 meV Fine
36+
pslit: 0.51 # Neutron transparent slit width (mm)
37+
pslat: 0.35 # Neutron absorbing slat width (mm)
38+
radius: 50.0 # Chopper package radius (mm)
39+
rho: 1535.0 # Chopper package curvature (mm)
40+
tjit: 0.0 # Jitter time (us)
41+
fluxcorr: 3.0 # (Empirical/Fudge) factor to scale calculated flux by
42+
isPi: False # Should the PI pulse (at 180 deg rotation) be transmitted by this package?
43+
ARCS-100-1.5-SMI:
44+
name: ARCS 100 meV Sloppy
45+
pslit: 1.5 # Neutron transparent slit width (mm)
46+
pslat: 0.41 # Neutron absorbing slat width (mm)
47+
radius: 50.0 # Chopper package radius (mm)
48+
rho: 640.0 # Chopper package curvature (mm)
49+
tjit: 0.0 # Jitter time (us)
50+
fluxcorr: 3.0 # (Empirical/Fudge) factor to scale calculated flux by
51+
isPi: False # Should the PI pulse (at 180 deg rotation) be transmitted by this package?
52+
ARCS-700-1.5-SMI:
53+
name: ARCS 700 meV Sloppy
54+
pslit: 1. # Neutron transparent slit width (mm)
55+
pslat: 0.41 # Neutron absorbing slat width (mm)
56+
radius: 50.0 # Chopper package radius (mm)
57+
rho: 1535.0 # Chopper package curvature (mm)
58+
tjit: 0.0 # Jitter time (us)
59+
fluxcorr: 3.0 # (Empirical/Fudge) factor to scale calculated flux by
60+
isPi: False # Should the PI pulse (at 180 deg rotation) be transmitted by this package?
61+
SEQ-100-2.0-AST:
62+
name: ARCS 100 meV Sloppy
63+
pslit: 2.03 # Neutron transparent slit width (mm)
64+
pslat: 0.35 # Neutron absorbing slat width (mm)
65+
radius: 50.0 # Chopper package radius (mm)
66+
rho: 580.0 # Chopper package curvature (mm)
67+
tjit: 0.0 # Jitter time (us)
68+
fluxcorr: 3.0 # (Empirical/Fudge) factor to scale calculated flux by
69+
isPi: False # Should the PI pulse (at 180 deg rotation) be transmitted by this package?
70+
SEQ-700-3.5-AST:
71+
name: ARCS 700 meV Sloppy
72+
pslit: 3.56 # Neutron transparent slit width (mm)
73+
pslat: 0.35 # Neutron absorbing slat width (mm)
74+
radius: 50.0 # Chopper package radius (mm)
75+
rho: 1535.0 # Chopper package curvature (mm)
76+
tjit: 0.0 # Jitter time (us)
77+
fluxcorr: 3.0 # (Empirical/Fudge) factor to scale calculated flux by
78+
isPi: False # Should the PI pulse (at 180 deg rotation) be transmitted by this package?
79+
# Now define how the frequencies of the choppers should be related
80+
# This is an NxM matrix A where N is the number of choppers and M is the number of indepdent frequencies
81+
# Such that A.F will give the N required frequencies for each chopper from the M input frequencies
82+
frequency_matrix:
83+
[[1]] # f1 is the Fermi frequency
84+
max_frequencies:
85+
[600] # Maximum frequencies (Hz)
86+
default_frequencies:
87+
[300]
88+
89+
sample:
90+
name: ARCS Sample Can
91+
isam: 0 # Sample type: 0==flat plate, 1==ellipse, 2==annulus, 3==sphere, 4==solid cylinder
92+
sx: 2.0 # Thickness (mm)
93+
sy: 48.0 # Width (mm)
94+
sz: 48.0 # Height (mm)
95+
gamma: 0.0 # Angle of x-axis to ki (degrees)
96+
97+
detector:
98+
name: He3 PSD tubes
99+
idet: 2 # Detector type: 1==He tube binned together, 2==He tube
100+
dd: 0.025 # Detector depth (diameter for tube) in metres
101+
tbin: 0.0 # Detector time bins (microseconds)
102+
phi: 0.0 # Detector scattering angle (degrees)
103+
tthlims: [2.373, 135.955] # Min and max 2-theta angles of detectors (for Q-E plot)
104+
105+
moderator:
106+
name: Ambient Water # A==water, AP==poisoned water, CH4==methane, H2==hydrogen. This is only used for analytical calculations
107+
# of the flux distribution for ISIS TS1 moderators. If measured_flux is defined below, name can be anything
108+
imod: 1 # Moderator time profile type: 0==chi^2, 1==Old_Ikeda-Carpenter, 2==modified chi^2, 3==polynomial, 4==Tobyfit Ikeda-Carpenter
109+
mod_pars: [281., 79.0, # Parameters for time profile (for I-K is: [S1, S2, B1, B2, Emod]
110+
.087, .4, 172.] # where tau_f=1/(sqrt(Ei)*E2V*sqrt(S1^2+(S2*lam)^2), tau_s=1/B1 for E<=130meV, 1/B2 otherwise, R=exp(-Ei/Emod)
111+
# and the overall variance (not FWHM) is: tau^2 = 3/tau_f^2 + R/(2-R)/tau_s^2
112+
theta: -13.75 # Angle beamline makes with moderator face (degrees)
113+
source_rep: 60 # Frequency of source (Hz)
114+
measured_flux: # Table of measured flux vs wavelength. Wavelength in Angstrom. Flux in n/cm^2/s/uA/Angstrom
115+
scale_factor: 1. # A factor to scale the flux values below by
116+
wavelength: [0.28601414576833351, 0.29616861080662232, 0.30668359353866664, 0.31757189355627352, 0.32884676487984915, 0.34052193209214343, 0.35261160704479783, 0.36513050615803061, 0.37809386833452097, 0.39151747350929472, 0.40541766185819367, 0.41981135368831168, 0.43471607003460611, 0.45014995398775937, 0.46613179277925221, 0.48268104065052947, 0.49981784253410028, 0.5175630585753952, 0.53593828952523304, 0.55496590303380511, 0.57466906087818581, 0.59507174715650868, 0.61619879748313355, 0.63807592922033896, 0.66072977278334122, 0.68418790405674834, 0.70847887796190545, 0.73363226321599551, 0.75967867832520353, 0.78664982885576173, 0.81457854602823976, 0.84349882668206377, 0.87344587465890866, 0.90445614365534355, 0.93656738159688513, 0.969818676587485, 1.0042505044903745, 1.0399047781981905, 1.0768248986523594, 1.1150558076738351, 1.1546440426695133, 1.1956377932809006, 1.2380869600440081, 1.2820432151318641, 1.3275600652535944, 1.3746929167866273, 1.4234991432213153, 1.4740381550000654, 1.5263714718359951, 1.5805627975991423, 1.6366780978613906, 1.6947856801944969, 1.7549562773189731, 1.8172631332050293, 1.8817820922303938, 1.9485916915035324, 2.0177732564646584, 2.0894109998808901, 2.1635921243560827, 2.2404069284800938, 2.3199489167467102, 2.4023149133740307, 2.4876051801658536, 2.5759235385575425, 2.6673774959949301, 2.762078376800098, 2.8601414576833353, 2.9616861080662242, 3.0668359353866661, 3.1757189355627351, 3.2884676487984921, 3.4052193209214345, 3.5261160704479786, 3.6513050615803064, 3.780938683345211, 3.9151747350929473, 4.0541766185819386, 4.1981135368831177, 4.3471607003460608, 4.5014995398775941, 4.6613179277925214, 4.8268104065052952, 4.9981784253410035, 5.175630585753952, 5.3593828952523292, 5.5496590303380522, 5.7466906087818588, 5.9507174715650875, 6.1619879748313364, 6.3807592922033907, 6.6072977278334157, 6.8418790405674859, 7.0847887796190561, 7.3363226321599546, 7.5967867832520346, 7.866498288557616, 8.1457854602823971, 8.4349882668206373, 8.7344587465890875, 9.0445614365534368]
117+
flux: [25276.821244674764, 28722.723407923262, 30360.473049322729, 33984.736292474241, 35854.454907360159, 37721.888451513369, 41792.101597201276, 45450.508563093113, 48323.974753436923, 52677.150482905265, 53810.476756526761, 58355.292747301173, 60130.332759471909, 65066.09090594935, 69045.858337315658, 72437.898974947966, 80728.676179699396, 87002.521650256065, 91084.890656927688, 98323.28542422819, 105006.17676779242, 114322.08986347441, 126171.54613173187, 139218.61294605921, 151521.41609409908, 161409.6958591649, 189259.48264800446, 210587.69758960878, 242242.73125719716, 268099.91882613447, 301397.72323530738, 340189.43392865575, 386431.19630181114, 439606.75079753564, 490872.55069392739, 559056.15358305548, 598054.68010369327, 642867.30642169702, 682214.88617398019, 735770.18390646728, 789062.37807587918, 843435.70552473445, 892067.84175600309, 932069.58753616642, 960829.52260059584, 977838.59389104007, 991797.75904680265, 1000337.9175057374, 982396.29545647511, 966139.49995927035, 951371.50707512058, 957975.67004690482, 970869.50658444816, 979478.07901000162, 986052.74143295304, 967911.34861546499, 896279.74583482195, 829475.87333898549, 779461.92206302506, 748939.9422760657, 720475.04177324544, 693928.58029561746, 673063.46634146478, 654417.17264869832, 637027.57674385677, 620809.98140205501, 605685.3977078927, 559996.66818095162, 517387.20610928442, 477649.47917235375, 440589.94203344069, 406028.09366374754, 373795.59819970129, 343735.46505153348, 320318.31796563335, 300587.22403512523, 282185.93979786616, 265024.84053124895, 249020.34191900652, 234094.49294804141, 220174.5962426459, 207192.8539869253, 195086.037710865, 183795.1803317109, 173265.28895073067, 163445.07700651177, 154286.71448023061, 145745.59493625097, 137780.11826340586, 130351.48805879033, 129879.12053379402, 129879.12053379402, 129879.12053379402, 129879.12053379402, 129879.12053379402, 129879.12053379402, 129879.12053379402, 129879.12053379402, 129879.12053379402, 129879.12053379402]
118+

dashui/arcs/exp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def __init__(self, datafile):
2323
self.Ei_list = list(vdata.Energy.unique())
2424
return
2525

26-
fc1data = ExpData(os.path.join(here, '../../ARCS//V_Cali_Int_Res_FC1_2018_v2.dat'))
27-
fc2data = ExpData(os.path.join(here, '../../ARCS/V_Cali_Int_Res_FC2_2018_v2.dat'))
28-
fc1_highres_data = ExpData(os.path.join(here, '../../ARCS/V_Cali_Int_Res_FC1_HighRes_2018_v2.dat'))
26+
fc1data = ExpData(os.path.join(here, 'V_Cali_Int_Res_FC1_2018_v2.dat'))
27+
fc2data = ExpData(os.path.join(here, 'V_Cali_Int_Res_FC2_2018_v2.dat'))
28+
fc1_highres_data = ExpData(os.path.join(here, 'V_Cali_Int_Res_FC1_HighRes_2018_v2.dat'))
2929
vscatt_scale = 2.6e4
3030
vscatt_scale *=60./1.4
3131
vscatt_scale *= 1.5/2

dashui/arcs/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from PyChop import PyChop2
88

9-
yamlpath = os.path.join(here, '../../ARCS/PyChop/arcs-09122018.yaml')
9+
yamlpath = os.path.join(here, './arcs-09122018.yaml')
1010

1111
scale_flux = 600
1212

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# RunNumber Energy Ei Chopper1 Chopper2 Chopper3 Chopper41 Chopper42 Height FWHM Sigma Q counts
2+
0.000000000000000000e+00 2.744700000000000000e+05 8.174512000000000000e+01 8.174512000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 3.598896681607319497e-03 1.307921920000012506e+01 5.553808577494745435e+00 4.409916659196217559e+00 1.546629000000000000e+06
3+
0.000000000000000000e+00 2.744710000000000000e+05 3.633116444440000237e+01 3.633116444440000237e+01 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 3.851687618020259440e-02 3.633116444440176451e+00 1.542724604857824477e+00 2.939944336811701309e+00 4.933398000000000000e+06
4+
0.000000000000000000e+00 2.744720000000000000e+05 2.043628000000000000e+01 2.043628000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 2.841953360904116432e-01 1.594029840000015241e+00 6.768704203821720444e-01 2.373677233854929458e+00 1.687735900000000000e+07
5+
0.000000000000000000e+00 2.744730000000000000e+05 1.307921920000000071e+01 1.307921920000000071e+01 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 1.216110111195118026e+00 7.978323711999859569e-01 3.387823232271702789e-01 1.898941755294799805e+00 3.727807300000000000e+07
6+
0.000000000000000000e+00 2.744740000000000000e+05 9.082791111109999704e+00 9.082791111109999704e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 2.039297605140208525e+00 4.723051377777309767e-01 2.005541986317329051e-01 1.582451383272806877e+00 3.692773900000000000e+07
7+
0.000000000000000000e+00 2.744750000000000000e+05 6.673071020410000109e+00 6.673071020410000109e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 2.150287114827281520e+00 2.936151248980465311e-01 1.246773354131832379e-01 1.356387001772721534e+00 2.803871400000000000e+07
8+
0.000000000000000000e+00 2.744760000000000000e+05 5.109070000000000000e+00 5.109070000000000000e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 1.919697527414102822e+00 1.992537300000019052e-01 8.460880254777150555e-02 1.186838616927464729e+00 1.733520900000000000e+07
9+
0.000000000000000000e+00 2.744770000000000000e+05 4.036796049380000362e+00 4.036796049380000362e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 6.566878986694968390e+00 1.372510656789165395e-01 5.828070729465670285e-02 1.054967641830444336e+00 3.846180200000000000e+07
10+
0.000000000000000000e+00 2.744780000000000000e+05 3.269804800000000178e+00 3.269804800000000178e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 8.378972387905170294e+00 1.046337535999981583e-01 4.443046861995675334e-02 9.494708776473999023e-01 3.688845000000000000e+07
11+
0.000000000000000000e+00 2.744790000000000000e+05 2.702318016530000033e+00 2.702318016530000033e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 8.314016062600387613e+00 7.836722247936944719e-02 3.327695222053904389e-02 8.631553500890731812e-01 2.815783700000000000e+07
12+
0.000000000000000000e+00 2.744800000000000000e+05 2.270697777780000148e+00 2.270697777780000148e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 8.232228074110633287e+00 5.676744444449988158e-02 2.410507195095536528e-02 7.912256916364034387e-01 2.095405500000000000e+07
13+
0.000000000000000000e+00 2.744810000000000000e+05 1.934795739639999956e+00 1.934795739639999956e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 7.358635519803867986e+00 4.836989349099884983e-02 2.053923290488273920e-02 7.303622439503669739e-01 1.537691100000000000e+07
14+
0.000000000000000000e+00 2.744820000000000000e+05 1.668267755100000027e+00 1.668267755100000027e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 6.366161571999571223e+00 4.003842612239960630e-02 1.700145482904441910e-02 6.781935008863607672e-01 1.109313600000000000e+07
15+
0.000000000000000000e+00 2.744830000000000000e+05 1.453246577780000104e+00 1.453246577780000104e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 5.817634396585875223e+00 3.051817813338020269e-02 1.295888668084085003e-02 6.329805850982666016e-01 7.963077000000000000e+06
16+
0.000000000000000000e+00 2.744840000000000000e+05 1.277267500000000000e+00 1.277267500000000000e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 4.825889807831146072e+00 2.682261750000025646e-02 1.138964649681539591e-02 5.934193084637323645e-01 5.719950000000000000e+06
17+
0.000000000000000000e+00 2.744850000000000000e+05 1.131420346020000078e+00 1.131420346020000078e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 3.898619259377042567e+00 2.375982726641967524e-02 1.008909862692979921e-02 5.585122630000114441e-01 4.119339000000000000e+06
18+
0.000000000000000000e+00 2.744860000000000000e+05 1.009199012350000091e+00 1.009199012350000091e+00 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 3.175972052687377811e+00 1.917478123464944062e-02 8.142157636793817890e-03 5.274838209152221680e-01 2.963116000000000000e+06
19+
0.000000000000000000e+00 2.744870000000000000e+05 9.057631024929999608e-01 9.057631024929999608e-01 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 2.735759370970221482e+00 1.630373584487432304e-02 6.923030082749181795e-03 4.997214997808138714e-01 2.137275000000000000e+06
20+
0.000000000000000000e+00 2.744880000000000000e+05 8.174512000000000445e-01 8.174512000000000445e-01 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 2.148098389541991171e+00 1.471412159999974101e-02 6.248034649681418438e-03 4.747354388236999512e-01 1.551615000000000000e+06
21+
0.000000000000000000e+00 2.744890000000000000e+05 7.414523356009999899e-01 7.414523356009999899e-01 6.000000000000000000e+01 6.000000000000000000e+01 6.000000000000000000e+01 3.000000000000000000e+02 3.000000000000000000e+02 1.673398509170483051e+00 1.260468970521738674e-02 5.352309853595493307e-03 4.521290014187495099e-01 1.139830000000000000e+06

0 commit comments

Comments
 (0)