Skip to content
Snippets Groups Projects
Commit da41bccc authored by Duc Le's avatar Duc Le
Browse files

Re #20599 - restored system_test_speed. Updated docs.

Updated pictures for SofQW docs - old bins should be parallelograms
Added equations for signal and error in Rebin and Rebin2D
parent 64ffbf04
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,15 @@ be no gaps between bins. Rebin ensures that any of these space filling
bins cannot be less than 25% or more than 125% of the width that was
specified.
In both cases, where a new bin only partially overlaps one or more input
bins, the new counts are calculated as the sum of the old bins weighted
by the fractional overlaping widths of the new bin over the old bin:
.. math:: Y^{\mathrm{new}} = \sum_i Y^{\mathrm{old}}_i F_i
.. math:: E^{\mathrm{new}} = \sqrt{\sum_i (E^{\mathrm{old}}_i)^2 F_i}
where :math:`F_i = w^{\mathrm{overlap}}_i / w^{\mathrm{old}}_i` is the
ratio of the overlap width of the new and old bin over the old bin width.
.. _rebin-example-strings:
......@@ -79,7 +88,6 @@ following will happen:
Hence the actual *Param* string used is "0, 2, 4, 3, 10".
.. _rebin-usage:
Usage
......
......@@ -14,8 +14,15 @@ The bin parameters are used to form an output grid. A positive
create logarithmic binning using the formula
:math:`x(j+1)=x(j)(1+|\Delta x_i|)\,`. The overlap of the polygons
formed from the old and new grids is tested to compute the required
signal weight for the each of the new bins on the workspace. The errors
are summed in quadrature.
signal weight for the each of the new bins on the workspace, like in
:ref:`algm-Rebin`, and the errors are summed in quadrature, as:
.. math:: Y^{\mathrm{new}} = \sum_i Y^{\mathrm{old}}_i F_i
.. math:: E^{\mathrm{new}} = \sqrt{\sum_i (E^{\mathrm{old}}_i)^2 F_i}
where :math:`F_i = A^{\mathrm{overlap}}_i / A^{\mathrm{old}}_i` is the
ratio of the overlap area of the new and old bin over the area of the
old bin.
Requirements
------------
......
docs/source/images/RebinnedOutputStep1.png

13 KiB | W: | H:

docs/source/images/RebinnedOutputStep1.png

12.9 KiB | W: | H:

docs/source/images/RebinnedOutputStep1.png
docs/source/images/RebinnedOutputStep1.png
docs/source/images/RebinnedOutputStep1.png
docs/source/images/RebinnedOutputStep1.png
  • 2-up
  • Swipe
  • Onion skin
docs/source/images/RebinnedOutputStep2.png

12.3 KiB | W: | H:

docs/source/images/RebinnedOutputStep2.png

12.4 KiB | W: | H:

docs/source/images/RebinnedOutputStep2.png
docs/source/images/RebinnedOutputStep2.png
docs/source/images/RebinnedOutputStep2.png
docs/source/images/RebinnedOutputStep2.png
  • 2-up
  • Swipe
  • Onion skin
"""
Usage system_test_speed.py <build-log> <output-csv>
Given a the raw output from a Jenkins build server log this script will output
a CSV file of the speed & memory for each system test.
"""
import sys
with open(sys.argv[1], 'r') as f:
lines = f.readlines()
lines = filter(lambda x: "RESULT|" in x or ": Executing" in x, lines)
# Strip out tests that did not run
# look ahead and remove tests that have no results
idxs = []
for i, (x, y) in enumerate(zip(lines, lines[1::])):
if "Executing" in x and "Executing" in y:
idxs.append(i)
lines = [i for j, i in enumerate(lines) if j not in idxs]
with open(sys.argv[2], 'w') as f:
f.write("name, time, memory\n")
for name, time, memory in zip(lines[::3], lines[1::3], lines[2::3]):
name = name.split("Executing")[-1].strip()
time = time.split("|1")[-1].strip()
memory = memory.split("|")[-1].strip()
f.write(", ".join([name, time, memory]) + "\n")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment