Skip to content

Commit 5998acc

Browse files
welbournRjmborr
andauthored
Commenting workflow and fixes to dr calculations and resolution calculation (#77)
* adding comments to reflectivity processing workflow and correcting q bin steps * fix to compute resolution function and adding new resolution function for gaussian equivalent ready for future testing * correct errors on previous changes after testing * correct errors on previous changes after testing * corrected propagation of weighted workflow errors * fixes after running tests and new test files * clarify the q range Signed-off-by: Jose Borreguero <borreguero@gmail.com> * stub unit test file for event_reduction Signed-off-by: Jose Borreguero <borreguero@gmail.com> * reorder function options for clarity * rename parameters in error calculation for clarity * fix removal of negative qz * remove unnecessary import * add test for trapezoidal to gaussian function * add additional clarification points from PR responses * refactor error calculation for normalized reflectivity to improve robustness --------- Signed-off-by: Jose Borreguero <borreguero@gmail.com> Co-authored-by: Jose Borreguero <borreguero@gmail.com>
1 parent 12d6f6a commit 5998acc

12 files changed

+1548
-1104
lines changed

reduction/data/reference_fbck.txt

Lines changed: 252 additions & 229 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
1.163378023199675496e-02 1.333231452768262271e+00 1.120325216433914889e-01
2-
1.186645583663669019e-02 1.272776318767768089e+00 9.704521675696667349e-02
3-
1.210378495336942445e-02 1.229402657601808224e+00 8.665255869866364535e-02
4-
1.234586065243681308e-02 1.165307025507555494e+00 7.942147719880700285e-02
5-
1.259277786548554899e-02 1.229105460998366484e+00 7.754071561638081755e-02
6-
1.284463342279526001e-02 1.170930115369047453e+00 7.092123081092836789e-02
7-
1.310152609125116510e-02 1.084928715184935166e+00 6.408731424751080985e-02
8-
1.336355661307618917e-02 1.261171329706206601e+00 6.623254129901129383e-02
9-
1.363082774533771330e-02 1.124471278305815725e+00 6.069356257827169393e-02
10-
1.390344430024446735e-02 1.219348911006870706e+00 5.883114629558970632e-02
11-
1.418151318624935597e-02 1.036269517915203942e+00 5.177554777259834456e-02
12-
1.446514344997434399e-02 6.633964854841288838e-01 3.911897643624936277e-02
13-
1.475444631897383091e-02 5.473469522311991131e-01 3.419214516579200530e-02
14-
1.504953524535330989e-02 5.244791188922898195e-01 3.172859091826243233e-02
15-
1.535052595026037414e-02 5.339733198163237882e-01 3.079313553587632174e-02
16-
1.565753646926558440e-02 5.311423897407376860e-01 2.954501815311255664e-02
17-
1.597068719865089512e-02 5.208062067105466708e-01 2.730162033661712520e-02
18-
1.629010094262391128e-02 4.660024888970181189e-01 2.484147923614480821e-02
19-
1.661590296147639340e-02 4.632706508823502545e-01 2.354937144261598850e-02
1+
1.163378023199675496e-02 1.333231452768262271e+00 1.141463277179101399e-01
2+
1.186645583663669019e-02 1.272776318767768089e+00 9.874101251998081141e-02
3+
1.210378495336942445e-02 1.229402657601808224e+00 8.815184829559442881e-02
4+
1.234586065243681308e-02 1.165307025507555494e+00 8.072274010265699518e-02
5+
1.259277786548554899e-02 1.229105460998366484e+00 7.889718931466667418e-02
6+
1.284463342279526001e-02 1.170930115369047453e+00 7.211405546702648328e-02
7+
1.310152609125116510e-02 1.084928715184935166e+00 6.508047344067265094e-02
8+
1.336355661307618917e-02 1.261171329706206601e+00 6.742919585943296656e-02
9+
1.363082774533771330e-02 1.124471278305815725e+00 6.163145502893229571e-02
10+
1.390344430024446735e-02 1.219348911006870706e+00 5.985852257414317479e-02
11+
1.418151318624935597e-02 1.036269517915203942e+00 5.252689614050220362e-02
12+
1.446514344997434399e-02 6.633964854841288838e-01 3.949067176696761244e-02
13+
1.475444631897383091e-02 5.473469522311991131e-01 3.445692909551732047e-02
14+
1.504953524535330989e-02 5.244791188922898195e-01 3.196347385107557726e-02
15+
1.535052595026037414e-02 5.339733198163237882e-01 3.102158565128099871e-02
16+
1.565753646926558440e-02 5.311423897407376860e-01 2.975862979701968114e-02
17+
1.597068719865089512e-02 5.208062067105466708e-01 2.750157782415166632e-02
18+
1.629010094262391128e-02 4.660024888970181189e-01 2.500475931538379340e-02
19+
1.661590296147639340e-02 4.632706508823502545e-01 2.370712147478885173e-02
20+
1.694822102070592251e-02 4.561825385197983973e-01 3.065660322025305640e-02

reduction/data/reference_rq.txt

Lines changed: 254 additions & 231 deletions
Large diffs are not rendered by default.

reduction/data/reference_rq_201282.txt

Lines changed: 276 additions & 256 deletions
Large diffs are not rendered by default.

reduction/data/reference_rq_avg.txt

Lines changed: 209 additions & 207 deletions
Large diffs are not rendered by default.
Lines changed: 93 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,99 @@
1-
# Experiment IPTS-1234 Run 198388
2-
# Reduction 2.0.9
3-
# Run title: test
1+
# Experiment IPTS-28662 Run 198388
2+
# Reduction unknown
3+
# Run title: sample1_pcps_d2obuffer-198382-7.
44
# Run start time: 2022-12-07T05:50:40.745408667
5-
# Reduction time: Wed Apr 12 15:02:13 2023
5+
# Reduction time: Fri Jul 11 13:43:31 2025
66
# Q summing: False
77
# TOF weighted: False
88
# Bck in Q: False
9+
# Theta offset: 0
910
# DataRun NormRun TwoTheta(deg) LambdaMin(A) LambdaMax(A) Qmin(1/A) Qmax(1/A) SF_A SF_B
10-
# 198388 198403 0.0817804 2.5026 5.84094 0.005 0.2052 332.49 0.0087
11-
# 198389 198403 0.161934 2.50312 5.84062 0.005 0.4060 1251.1 0.0344
12-
# dQ0[1/Angstrom] = 0
13-
# dQ/Q = 0.0276199
11+
# 198388 198403 4.68567 2.5026 5.84094 0.0879 0.2052 332.49 0.0087
12+
# 198389 198403 9.27811 2.50312 5.84062 0.1740 0.4060 1251.1 0.0344
1413
# Q [1/Angstrom] R dR dQ [FWHM]
15-
0.0891900245767729 0.0002447540638881 0.0000133962937753 0.0024623432623375
16-
0.0909738250683083 0.0002503773807390 0.0000135922222283 0.0025115901275842
17-
0.0927933015696745 0.0002379958246820 0.0000128307329373 0.0025618219301359
18-
0.0946491676010680 0.0002267372639826 0.0000121366518452 0.0026130583687386
19-
0.0965421509530894 0.0002140524949046 0.0000113728932556 0.0026653195361134
20-
0.0984729939721511 0.0001971958049540 0.0000104239251455 0.0027186259268357
21-
0.1004424538515942 0.0001968337448828 0.0000103365085768 0.0027729984453724
22-
0.1024513029286260 0.0001774426898238 0.0000092670497769 0.0028284584142798
23-
0.1045003289871986 0.0001701477602883 0.0000088276575632 0.0028850275825654
24-
0.1065903355669425 0.0001627784397077 0.0000083983924154 0.0029427281342168
25-
0.1087221422782814 0.0001422927048471 0.0000073051106190 0.0030015826969011
26-
0.1108965851238470 0.0001389629319530 0.0000071219558108 0.0030616143508391
27-
0.1131145168263240 0.0001288529950236 0.0000065693540871 0.0031228466378559
28-
0.1153768071628505 0.0001188334155090 0.0000060390859586 0.0031853035706130
29-
0.1176843433061075 0.0001102886886269 0.0000055941108129 0.0032490096420253
30-
0.1200380301722296 0.0000993100506575 0.0000050298794422 0.0033139898348658
31-
0.1224387907756742 0.0000905533284159 0.0000045734385648 0.0033802696315631
32-
0.1248875665911877 0.0000857594660423 0.0000043277766882 0.0034478750241944
33-
0.1273853179230114 0.0000748679803550 0.0000038047119676 0.0035168325246782
34-
0.1299330242814717 0.0000683816168925 0.0000034874129115 0.0035871691751718
35-
0.1325316847671011 0.0000596948083988 0.0000030394240548 0.0036589125586752
36-
0.1351823184624432 0.0000542742256813 0.0000027932684314 0.0037320908098487
37-
0.1378859648316920 0.0000486180220242 0.0000024908601909 0.0038067326260457
38-
0.1406436841283258 0.0000411690955544 0.0000021342902086 0.0038828672785666
39-
0.1434565578108924 0.0000362825195748 0.0000019130967819 0.0039605246241380
40-
0.1463256889671102 0.0000313706240099 0.0000016976556626 0.0040397351166207
41-
0.1492522027464524 0.0000266793729254 0.0000014790853366 0.0041205298189531
42-
0.1522372468013815 0.0000201515772276 0.0000011921286466 0.0042029404153322
43-
0.1552819917374091 0.0000184930516940 0.0000011050296613 0.0042869992236389
44-
0.1583876315721573 0.0000139100372415 0.0000009297904795 0.0043727392081116
45-
0.1615553842036004 0.0000115892287748 0.0000008346887627 0.0044601939922739
46-
0.1647864918876724 0.0000095462511131 0.0000007149668629 0.0045493978721193
47-
0.1680822217254259 0.0000074135404266 0.0000006625914976 0.0046403858295617
48-
0.1714438661599344 0.0000050437258954 0.0000006004985373 0.0047331935461530
49-
0.1748727434831331 0.0000034554681031 0.0000005329300560 0.0048278574170760
50-
0.1783701983527958 0.0000020368181208 0.0000005189224870 0.0049244145654175
51-
0.1783701983527958 0.0000046919083675 0.0000002665986814 0.0049265730321469
52-
0.1819376023198517 0.0000024827984228 0.0000005000394350 0.0050229028567259
53-
0.1819376023198517 0.0000037259968412 0.0000002129144259 0.0050251044927899
54-
0.1855763543662488 0.0000013097203277 0.0000004851390805 0.0051233609138604
55-
0.1855763543662488 0.0000032047948099 0.0000001837849489 0.0051256065826457
56-
0.1892878814535737 0.0000013207837668 0.0000004776806254 0.0052258281321376
57-
0.1892878814535737 0.0000027329773555 0.0000001565347649 0.0052281187142986
58-
0.1930736390826452 0.0000028051567239 0.0000001592946979 0.0053326810885846
59-
0.1930736390826452 0.0000000389726437 0.0000004820679539 0.0053303446947804
60-
0.1969351118642981 0.0000027001125461 0.0000001523201310 0.0054393347103563
61-
0.2008738141015841 0.0000025760588571 0.0000001447509917 0.0055481214045634
62-
0.2048912903836158 0.0000025965570230 0.0000001444458411 0.0056590838326547
63-
0.2089891161912881 0.0000026607962357 0.0000001459605208 0.0057722655093077
64-
0.2131688985151138 0.0000028172461539 0.0000001522141469 0.0058877108194939
65-
0.2174322764854161 0.0000030234836123 0.0000001619332708 0.0060054650358838
66-
0.2217809220151244 0.0000031511139155 0.0000001676252188 0.0061255743366015
67-
0.2262165404554269 0.0000034312809005 0.0000001801336897 0.0062480858233335
68-
0.2307408712645355 0.0000038950729150 0.0000002015795785 0.0063730475398002
69-
0.2353556886898262 0.0000037194721621 0.0000001918559976 0.0065005084905962
70-
0.2400628024636227 0.0000039009218094 0.0000001993625225 0.0066305186604081
71-
0.2448640585128952 0.0000039270756601 0.0000001993077258 0.0067631290336162
72-
0.2497613396831531 0.0000041608521349 0.0000002102978305 0.0068983916142886
73-
0.2547565664768162 0.0000039323738895 0.0000001994516512 0.0070363594465743
74-
0.2598516978063525 0.0000038065580075 0.0000001920929805 0.0071770866355058
75-
0.2650487317624796 0.0000035509274500 0.0000001788787385 0.0073206283682159
76-
0.2703497063977292 0.0000035377011625 0.0000001770791821 0.0074670409355803
77-
0.2757567005256837 0.0000033985783643 0.0000001694678325 0.0076163817542919
78-
0.2812718345361974 0.0000031531602235 0.0000001572031806 0.0077687093893777
79-
0.2868972712269214 0.0000031675549109 0.0000001572146163 0.0079240835771653
80-
0.2926352166514598 0.0000029998928330 0.0000001490977131 0.0080825652487086
81-
0.2984879209844890 0.0000027351333958 0.0000001363374559 0.0082442165536827
82-
0.3044576794041788 0.0000025694976712 0.0000001276914381 0.0084091008847564
83-
0.3105468329922624 0.0000026567754695 0.0000001316773814 0.0085772829024515
84-
0.3167577696521076 0.0000026246350475 0.0000001295634750 0.0087488285605006
85-
0.3230929250451497 0.0000024072067467 0.0000001191322525 0.0089238051317106
86-
0.3295547835460527 0.0000024409771290 0.0000001204941403 0.0091022812343448
87-
0.3361458792169738 0.0000024169955605 0.0000001192522253 0.0092843268590317
88-
0.3428687968013133 0.0000024167099409 0.0000001188558296 0.0094700133962123
89-
0.3497261727373396 0.0000024303485656 0.0000001191926508 0.0096594136641365
90-
0.3567206961920864 0.0000025524353270 0.0000001249769861 0.0098526019374193
91-
0.3638551101159281 0.0000024689991699 0.0000001209629201 0.0100496539761677
92-
0.3711322123182467 0.0000024830110242 0.0000001213055540 0.0102506470556910
93-
0.3785548565646116 0.0000023769697211 0.0000001159077254 0.0104556599968048
94-
0.3861259536959039 0.0000024043279025 0.0000001175568383 0.0106647731967409
14+
0.0874412005654636 0.0002536285092551 0.0000226771346635 0.0019802324618788
15+
0.0891900245767729 0.0002447540638881 0.0000153281543154 0.0020198371111164
16+
0.0909738250683083 0.0002503773807390 0.0000155015812576 0.0020602338533387
17+
0.0927933015696745 0.0002379958246820 0.0000145429923885 0.0021014385304055
18+
0.0946491676010680 0.0002267372639826 0.0000136619757205 0.0021434673010136
19+
0.0965421509530894 0.0002140524949046 0.0000126945818960 0.0021863366470339
20+
0.0984729939721511 0.0001971958049540 0.0000115962330218 0.0022300633799746
21+
0.1004424538515942 0.0001968337448828 0.0000115025904627 0.0022746646475740
22+
0.1024513029286260 0.0001774426898238 0.0000102276550391 0.0023201579405255
23+
0.1045003289871986 0.0001701477602883 0.0000097287702225 0.0023665610993360
24+
0.1065903355669425 0.0001627784397077 0.0000092274257243 0.0024138923213228
25+
0.1087221422782814 0.0001422927048471 0.0000079798215419 0.0024621701677492
26+
0.1108965851238470 0.0001389629319530 0.0000078411994533 0.0025114135711042
27+
0.1131145168263240 0.0001288529950236 0.0000072056356450 0.0025616418425263
28+
0.1153768071628505 0.0001188334155090 0.0000066114458581 0.0026128746793768
29+
0.1176843433061075 0.0001102886886269 0.0000061278163413 0.0026651321729643
30+
0.1200380301722296 0.0000993100506575 0.0000054966391115 0.0027184348164236
31+
0.1224387907756742 0.0000905533284159 0.0000049810927817 0.0027728035127521
32+
0.1248875665911877 0.0000857594660423 0.0000047302741420 0.0028282595830071
33+
0.1273853179230114 0.0000748679803550 0.0000041729031187 0.0028848247746673
34+
0.1299330242814717 0.0000683816168925 0.0000038270442036 0.0029425212701606
35+
0.1325316847671011 0.0000596948083988 0.0000033130262440 0.0030013716955638
36+
0.1351823184624432 0.0000542742256813 0.0000030425007000 0.0030613991294751
37+
0.1378859648316920 0.0000486180220242 0.0000027034767435 0.0031226271120646
38+
0.1406436841283258 0.0000411690955544 0.0000023026270372 0.0031850796543059
39+
0.1434565578108924 0.0000362825195748 0.0000020606437577 0.0032487812473920
40+
0.1463256889671102 0.0000313706240099 0.0000018214359265 0.0033137568723399
41+
0.1492522027464524 0.0000266793729254 0.0000015800198484 0.0033800320097867
42+
0.1522372468013815 0.0000201515772276 0.0000012595900266 0.0034476326499824
43+
0.1552819917374091 0.0000184930516940 0.0000011674432294 0.0035165853029821
44+
0.1583876315721573 0.0000139100372415 0.0000009714778206 0.0035869170090417
45+
0.1615553842036004 0.0000115892287748 0.0000008669934842 0.0036586553492225
46+
0.1647864918876724 0.0000095462511131 0.0000007395635219 0.0037318284562070
47+
0.1680822217254259 0.0000074135404266 0.0000006789511234 0.0038064650253311
48+
0.1714438661599344 0.0000050437258954 0.0000006092305829 0.0038825943258377
49+
0.1748727434831331 0.0000034554681031 0.0000005373271626 0.0039602462123545
50+
0.1748727434831331 0.0000052141353820 0.0000003554235661 0.0039612275265120
51+
0.1783701983527958 0.0000020368181208 0.0000005205540068 0.0040394511366016
52+
0.1783701983527958 0.0000046919083675 0.0000003024666553 0.0040404520770422
53+
0.1819376023198517 0.0000024827984228 0.0000005026574410 0.0041202401593336
54+
0.1819376023198517 0.0000037259968412 0.0000002387759270 0.0041212611185831
55+
0.1855763543662488 0.0000013097203277 0.0000004858618423 0.0042026449625203
56+
0.1855763543662488 0.0000032047948099 0.0000002047884455 0.0042036863409547
57+
0.1892878814535737 0.0000013207837668 0.0000004784481185 0.0042866978617707
58+
0.1892878814535737 0.0000027329773555 0.0000001724834882 0.0042877600677738
59+
0.1930736390826452 0.0000000389726437 0.0000004820686003 0.0043724318190061
60+
0.1930736390826452 0.0000028051567239 0.0000001755747035 0.0043735152691293
61+
0.1969351118642981 0.0000003520913250 0.0000004457123821 0.0044598804553862
62+
0.1969351118642981 0.0000027001125461 0.0000001672285106 0.0044609855745119
63+
0.2008738141015841 -0.0000001084106637 0.0000004327044460 0.0045490780644940
64+
0.2008738141015841 0.0000025760588571 0.0000001584773951 0.0045502052860021
65+
0.2048912903836158 0.0000025965570230 0.0000001577774963 0.0046412093917222
66+
0.2089891161912881 0.0000026607962357 0.0000001588205577 0.0047340335795566
67+
0.2131688985151138 0.0000028172461539 0.0000001651951277 0.0048287142511477
68+
0.2174322764854161 0.0000030234836123 0.0000001762556451 0.0049252885361707
69+
0.2217809220151244 0.0000031511139155 0.0000001828467270 0.0050237943068941
70+
0.2262165404554269 0.0000034312809005 0.0000001964979030 0.0051242701930320
71+
0.2307408712645355 0.0000038950729150 0.0000002202321805 0.0052267555968926
72+
0.2353556886898262 0.0000037194721621 0.0000002092552903 0.0053312907088305
73+
0.2400628024636227 0.0000039009218094 0.0000002173829204 0.0054379165230071
74+
0.2448640585128952 0.0000039270756601 0.0000002170288582 0.0055466748534672
75+
0.2497613396831531 0.0000041608521349 0.0000002302823000 0.0056576083505366
76+
0.2547565664768162 0.0000039323738895 0.0000002192612942 0.0057707605175473
77+
0.2598516978063525 0.0000038065580075 0.0000002105272147 0.0058861757278983
78+
0.2650487317624796 0.0000035509274500 0.0000001954455456 0.0060038992424562
79+
0.2703497063977292 0.0000035377011625 0.0000001931075627 0.0061239772273054
80+
0.2757567005256837 0.0000033985783643 0.0000001843259392 0.0062464567718515
81+
0.2812718345361974 0.0000031531602235 0.0000001705815762 0.0063713859072885
82+
0.2868972712269214 0.0000031675549109 0.0000001706132133 0.0064988136254343
83+
0.2926352166514598 0.0000029998928330 0.0000001617977646 0.0066287898979429
84+
0.2984879209844890 0.0000027351333958 0.0000001476237682 0.0067613656959018
85+
0.3044576794041788 0.0000025694976712 0.0000001377054755 0.0068965930098198
86+
0.3105468329922624 0.0000026567754695 0.0000001424282471 0.0070345248700162
87+
0.3167577696521076 0.0000026246350475 0.0000001399770177 0.0071752153674166
88+
0.3230929250451497 0.0000024072067467 0.0000001283672398 0.0073187196747649
89+
0.3295547835460527 0.0000024409771290 0.0000001300112437 0.0074650940682602
90+
0.3361458792169738 0.0000024169955605 0.0000001287681092 0.0076143959496254
91+
0.3428687968013133 0.0000024167099409 0.0000001283252594 0.0077666838686179
92+
0.3497261727373396 0.0000024303485656 0.0000001287475986 0.0079220175459903
93+
0.3567206961920864 0.0000025524353270 0.0000001355668097 0.0080804578969101
94+
0.3638551101159281 0.0000024689991699 0.0000001311183567 0.0082420670548483
95+
0.3711322123182467 0.0000024830110242 0.0000001315247019 0.0084069083959452
96+
0.3785548565646116 0.0000023769697211 0.0000001253061995 0.0085750465638641
97+
0.3861259536959039 0.0000024043279025 0.0000001275169685 0.0087465474951414
98+
0.3938484727698219 0.0000023186027430 0.0000001225824140 0.0089214784450442
99+
0.4017254422252184 0.0000023240349468 0.0000001230647266 0.0090999080139451

0 commit comments

Comments
 (0)