fix caching

This commit is contained in:
hiro98 2020-04-24 15:01:39 +02:00
parent 4fae0fa017
commit 8d6d5951a8
73 changed files with 7645 additions and 10051 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View file

@ -265,7 +265,7 @@ Intergrate σ with the mc method.
#+end_src
#+RESULTS:
: IntegrationResult(result=0.05378648054059906, sigma=0.000937752421054302, N=2191)
: IntegrationResult(result=0.053667312175396706, sigma=0.0009169990002543172, N=2290)
We gonna export that as tex.
#+begin_src jupyter-python :exports both :results raw drawer
@ -275,7 +275,7 @@ We gonna export that as tex.
#+end_src
#+RESULTS:
: \(N = 2191\)
: \(N = 2290\)
*** Integration over η
Plot the intgrand of the pseudo rap.
@ -301,7 +301,7 @@ Plot the intgrand of the pseudo rap.
#+end_src
#+RESULTS:
: IntegrationResult(result=0.05358650745863841, sigma=0.0009625499313527285, N=131)
: IntegrationResult(result=0.054691324175410276, sigma=0.0008576665267260218, N=155)
As we see, the result is a little better if we use pseudo rapidity,
because the differential cross section does not difverge anymore. But
@ -316,7 +316,7 @@ And yet again export that as tex.
#+end_src
#+RESULTS:
: \(N = 131\)
: \(N = 155\)
*** Using =VEGAS=
Now we use =VEGAS= on the θ parametrisation and see what happens.
@ -334,9 +334,9 @@ Now we use =VEGAS= on the θ parametrisation and see what happens.
#+end_src
#+RESULTS:
: VegasIntegrationResult(result=0.054023061813239806, sigma=0.00013466995320612007, N=2805, increment_borders=array([0.16380276, 0.23700021, 0.34462362, 0.50810449, 0.76851565,
: 1.22948173, 1.91477323, 2.37356001, 2.63313669, 2.79599811,
: 2.90457286, 2.9777899 ]), vegas_iterations=6067)
: VegasIntegrationResult(result=0.05388506711723066, sigma=0.00013404230661800357, N=2805, increment_borders=array([0.16380276, 0.23698033, 0.34597286, 0.50870877, 0.76853445,
: 1.22569342, 1.91171522, 2.37349146, 2.6337053 , 2.79689719,
: 2.90485333, 2.9777899 ]), vegas_iterations=8909)
This is pretty good, although the variance reduction may be achieved
partially by accumulating the results from all runns. Here this gives
@ -367,9 +367,9 @@ This depends, of course, on the iteration count.
#+end_src
#+RESULTS:
: VegasIntegrationResult(result=0.05379154293247947, sigma=1.201764609981918e-05, N=2805, increment_borders=array([0.16380276, 0.23693318, 0.34469593, 0.5085223 , 0.76755511,
: 1.22588716, 1.91279852, 2.3717465 , 2.63277683, 2.79612676,
: 2.90435134, 2.9777899 ]), vegas_iterations=15586)
: VegasIntegrationResult(result=0.053793465122929734, sigma=1.2155519624452432e-05, N=2805, increment_borders=array([0.16380276, 0.2368871 , 0.34486266, 0.50853544, 0.76920153,
: 1.22798025, 1.91348845, 2.37314199, 2.63231014, 2.79612106,
: 2.90431041, 2.9777899 ]), vegas_iterations=14887)
Let's define some little helpers.
#+begin_src jupyter-python :exports both :tangle tangled/plot_utils.py
@ -474,7 +474,7 @@ And now we plot the integrand with the incremens.
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/2a36b9e4f2adc947114302c4523d5e60474f5170.png]]
[[file:./.ob-jupyter/ad0aa4f2f769c5aafa350ce6fdce6d2e14a62c3e.png]]
*** Testing the Statistics
Let's battle test the statistics.
#+begin_src jupyter-python :exports both :results raw drawer
@ -491,7 +491,7 @@ Let's battle test the statistics.
#+end_src
#+RESULTS:
: 0.695
: 0.683
So we see: the standard deviation is sound.
@ -512,7 +512,7 @@ Doing the same thing with =VEGAS= works as well.
#+end_src
#+RESULTS:
: 0.704
: 0.685
** Sampling and Analysis
Define the sample number.
@ -551,7 +551,10 @@ Now we monte-carlo sample our distribution. We observe that the efficiency his v
#+end_src
#+RESULTS:
: 0.02744127583441648
:RESULTS:
: sample_unweighted_array
: 0.027399137427054687
:END:
Let's save that.
#+begin_src jupyter-python :exports both :results raw drawer
@ -625,7 +628,10 @@ at least a little bit better. The numeric inversion is horribly inefficent.
#+end_src
#+RESULTS:
: 0.07903728511692736
:RESULTS:
: sample_unweighted_array
: 0.07903687969629128
:END:
<<cosθ-bare-eff>>
#+begin_src jupyter-python :exports both :results raw drawer
@ -682,7 +688,7 @@ We define an auxilliary method for convenience.
)
set_up_axis(ax_ratio, pimp_top=False)
ax_ratio.set_ylabel('ratio')
ax_ratio.set_ylabel("ratio")
draw_histogram(
ax_ratio,
[heights / reference, edges],
@ -711,7 +717,7 @@ We define an auxilliary method for convenience.
histogram,
errorbars=True,
hist_kwargs=dict(color="#1f77b4"),
errorbar_kwargs=dict(color="orange"),
errorbar_kwargs=dict(),
normalize_to=None,
):
"""Draws a histogram with optional errorbars using the step style.
@ -741,14 +747,10 @@ We define an auxilliary method for convenience.
hist_plot = ax.step(edges, [heights[0], *heights], **hist_kwargs)
if errorbars is not False:
ax.errorbar(
centers,
heights,
deviations,
linestyle="none",
color=hist_plot[0].get_color(),
,**errorbar_kwargs
)
if "color" not in errorbar_kwargs:
errorbar_kwargs["color"] = hist_plot[0].get_color()
ax.errorbar(centers, heights, deviations, linestyle="none", **errorbar_kwargs)
ax.set_xlim(*[edges[0], edges[-1]])
@ -786,7 +788,7 @@ The histogram for cosθ.
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/00141b21f62165685b960a3dd7cc1313a2e4e0d5.png]]
[[file:./.ob-jupyter/dde553030cdb96c1f0a0b223abf9bdd4602119af.png]]
*** Observables
Now we define some utilities to draw real 4-momentum samples.
@ -813,6 +815,7 @@ Now we define some utilities to draw real 4-momentum samples.
cosθ_sample = monte_carlo.sample_unweighted_array(
sample_num, lambda x: diff_xs_cosθ(x, charge, esp), interval_cosθ, **kwargs
)
print(cosθ_sample)
φ_sample = np.random.uniform(0, 1, sample_num)
def make_momentum(esp, cosθ, φ):
@ -868,8 +871,7 @@ Lets try it out.
interval_cosθ,
charge,
esp,
cache="cache/bare_cos_theta",
proc=3,
proc='auto',
momentum_cache="cache/momenta_bare_cos_theta",
)
momentum_sample
@ -877,14 +879,14 @@ Lets try it out.
#+RESULTS:
:RESULTS:
: Trying cache
: array([[100. , 54.98191622, 34.53483728, -76.05480855],
: [100. , 87.95719691, 30.53342542, -36.48618154],
: [100. , 29.02952127, 15.22393108, -94.47496397],
: sample_momenta
: array([[100. , 16.04646249, 12.03145593, 97.96813313],
: [100. , 51.41640893, 11.55602144, 84.98712409],
: [100. , 40.75310071, 39.90715071, 82.13771426],
: ...,
: [100. , 37.62519445, 37.66247038, -84.65153907],
: [100. , 75.22515369, 0.79738586, 65.88277793],
: [100. , 26.58309333, 4.84203005, -96.28028819]])
: [100. , 20.83112183, 7.06626328, 97.55066523],
: [100. , 33.23340199, 1.86567636, -94.29772131],
: [100. , 32.9373831 , 47.67830405, -81.49790254]])
:END:
@ -898,7 +900,7 @@ Now let's make a histogram of the η distribution.
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/7752e9a1c6e940c7b7b80cfc71a2f0cfe4cd534a.png]]
[[file:./.ob-jupyter/e2b510b9e200304cea662510e2bb1448cddf5055.png]]
And the same for the p_t (transverse momentum) distribution.
@ -911,7 +913,7 @@ And the same for the p_t (transverse momentum) distribution.
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/07eb7195522d9aad2b943f9ac737bbd14ed868a7.png]]
[[file:./.ob-jupyter/fba21aa6168c255a5523d865bace1ed6cfd2cab6.png]]
That looks somewhat fishy, but it isn't.
#+begin_src jupyter-python :exports both :results raw drawer
@ -949,7 +951,10 @@ An again we see that the efficiency is way, way! better...
#+end_src
#+RESULTS:
:RESULTS:
: sample_unweighted_array
: \(\mathfrak{e} = 41\%\)
:END:
<<η-eff>>
Let's draw a histogram to compare with the previous results.
@ -973,7 +978,7 @@ Let's draw a histogram to compare with the previous results.
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/172aa63c901d42651e1bd2e4d834702052881b03.png]]
[[file:./.ob-jupyter/931d0c4522606eb420d0fb674a918a79e6244ce2.png]]
Looks good to me :).
@ -993,8 +998,8 @@ distribution. We throw away the integral, but keep the increments.
#+end_src
#+RESULTS:
: array([-0.9866143 , -0.96970744, -0.93106302, -0.838359 , -0.60074914,
: 0.00116799, 0.60518774, 0.8409529 , 0.93115044, 0.96958873,
: array([-0.9866143 , -0.96977389, -0.93146639, -0.83915761, -0.6036579 ,
: 0.00130069, 0.60172656, 0.8380989 , 0.9306508 , 0.96957082,
: 0.9866143 ])
Visualizing the increment borders gives us the information we want.
@ -1012,8 +1017,8 @@ Visualizing the increment borders gives us the information we want.
#+RESULTS:
:RESULTS:
: <matplotlib.legend.Legend at 0x7f7cef8f7910>
[[file:./.ob-jupyter/135df39477282a6a84cb6775e6e33ba30027d901.png]]
: <matplotlib.legend.Legend at 0x7f4d0ae3c8b0>
[[file:./.ob-jupyter/8028f6a7830defe735841a3c729c14a4758a137f.png]]
:END:
We can now plot the reweighted distribution to observe the variance
@ -1037,7 +1042,7 @@ reduction visually.
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/bb992ad6136cabc8c9ba3f54cf04564bbb9481d4.png]]
[[file:./.ob-jupyter/ab7b49de13782a6d80067e9f09d22c113d7b46a2.png]]
I am batman! Let's plot the weighting distribution.
@ -1052,7 +1057,7 @@ I am batman! Let's plot the weighting distribution.
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/15a1ba02afddb7520a5bcf78ef34e651a05d0d11.png]]
[[file:./.ob-jupyter/d89926699b29891fa3a2b9602e5ebc79dd504575.png]]
Now, draw a sample and look at the efficiency.
@ -1069,7 +1074,10 @@ Now, draw a sample and look at the efficiency.
#+end_src
#+RESULTS:
: 0.5954571428571428
:RESULTS:
: sample_unweighted_array
: 0.5875845864661654
:END:
#+begin_src jupyter-python :exports both :results raw drawer
tex_value(
@ -1081,7 +1089,7 @@ Now, draw a sample and look at the efficiency.
#+end_src
#+RESULTS:
: \(\mathfrak{e} = 60\%\)
: \(\mathfrak{e} = 59\%\)
If we compare that to [[cosθ-bare-eff]], we can see the improvement :P.
It is even better the [[η-eff]]. The histogram looks just the same.
@ -1092,7 +1100,7 @@ save_fig(fig, 'histo_cos_theta_strat', 'xs', size=(4,3))
#+end_src
#+RESULTS:
[[file:./.ob-jupyter/bc48dc495d9bc8b96549de58d04489942f8c89dd.png]]
[[file:./.ob-jupyter/1d90af7d456726ad3780a203acc8938f1894f6b1.png]]
*** Some Histograms with Rivet
**** Init
@ -1101,7 +1109,6 @@ save_fig(fig, 'histo_cos_theta_strat', 'xs', size=(4,3))
#+end_src
#+RESULTS:
: Welcome to JupyROOT 6.20/04
**** Plot the Histos
#+RESULTS:
@ -1161,7 +1168,7 @@ save_fig(fig, 'histo_cos_theta_strat', 'xs', size=(4,3))
#+RESULTS:
:RESULTS:
[[file:./.ob-jupyter/8526f4d62551118e729d80f06851ae67d31b28b4.png]]
[[file:./.ob-jupyter/b37f5272c36f1b68cca42d9f8c83d27008023fef.png]]
[[file:./.ob-jupyter/3faf2ae6a32cb4a1b25fb82aa59e1c983e6f6f25.png]]
[[file:./.ob-jupyter/64647b90c47e531721f081591f3eebeb45ccab0f.png]]
[[file:./.ob-jupyter/aacce79de91dc428a51ceb7a54af6297a48534cf.png]]
[[file:./.ob-jupyter/9db0733def0d742d5894c4793b1c95eb7931c3cf.png]]
:END:

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -3956,8 +3956,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{4.699770in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{4.699770in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{4.699798in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{4.699798in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -3969,8 +3969,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{4.699770in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{4.699770in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{4.699798in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{4.699798in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -3982,8 +3982,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{4.550359in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{4.550359in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{4.548486in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{4.548486in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -3995,8 +3995,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{4.323402in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{4.323402in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{4.322563in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{4.322563in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4008,8 +4008,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{3.961879in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{3.961879in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{3.961853in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{3.961853in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4021,8 +4021,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{3.321930in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{3.321930in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{3.327189in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{3.327189in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4034,8 +4034,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{2.370555in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{2.370555in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{2.374800in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{2.374800in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4047,8 +4047,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{1.733631in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.733631in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{1.733726in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.733726in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4060,8 +4060,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{1.373266in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.373266in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{1.372477in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.372477in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4073,8 +4073,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{1.147169in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.147169in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{1.145921in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.145921in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4086,8 +4086,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{0.996437in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{0.996437in}{2.801389in}}%
\pgfpathmoveto{\pgfqpoint{0.996048in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{0.996048in}{2.801389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4101,124 +4101,124 @@
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{4.815278in}{2.714919in}}%
\pgfpathlineto{\pgfqpoint{4.804120in}{2.607777in}}%
\pgfpathlineto{\pgfqpoint{4.800032in}{2.330741in}}%
\pgfpathlineto{\pgfqpoint{4.779593in}{2.185663in}}%
\pgfpathlineto{\pgfqpoint{4.759154in}{2.062378in}}%
\pgfpathlineto{\pgfqpoint{4.738715in}{1.956280in}}%
\pgfpathlineto{\pgfqpoint{4.714188in}{1.846938in}}%
\pgfpathlineto{\pgfqpoint{4.701924in}{1.798333in}}%
\pgfpathlineto{\pgfqpoint{4.697837in}{2.341878in}}%
\pgfpathlineto{\pgfqpoint{4.673310in}{2.216667in}}%
\pgfpathlineto{\pgfqpoint{4.648782in}{2.107334in}}%
\pgfpathlineto{\pgfqpoint{4.624255in}{2.010999in}}%
\pgfpathlineto{\pgfqpoint{4.595641in}{1.912094in}}%
\pgfpathlineto{\pgfqpoint{4.567026in}{1.825151in}}%
\pgfpathlineto{\pgfqpoint{4.550674in}{1.780016in}}%
\pgfpathlineto{\pgfqpoint{4.546587in}{2.378904in}}%
\pgfpathlineto{\pgfqpoint{4.517972in}{2.271008in}}%
\pgfpathlineto{\pgfqpoint{4.489357in}{2.174207in}}%
\pgfpathlineto{\pgfqpoint{4.456654in}{2.075041in}}%
\pgfpathlineto{\pgfqpoint{4.423951in}{1.986223in}}%
\pgfpathlineto{\pgfqpoint{4.391249in}{1.906177in}}%
\pgfpathlineto{\pgfqpoint{4.358546in}{1.833640in}}%
\pgfpathlineto{\pgfqpoint{4.325843in}{1.767582in}}%
\pgfpathlineto{\pgfqpoint{4.321756in}{2.450655in}}%
\pgfpathlineto{\pgfqpoint{4.284965in}{2.344106in}}%
\pgfpathlineto{\pgfqpoint{4.248174in}{2.247193in}}%
\pgfpathlineto{\pgfqpoint{4.211384in}{2.158658in}}%
\pgfpathlineto{\pgfqpoint{4.174593in}{2.077461in}}%
\pgfpathlineto{\pgfqpoint{4.133715in}{1.994800in}}%
\pgfpathlineto{\pgfqpoint{4.092837in}{1.919144in}}%
\pgfpathlineto{\pgfqpoint{4.051958in}{1.849671in}}%
\pgfpathlineto{\pgfqpoint{4.006992in}{1.779577in}}%
\pgfpathlineto{\pgfqpoint{3.962026in}{1.715373in}}%
\pgfpathlineto{\pgfqpoint{3.957938in}{2.568797in}}%
\pgfpathlineto{\pgfqpoint{3.917060in}{2.474298in}}%
\pgfpathlineto{\pgfqpoint{3.872093in}{2.378294in}}%
\pgfpathlineto{\pgfqpoint{3.827127in}{2.289839in}}%
\pgfpathlineto{\pgfqpoint{3.782161in}{2.208253in}}%
\pgfpathlineto{\pgfqpoint{3.737195in}{2.132956in}}%
\pgfpathlineto{\pgfqpoint{3.692229in}{2.063451in}}%
\pgfpathlineto{\pgfqpoint{3.647262in}{1.999308in}}%
\pgfpathlineto{\pgfqpoint{3.602296in}{1.940159in}}%
\pgfpathlineto{\pgfqpoint{3.557330in}{1.885683in}}%
\pgfpathlineto{\pgfqpoint{3.508276in}{1.831259in}}%
\pgfpathlineto{\pgfqpoint{3.459222in}{1.781755in}}%
\pgfpathlineto{\pgfqpoint{3.410168in}{1.736904in}}%
\pgfpathlineto{\pgfqpoint{3.361114in}{1.696475in}}%
\pgfpathlineto{\pgfqpoint{3.324323in}{1.668936in}}%
\pgfpathlineto{\pgfqpoint{3.320235in}{2.187493in}}%
\pgfpathlineto{\pgfqpoint{3.279357in}{2.146432in}}%
\pgfpathlineto{\pgfqpoint{3.238479in}{2.109455in}}%
\pgfpathlineto{\pgfqpoint{3.197600in}{2.076452in}}%
\pgfpathlineto{\pgfqpoint{3.156722in}{2.047325in}}%
\pgfpathlineto{\pgfqpoint{3.115844in}{2.021990in}}%
\pgfpathlineto{\pgfqpoint{3.074965in}{2.000376in}}%
\pgfpathlineto{\pgfqpoint{3.034087in}{1.982423in}}%
\pgfpathlineto{\pgfqpoint{2.993208in}{1.968083in}}%
\pgfpathlineto{\pgfqpoint{2.952330in}{1.957317in}}%
\pgfpathlineto{\pgfqpoint{2.915540in}{1.950660in}}%
\pgfpathlineto{\pgfqpoint{2.878749in}{1.946861in}}%
\pgfpathlineto{\pgfqpoint{2.841959in}{1.945911in}}%
\pgfpathlineto{\pgfqpoint{2.805168in}{1.947810in}}%
\pgfpathlineto{\pgfqpoint{2.768377in}{1.952561in}}%
\pgfpathlineto{\pgfqpoint{2.731587in}{1.960173in}}%
\pgfpathlineto{\pgfqpoint{2.694796in}{1.970664in}}%
\pgfpathlineto{\pgfqpoint{2.653918in}{1.985723in}}%
\pgfpathlineto{\pgfqpoint{2.613040in}{2.004404in}}%
\pgfpathlineto{\pgfqpoint{2.572161in}{2.026757in}}%
\pgfpathlineto{\pgfqpoint{2.531283in}{2.052845in}}%
\pgfpathlineto{\pgfqpoint{2.490405in}{2.082740in}}%
\pgfpathlineto{\pgfqpoint{2.449526in}{2.116529in}}%
\pgfpathlineto{\pgfqpoint{2.408648in}{2.154313in}}%
\pgfpathlineto{\pgfqpoint{2.371857in}{2.191829in}}%
\pgfpathlineto{\pgfqpoint{2.367769in}{1.666787in}}%
\pgfpathlineto{\pgfqpoint{2.318715in}{1.704201in}}%
\pgfpathlineto{\pgfqpoint{2.273749in}{1.742242in}}%
\pgfpathlineto{\pgfqpoint{2.228783in}{1.784026in}}%
\pgfpathlineto{\pgfqpoint{2.183817in}{1.829735in}}%
\pgfpathlineto{\pgfqpoint{2.138851in}{1.879579in}}%
\pgfpathlineto{\pgfqpoint{2.093884in}{1.933797in}}%
\pgfpathlineto{\pgfqpoint{2.048918in}{1.992666in}}%
\pgfpathlineto{\pgfqpoint{2.003952in}{2.056506in}}%
\pgfpathlineto{\pgfqpoint{1.958986in}{2.125682in}}%
\pgfpathlineto{\pgfqpoint{1.914020in}{2.200623in}}%
\pgfpathlineto{\pgfqpoint{1.869053in}{2.281823in}}%
\pgfpathlineto{\pgfqpoint{1.824087in}{2.369860in}}%
\pgfpathlineto{\pgfqpoint{1.783209in}{2.456394in}}%
\pgfpathlineto{\pgfqpoint{1.742330in}{2.549730in}}%
\pgfpathlineto{\pgfqpoint{1.734155in}{2.569272in}}%
\pgfpathlineto{\pgfqpoint{1.730067in}{1.717374in}}%
\pgfpathlineto{\pgfqpoint{1.685101in}{1.781878in}}%
\pgfpathlineto{\pgfqpoint{1.644222in}{1.845649in}}%
\pgfpathlineto{\pgfqpoint{1.603344in}{1.914899in}}%
\pgfpathlineto{\pgfqpoint{1.562466in}{1.990313in}}%
\pgfpathlineto{\pgfqpoint{1.521587in}{2.072709in}}%
\pgfpathlineto{\pgfqpoint{1.484797in}{2.153645in}}%
\pgfpathlineto{\pgfqpoint{1.448006in}{2.241897in}}%
\pgfpathlineto{\pgfqpoint{1.411216in}{2.338499in}}%
\pgfpathlineto{\pgfqpoint{1.374425in}{2.444707in}}%
\pgfpathlineto{\pgfqpoint{1.370337in}{1.763136in}}%
\pgfpathlineto{\pgfqpoint{1.333547in}{1.837605in}}%
\pgfpathlineto{\pgfqpoint{1.300844in}{1.910742in}}%
\pgfpathlineto{\pgfqpoint{1.268141in}{1.991503in}}%
\pgfpathlineto{\pgfqpoint{1.235439in}{2.081180in}}%
\pgfpathlineto{\pgfqpoint{1.206824in}{2.168221in}}%
\pgfpathlineto{\pgfqpoint{1.178209in}{2.264656in}}%
\pgfpathlineto{\pgfqpoint{1.149594in}{2.372142in}}%
\pgfpathlineto{\pgfqpoint{1.145506in}{1.790496in}}%
\pgfpathlineto{\pgfqpoint{1.116891in}{1.872290in}}%
\pgfpathlineto{\pgfqpoint{1.088276in}{1.964883in}}%
\pgfpathlineto{\pgfqpoint{1.063749in}{2.054609in}}%
\pgfpathlineto{\pgfqpoint{1.039222in}{2.155889in}}%
\pgfpathlineto{\pgfqpoint{1.014695in}{2.271165in}}%
\pgfpathlineto{\pgfqpoint{0.998344in}{2.357325in}}%
\pgfpathlineto{\pgfqpoint{0.994256in}{1.798655in}}%
\pgfpathlineto{\pgfqpoint{0.973817in}{1.881812in}}%
\pgfpathlineto{\pgfqpoint{0.953378in}{1.976671in}}%
\pgfpathlineto{\pgfqpoint{0.932939in}{2.085932in}}%
\pgfpathlineto{\pgfqpoint{0.912499in}{2.213194in}}%
\pgfpathlineto{\pgfqpoint{0.896148in}{2.331205in}}%
\pgfpathlineto{\pgfqpoint{4.800032in}{2.330269in}}%
\pgfpathlineto{\pgfqpoint{4.779593in}{2.185231in}}%
\pgfpathlineto{\pgfqpoint{4.759154in}{2.061979in}}%
\pgfpathlineto{\pgfqpoint{4.738715in}{1.955911in}}%
\pgfpathlineto{\pgfqpoint{4.714188in}{1.846598in}}%
\pgfpathlineto{\pgfqpoint{4.701924in}{1.798006in}}%
\pgfpathlineto{\pgfqpoint{4.697837in}{2.364108in}}%
\pgfpathlineto{\pgfqpoint{4.673310in}{2.237304in}}%
\pgfpathlineto{\pgfqpoint{4.648782in}{2.126581in}}%
\pgfpathlineto{\pgfqpoint{4.624255in}{2.029019in}}%
\pgfpathlineto{\pgfqpoint{4.595641in}{1.928857in}}%
\pgfpathlineto{\pgfqpoint{4.567026in}{1.840807in}}%
\pgfpathlineto{\pgfqpoint{4.550674in}{1.795099in}}%
\pgfpathlineto{\pgfqpoint{4.546587in}{2.370772in}}%
\pgfpathlineto{\pgfqpoint{4.517972in}{2.263368in}}%
\pgfpathlineto{\pgfqpoint{4.489357in}{2.167008in}}%
\pgfpathlineto{\pgfqpoint{4.456654in}{2.068295in}}%
\pgfpathlineto{\pgfqpoint{4.423951in}{1.979881in}}%
\pgfpathlineto{\pgfqpoint{4.391249in}{1.900200in}}%
\pgfpathlineto{\pgfqpoint{4.358546in}{1.827993in}}%
\pgfpathlineto{\pgfqpoint{4.325843in}{1.762236in}}%
\pgfpathlineto{\pgfqpoint{4.321756in}{2.446482in}}%
\pgfpathlineto{\pgfqpoint{4.284965in}{2.340172in}}%
\pgfpathlineto{\pgfqpoint{4.248174in}{2.243477in}}%
\pgfpathlineto{\pgfqpoint{4.211384in}{2.155141in}}%
\pgfpathlineto{\pgfqpoint{4.174593in}{2.074127in}}%
\pgfpathlineto{\pgfqpoint{4.133715in}{1.991652in}}%
\pgfpathlineto{\pgfqpoint{4.092837in}{1.916166in}}%
\pgfpathlineto{\pgfqpoint{4.051958in}{1.846849in}}%
\pgfpathlineto{\pgfqpoint{4.006992in}{1.776913in}}%
\pgfpathlineto{\pgfqpoint{3.962026in}{1.712853in}}%
\pgfpathlineto{\pgfqpoint{3.957938in}{2.552491in}}%
\pgfpathlineto{\pgfqpoint{3.917060in}{2.458773in}}%
\pgfpathlineto{\pgfqpoint{3.872093in}{2.363561in}}%
\pgfpathlineto{\pgfqpoint{3.827127in}{2.275836in}}%
\pgfpathlineto{\pgfqpoint{3.782161in}{2.194924in}}%
\pgfpathlineto{\pgfqpoint{3.737195in}{2.120249in}}%
\pgfpathlineto{\pgfqpoint{3.692229in}{2.051318in}}%
\pgfpathlineto{\pgfqpoint{3.647262in}{1.987705in}}%
\pgfpathlineto{\pgfqpoint{3.602296in}{1.929045in}}%
\pgfpathlineto{\pgfqpoint{3.553242in}{1.870327in}}%
\pgfpathlineto{\pgfqpoint{3.504188in}{1.816771in}}%
\pgfpathlineto{\pgfqpoint{3.455134in}{1.768070in}}%
\pgfpathlineto{\pgfqpoint{3.406080in}{1.723963in}}%
\pgfpathlineto{\pgfqpoint{3.357026in}{1.684224in}}%
\pgfpathlineto{\pgfqpoint{3.328411in}{1.662983in}}%
\pgfpathlineto{\pgfqpoint{3.324323in}{2.193531in}}%
\pgfpathlineto{\pgfqpoint{3.283445in}{2.152010in}}%
\pgfpathlineto{\pgfqpoint{3.242567in}{2.114591in}}%
\pgfpathlineto{\pgfqpoint{3.201688in}{2.081159in}}%
\pgfpathlineto{\pgfqpoint{3.160810in}{2.051617in}}%
\pgfpathlineto{\pgfqpoint{3.119931in}{2.025879in}}%
\pgfpathlineto{\pgfqpoint{3.079053in}{2.003872in}}%
\pgfpathlineto{\pgfqpoint{3.038175in}{1.985536in}}%
\pgfpathlineto{\pgfqpoint{2.997296in}{1.970820in}}%
\pgfpathlineto{\pgfqpoint{2.956418in}{1.959687in}}%
\pgfpathlineto{\pgfqpoint{2.919627in}{1.952704in}}%
\pgfpathlineto{\pgfqpoint{2.882837in}{1.948583in}}%
\pgfpathlineto{\pgfqpoint{2.846046in}{1.947316in}}%
\pgfpathlineto{\pgfqpoint{2.809256in}{1.948900in}}%
\pgfpathlineto{\pgfqpoint{2.772465in}{1.953338in}}%
\pgfpathlineto{\pgfqpoint{2.735675in}{1.960640in}}%
\pgfpathlineto{\pgfqpoint{2.698884in}{1.970820in}}%
\pgfpathlineto{\pgfqpoint{2.658006in}{1.985536in}}%
\pgfpathlineto{\pgfqpoint{2.617127in}{2.003872in}}%
\pgfpathlineto{\pgfqpoint{2.576249in}{2.025879in}}%
\pgfpathlineto{\pgfqpoint{2.535371in}{2.051617in}}%
\pgfpathlineto{\pgfqpoint{2.494492in}{2.081159in}}%
\pgfpathlineto{\pgfqpoint{2.453614in}{2.114591in}}%
\pgfpathlineto{\pgfqpoint{2.412736in}{2.152010in}}%
\pgfpathlineto{\pgfqpoint{2.375945in}{2.189191in}}%
\pgfpathlineto{\pgfqpoint{2.371857in}{1.670825in}}%
\pgfpathlineto{\pgfqpoint{2.326891in}{1.704863in}}%
\pgfpathlineto{\pgfqpoint{2.281925in}{1.742484in}}%
\pgfpathlineto{\pgfqpoint{2.236959in}{1.783842in}}%
\pgfpathlineto{\pgfqpoint{2.191992in}{1.829116in}}%
\pgfpathlineto{\pgfqpoint{2.147026in}{1.878511in}}%
\pgfpathlineto{\pgfqpoint{2.102060in}{1.932263in}}%
\pgfpathlineto{\pgfqpoint{2.057094in}{1.990642in}}%
\pgfpathlineto{\pgfqpoint{2.012128in}{2.053962in}}%
\pgfpathlineto{\pgfqpoint{1.967161in}{2.122582in}}%
\pgfpathlineto{\pgfqpoint{1.922195in}{2.196922in}}%
\pgfpathlineto{\pgfqpoint{1.877229in}{2.277465in}}%
\pgfpathlineto{\pgfqpoint{1.832263in}{2.364777in}}%
\pgfpathlineto{\pgfqpoint{1.791384in}{2.450580in}}%
\pgfpathlineto{\pgfqpoint{1.750506in}{2.543102in}}%
\pgfpathlineto{\pgfqpoint{1.734155in}{2.582140in}}%
\pgfpathlineto{\pgfqpoint{1.730067in}{1.720130in}}%
\pgfpathlineto{\pgfqpoint{1.685101in}{1.784793in}}%
\pgfpathlineto{\pgfqpoint{1.644222in}{1.848720in}}%
\pgfpathlineto{\pgfqpoint{1.603344in}{1.918140in}}%
\pgfpathlineto{\pgfqpoint{1.562466in}{1.993739in}}%
\pgfpathlineto{\pgfqpoint{1.521587in}{2.076337in}}%
\pgfpathlineto{\pgfqpoint{1.484797in}{2.157473in}}%
\pgfpathlineto{\pgfqpoint{1.448006in}{2.245940in}}%
\pgfpathlineto{\pgfqpoint{1.411216in}{2.342780in}}%
\pgfpathlineto{\pgfqpoint{1.374425in}{2.449249in}}%
\pgfpathlineto{\pgfqpoint{1.370337in}{1.765508in}}%
\pgfpathlineto{\pgfqpoint{1.333547in}{1.840128in}}%
\pgfpathlineto{\pgfqpoint{1.300844in}{1.913413in}}%
\pgfpathlineto{\pgfqpoint{1.268141in}{1.994337in}}%
\pgfpathlineto{\pgfqpoint{1.235439in}{2.084197in}}%
\pgfpathlineto{\pgfqpoint{1.206824in}{2.171414in}}%
\pgfpathlineto{\pgfqpoint{1.178209in}{2.268045in}}%
\pgfpathlineto{\pgfqpoint{1.149594in}{2.375749in}}%
\pgfpathlineto{\pgfqpoint{1.145506in}{1.783682in}}%
\pgfpathlineto{\pgfqpoint{1.116891in}{1.865010in}}%
\pgfpathlineto{\pgfqpoint{1.088276in}{1.957075in}}%
\pgfpathlineto{\pgfqpoint{1.063749in}{2.046290in}}%
\pgfpathlineto{\pgfqpoint{1.039222in}{2.146993in}}%
\pgfpathlineto{\pgfqpoint{1.014695in}{2.261612in}}%
\pgfpathlineto{\pgfqpoint{0.998344in}{2.347281in}}%
\pgfpathlineto{\pgfqpoint{0.994256in}{1.794042in}}%
\pgfpathlineto{\pgfqpoint{0.973817in}{1.876881in}}%
\pgfpathlineto{\pgfqpoint{0.953378in}{1.971377in}}%
\pgfpathlineto{\pgfqpoint{0.932939in}{2.080219in}}%
\pgfpathlineto{\pgfqpoint{0.912499in}{2.206993in}}%
\pgfpathlineto{\pgfqpoint{0.896148in}{2.324552in}}%
\pgfpathlineto{\pgfqpoint{0.892060in}{2.607777in}}%
\pgfpathlineto{\pgfqpoint{0.880903in}{2.714919in}}%
\pgfpathlineto{\pgfqpoint{0.880903in}{2.714919in}}%

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4033,84 +4033,83 @@
\definecolor{currentstroke}{rgb}{1.000000,0.498039,0.054902}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.954861in}{0.902486in}}%
\pgfpathlineto{\pgfqpoint{0.960406in}{0.822716in}}%
\pgfpathlineto{\pgfqpoint{0.965951in}{0.780408in}}%
\pgfpathlineto{\pgfqpoint{0.969648in}{0.761748in}}%
\pgfpathlineto{\pgfqpoint{0.971496in}{0.895574in}}%
\pgfpathlineto{\pgfqpoint{0.978890in}{0.843962in}}%
\pgfpathlineto{\pgfqpoint{0.988132in}{0.802890in}}%
\pgfpathlineto{\pgfqpoint{0.997374in}{0.775618in}}%
\pgfpathlineto{\pgfqpoint{1.006616in}{0.756194in}}%
\pgfpathlineto{\pgfqpoint{1.008464in}{0.905067in}}%
\pgfpathlineto{\pgfqpoint{1.019554in}{0.866347in}}%
\pgfpathlineto{\pgfqpoint{1.032493in}{0.833233in}}%
\pgfpathlineto{\pgfqpoint{1.045432in}{0.808449in}}%
\pgfpathlineto{\pgfqpoint{1.060219in}{0.786808in}}%
\pgfpathlineto{\pgfqpoint{1.076854in}{0.768173in}}%
\pgfpathlineto{\pgfqpoint{1.093489in}{0.753663in}}%
\pgfpathlineto{\pgfqpoint{1.095338in}{0.921089in}}%
\pgfpathlineto{\pgfqpoint{1.111973in}{0.892015in}}%
\pgfpathlineto{\pgfqpoint{1.130457in}{0.865801in}}%
\pgfpathlineto{\pgfqpoint{1.150789in}{0.842403in}}%
\pgfpathlineto{\pgfqpoint{1.172969in}{0.821659in}}%
\pgfpathlineto{\pgfqpoint{1.196998in}{0.803349in}}%
\pgfpathlineto{\pgfqpoint{1.224724in}{0.786197in}}%
\pgfpathlineto{\pgfqpoint{1.256146in}{0.770549in}}%
\pgfpathlineto{\pgfqpoint{1.291266in}{0.756548in}}%
\pgfpathlineto{\pgfqpoint{1.315294in}{0.748579in}}%
\pgfpathlineto{\pgfqpoint{1.317143in}{0.907131in}}%
\pgfpathlineto{\pgfqpoint{1.348565in}{0.884865in}}%
\pgfpathlineto{\pgfqpoint{1.381836in}{0.865097in}}%
\pgfpathlineto{\pgfqpoint{1.418804in}{0.846774in}}%
\pgfpathlineto{\pgfqpoint{1.459468in}{0.830135in}}%
\pgfpathlineto{\pgfqpoint{1.503829in}{0.815320in}}%
\pgfpathlineto{\pgfqpoint{1.553735in}{0.801970in}}%
\pgfpathlineto{\pgfqpoint{1.609186in}{0.790436in}}%
\pgfpathlineto{\pgfqpoint{1.670183in}{0.780998in}}%
\pgfpathlineto{\pgfqpoint{1.736724in}{0.773917in}}%
\pgfpathlineto{\pgfqpoint{1.806963in}{0.769568in}}%
\pgfpathlineto{\pgfqpoint{1.879049in}{0.768127in}}%
\pgfpathlineto{\pgfqpoint{1.886443in}{0.768580in}}%
\pgfpathlineto{\pgfqpoint{1.960378in}{0.770496in}}%
\pgfpathlineto{\pgfqpoint{2.030616in}{0.775343in}}%
\pgfpathlineto{\pgfqpoint{2.097158in}{0.782972in}}%
\pgfpathlineto{\pgfqpoint{2.158154in}{0.793017in}}%
\pgfpathlineto{\pgfqpoint{2.213605in}{0.805231in}}%
\pgfpathlineto{\pgfqpoint{2.263511in}{0.819348in}}%
\pgfpathlineto{\pgfqpoint{2.307872in}{0.835017in}}%
\pgfpathlineto{\pgfqpoint{2.348537in}{0.852643in}}%
\pgfpathlineto{\pgfqpoint{2.385504in}{0.872097in}}%
\pgfpathlineto{\pgfqpoint{2.418775in}{0.893147in}}%
\pgfpathlineto{\pgfqpoint{2.442804in}{0.910950in}}%
\pgfpathlineto{\pgfqpoint{2.444652in}{0.748913in}}%
\pgfpathlineto{\pgfqpoint{2.483468in}{0.762598in}}%
\pgfpathlineto{\pgfqpoint{2.516739in}{0.777361in}}%
\pgfpathlineto{\pgfqpoint{2.546313in}{0.793718in}}%
\pgfpathlineto{\pgfqpoint{2.572190in}{0.811436in}}%
\pgfpathlineto{\pgfqpoint{2.596219in}{0.831768in}}%
\pgfpathlineto{\pgfqpoint{2.616551in}{0.852925in}}%
\pgfpathlineto{\pgfqpoint{2.635035in}{0.876406in}}%
\pgfpathlineto{\pgfqpoint{2.651670in}{0.902175in}}%
\pgfpathlineto{\pgfqpoint{2.664609in}{0.926232in}}%
\pgfpathlineto{\pgfqpoint{2.666457in}{0.753564in}}%
\pgfpathlineto{\pgfqpoint{2.684941in}{0.770343in}}%
\pgfpathlineto{\pgfqpoint{2.699728in}{0.787704in}}%
\pgfpathlineto{\pgfqpoint{2.712667in}{0.807075in}}%
\pgfpathlineto{\pgfqpoint{2.725605in}{0.832146in}}%
\pgfpathlineto{\pgfqpoint{2.736696in}{0.860341in}}%
\pgfpathlineto{\pgfqpoint{2.747786in}{0.898015in}}%
\pgfpathlineto{\pgfqpoint{2.749634in}{0.755597in}}%
\pgfpathlineto{\pgfqpoint{2.758876in}{0.774917in}}%
\pgfpathlineto{\pgfqpoint{2.768118in}{0.802044in}}%
\pgfpathlineto{\pgfqpoint{2.775512in}{0.833153in}}%
\pgfpathlineto{\pgfqpoint{2.782905in}{0.879104in}}%
\pgfpathlineto{\pgfqpoint{2.784754in}{0.894233in}}%
\pgfpathlineto{\pgfqpoint{2.786602in}{0.762573in}}%
\pgfpathlineto{\pgfqpoint{2.792147in}{0.793154in}}%
\pgfpathlineto{\pgfqpoint{2.797692in}{0.844644in}}%
\pgfpathlineto{\pgfqpoint{2.801389in}{0.904300in}}%
\pgfpathlineto{\pgfqpoint{2.801389in}{0.904300in}}%
\pgfpathmoveto{\pgfqpoint{0.954861in}{0.901471in}}%
\pgfpathlineto{\pgfqpoint{0.960406in}{0.822014in}}%
\pgfpathlineto{\pgfqpoint{0.965951in}{0.779873in}}%
\pgfpathlineto{\pgfqpoint{0.969648in}{0.761286in}}%
\pgfpathlineto{\pgfqpoint{0.971496in}{0.893383in}}%
\pgfpathlineto{\pgfqpoint{0.978890in}{0.842221in}}%
\pgfpathlineto{\pgfqpoint{0.988132in}{0.801507in}}%
\pgfpathlineto{\pgfqpoint{0.997374in}{0.774473in}}%
\pgfpathlineto{\pgfqpoint{1.004767in}{0.758612in}}%
\pgfpathlineto{\pgfqpoint{1.006616in}{0.911677in}}%
\pgfpathlineto{\pgfqpoint{1.017706in}{0.871036in}}%
\pgfpathlineto{\pgfqpoint{1.028796in}{0.840838in}}%
\pgfpathlineto{\pgfqpoint{1.041735in}{0.814142in}}%
\pgfpathlineto{\pgfqpoint{1.056522in}{0.791062in}}%
\pgfpathlineto{\pgfqpoint{1.073157in}{0.771358in}}%
\pgfpathlineto{\pgfqpoint{1.091641in}{0.754641in}}%
\pgfpathlineto{\pgfqpoint{1.093489in}{0.922228in}}%
\pgfpathlineto{\pgfqpoint{1.110125in}{0.892731in}}%
\pgfpathlineto{\pgfqpoint{1.128608in}{0.866196in}}%
\pgfpathlineto{\pgfqpoint{1.148941in}{0.842560in}}%
\pgfpathlineto{\pgfqpoint{1.171121in}{0.821641in}}%
\pgfpathlineto{\pgfqpoint{1.195150in}{0.803206in}}%
\pgfpathlineto{\pgfqpoint{1.222876in}{0.785962in}}%
\pgfpathlineto{\pgfqpoint{1.254298in}{0.770249in}}%
\pgfpathlineto{\pgfqpoint{1.289417in}{0.756206in}}%
\pgfpathlineto{\pgfqpoint{1.311598in}{0.748795in}}%
\pgfpathlineto{\pgfqpoint{1.313446in}{0.911365in}}%
\pgfpathlineto{\pgfqpoint{1.343020in}{0.889750in}}%
\pgfpathlineto{\pgfqpoint{1.376291in}{0.869287in}}%
\pgfpathlineto{\pgfqpoint{1.413258in}{0.850347in}}%
\pgfpathlineto{\pgfqpoint{1.453923in}{0.833166in}}%
\pgfpathlineto{\pgfqpoint{1.498284in}{0.817880in}}%
\pgfpathlineto{\pgfqpoint{1.546341in}{0.804561in}}%
\pgfpathlineto{\pgfqpoint{1.599944in}{0.792894in}}%
\pgfpathlineto{\pgfqpoint{1.659092in}{0.783188in}}%
\pgfpathlineto{\pgfqpoint{1.723786in}{0.775717in}}%
\pgfpathlineto{\pgfqpoint{1.794024in}{0.770781in}}%
\pgfpathlineto{\pgfqpoint{1.866111in}{0.768794in}}%
\pgfpathlineto{\pgfqpoint{1.958529in}{0.769659in}}%
\pgfpathlineto{\pgfqpoint{2.030616in}{0.774563in}}%
\pgfpathlineto{\pgfqpoint{2.097158in}{0.782147in}}%
\pgfpathlineto{\pgfqpoint{2.158154in}{0.792131in}}%
\pgfpathlineto{\pgfqpoint{2.213605in}{0.804274in}}%
\pgfpathlineto{\pgfqpoint{2.263511in}{0.818306in}}%
\pgfpathlineto{\pgfqpoint{2.307872in}{0.833882in}}%
\pgfpathlineto{\pgfqpoint{2.348537in}{0.851403in}}%
\pgfpathlineto{\pgfqpoint{2.385504in}{0.870741in}}%
\pgfpathlineto{\pgfqpoint{2.418775in}{0.891666in}}%
\pgfpathlineto{\pgfqpoint{2.440956in}{0.907914in}}%
\pgfpathlineto{\pgfqpoint{2.442804in}{0.748606in}}%
\pgfpathlineto{\pgfqpoint{2.483468in}{0.762903in}}%
\pgfpathlineto{\pgfqpoint{2.516739in}{0.777704in}}%
\pgfpathlineto{\pgfqpoint{2.546313in}{0.794103in}}%
\pgfpathlineto{\pgfqpoint{2.572190in}{0.811867in}}%
\pgfpathlineto{\pgfqpoint{2.596219in}{0.832251in}}%
\pgfpathlineto{\pgfqpoint{2.616551in}{0.853463in}}%
\pgfpathlineto{\pgfqpoint{2.635035in}{0.877004in}}%
\pgfpathlineto{\pgfqpoint{2.651670in}{0.902840in}}%
\pgfpathlineto{\pgfqpoint{2.660912in}{0.919647in}}%
\pgfpathlineto{\pgfqpoint{2.662761in}{0.753483in}}%
\pgfpathlineto{\pgfqpoint{2.681244in}{0.769805in}}%
\pgfpathlineto{\pgfqpoint{2.697880in}{0.788972in}}%
\pgfpathlineto{\pgfqpoint{2.712667in}{0.811326in}}%
\pgfpathlineto{\pgfqpoint{2.725605in}{0.837051in}}%
\pgfpathlineto{\pgfqpoint{2.736696in}{0.865982in}}%
\pgfpathlineto{\pgfqpoint{2.747786in}{0.904639in}}%
\pgfpathlineto{\pgfqpoint{2.749634in}{0.756993in}}%
\pgfpathlineto{\pgfqpoint{2.758876in}{0.776555in}}%
\pgfpathlineto{\pgfqpoint{2.768118in}{0.804022in}}%
\pgfpathlineto{\pgfqpoint{2.775512in}{0.835520in}}%
\pgfpathlineto{\pgfqpoint{2.782905in}{0.882047in}}%
\pgfpathlineto{\pgfqpoint{2.784754in}{0.897367in}}%
\pgfpathlineto{\pgfqpoint{2.786602in}{0.762697in}}%
\pgfpathlineto{\pgfqpoint{2.792147in}{0.793310in}}%
\pgfpathlineto{\pgfqpoint{2.797692in}{0.844855in}}%
\pgfpathlineto{\pgfqpoint{2.801389in}{0.904573in}}%
\pgfpathlineto{\pgfqpoint{2.801389in}{0.904573in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4122,8 +4121,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{0.970682in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{0.970682in}{2.101389in}}%
\pgfpathmoveto{\pgfqpoint{0.970620in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{0.970620in}{2.101389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4135,8 +4134,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{0.970682in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{0.970682in}{2.101389in}}%
\pgfpathmoveto{\pgfqpoint{0.970620in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{0.970620in}{2.101389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4148,8 +4147,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{1.006845in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.006845in}{2.101389in}}%
\pgfpathmoveto{\pgfqpoint{1.006468in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.006468in}{2.101389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4161,8 +4160,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{1.093597in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.093597in}{2.101389in}}%
\pgfpathmoveto{\pgfqpoint{1.092850in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.092850in}{2.101389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4174,8 +4173,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{1.315950in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.315950in}{2.101389in}}%
\pgfpathmoveto{\pgfqpoint{1.313228in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.313228in}{2.101389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4187,8 +4186,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{1.879218in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.879218in}{2.101389in}}%
\pgfpathmoveto{\pgfqpoint{1.879342in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{1.879342in}{2.101389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4200,8 +4199,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{2.444454in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{2.444454in}{2.101389in}}%
\pgfpathmoveto{\pgfqpoint{2.441215in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{2.441215in}{2.101389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4213,8 +4212,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{2.665080in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{2.665080in}{2.101389in}}%
\pgfpathmoveto{\pgfqpoint{2.662410in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{2.662410in}{2.101389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4226,8 +4225,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{2.749486in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{2.749486in}{2.101389in}}%
\pgfpathmoveto{\pgfqpoint{2.749019in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{2.749019in}{2.101389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
@ -4239,8 +4238,8 @@
\definecolor{currentstroke}{rgb}{0.501961,0.501961,0.501961}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{{3.700000pt}{1.600000pt}}{0.000000pt}%
\pgfpathmoveto{\pgfqpoint{2.785457in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{2.785457in}{2.101389in}}%
\pgfpathmoveto{\pgfqpoint{2.785440in}{0.594444in}}%
\pgfpathlineto{\pgfqpoint{2.785440in}{2.101389in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%

View file

@ -10,6 +10,7 @@ from multiprocessing import Pool, cpu_count
import functools
from scipy.optimize import minimize_scalar, root, shgo
from dataclasses import dataclass
import utility
def _process_interval(interval):
@ -547,6 +548,7 @@ class SamplingWorker:
_FUN = None
@utility.numpy_cache("cache")
def sample_unweighted_array(
num,
f,
@ -554,22 +556,12 @@ def sample_unweighted_array(
increment_borders=None,
report_efficiency=False,
proc=None,
cache=None,
**kwargs
):
"""Sample `num` elements from a distribution. The rest of the
arguments is analogous to `sample_unweighted`.
"""
global _FUN
if cache is not None and os.path.isfile(cache + ".npy"):
result = np.load(cache + ".npy")
eff = None
eff_path = cache + ".eff.npy"
if report_efficiency:
if os.path.isfile(eff_path):
eff = np.load(eff_path)[0]
return (result, eff) if report_efficiency else result
sample_arr = None
eff = None
@ -643,9 +635,4 @@ def sample_unweighted_array(
eff = next(samples)[1] if report_efficiency else None
if cache is not None:
np.save(cache + ".npy", sample_arr)
if report_efficiency:
np.save(cache + ".eff.npy", [eff])
return (sample_arr, eff) if report_efficiency else sample_arr

View file

@ -22,6 +22,8 @@
#+END_SRC
#+RESULTS:
: The autoreload extension is already loaded. To reload it, use:
: %reload_ext autoreload
** Global Config
#+begin_src jupyter-python :exports both :results raw drawer
@ -30,6 +32,7 @@ e_proton = 100 # GeV
interval_η = [-η, η]
interval = η_to_θ([-η, η])
interval_cosθ = np.cos(interval)
num_samples = 10_000
#+end_src
#+RESULTS:
@ -236,9 +239,14 @@ calculate the 4-momentum kinematics twice. Maybe that can be done
nicer.
#+begin_src jupyter-python :exports both :results raw drawer :tangle tangled/pdf.py
def sample_momenta(num_samples, dist, interval, e_hadron, upper_bound=None):
def sample_momenta(num_samples, dist, interval, e_hadron, upper_bound=None, **kwargs):
res, eff = monte_carlo.sample_unweighted_array(
num_samples, dist, interval, upper_bound=upper_bound, report_efficiency=True
num_samples,
dist,
interval,
upper_bound=upper_bound,
report_efficiency=True,
,**kwargs
)
cosθ, x_1, x_2 = res.T
return momenta(e_hadron, x_1[None, :], x_2[None, :], cosθ[None, :]), eff
@ -266,8 +274,8 @@ Let's plot it for some random values 😃.
#+RESULTS:
:RESULTS:
| <matplotlib.lines.Line2D | at | 0x7fb11a322c40> |
[[file:./.ob-jupyter/a5954d2e2b47ff630695004830c3de94c2e34723.png]]
| <matplotlib.lines.Line2D | at | 0x7f1f47902c10> |
[[file:./.ob-jupyter/f12b49e327ad8ec823397b3bbe910e0d021f4dcd.png]]
:END:
Having set both x to the same value, we get a symmetric distribution as expected.
@ -283,39 +291,24 @@ But first we have to find an upper bound, which is expensive!
#+end_src
#+RESULTS:
: 2786.6683559915655
: 2171.468698483163
Beware!, this is darn slow, becaus the efficiency is soooo low.
#+begin_src jupyter-python :exports both :results raw drawer
sample_momenta(100, dist, intervals, e_proton, upper_bound=upper_bound)[1]
sample_momenta(
100,
dist,
intervals,
e_proton,
upper_bound=upper_bound,
proc="auto",
cache="cache/pdf/samp_costh_test",
)[1]
#+end_src
#+RESULTS:
:RESULTS:
# [goto error]
#+begin_example
TypeErrorTraceback (most recent call last)
<ipython-input-10-cc6814bf2dff> in <module>
----> 1 sample_momenta(100, dist, intervals, e_proton, upper_bound=upper_bound)[1]
<ipython-input-6-abb92c78af23> in sample_momenta(num_samples, dist, interval, e_hadron, upper_bound)
1 def sample_momenta(num_samples, dist, interval, e_hadron, upper_bound=None):
----> 2 res, eff = monte_carlo.sample_unweighted_array(
3 num_samples, dist, interval, upper_bound=upper_bound, report_efficiency=True
4 )
5 cosθ, x_1, x_2 = res.T
~/Documents/Projects/UNI/Bachelor/prog/python/qqgg/monte_carlo.py in sample_unweighted_array(num, f, interval, increment_borders, report_efficiency, *args, **kwargs)
572 )
573 else:
--> 574 raise TypeError("Neiter interval nor increment_borders specified!")
575
576 for i, sample in zip(range(num), samples):
TypeError: Neiter interval nor increment_borders specified!
#+end_example
:END:
: 0.00041597900424616594
** Switching Horses: Sampling η
We set up a new distribution.
@ -339,8 +332,8 @@ Plotting it, we can see that the variance is reduced.
#+RESULTS:
:RESULTS:
| <matplotlib.lines.Line2D | at | 0x7fb1154e17c0> |
[[file:./.ob-jupyter/b5e9e8b157f5596913671e301fefee82daf805a9.png]]
| <matplotlib.lines.Line2D | at | 0x7f1f44296940> |
[[file:./.ob-jupyter/257473d72b7c4ffd6650dd4a736a2feaacac28cb.png]]
:END:
Lets plot how the pdf looks.
@ -354,7 +347,7 @@ Lets plot how the pdf looks.
#+RESULTS:
:RESULTS:
| <matplotlib.lines.Line2D | at | 0x7fb111c4a5b0> |
| <matplotlib.lines.Line2D | at | 0x7f1f4574b0d0> |
[[file:./.ob-jupyter/db6aa636b2795408e0e7b762c7e43ed22136feaf.png]]
:END:
@ -363,84 +356,27 @@ Now we sample some events. Doing this in parallel helps. We let the os
figure out the cpu mapping.
#+begin_src jupyter-python :exports both :results raw drawer
intervals_η = [interval_η, [.01, 1], [.01, 1]]
result, eff = monte_carlo.sample_unweighted_array(
10_000_000,
num_samples,
dist_η,
interval=intervals_η,
proc="auto",
report_efficiency=True,
cache="cache/huge",
cache="cache/pdf/huge",
)
result
#+end_src
#+RESULTS:
:RESULTS:
# [goto error]
#+begin_example
TypeErrorTraceback (most recent call last)
<ipython-input-266-1e94dc16f128> in <module>
----> 1 result, eff = monte_carlo.sample_unweighted_array(
2 10_000_000,
3 dist_η,
4 interval=intervals_η,
5 proc="auto",
~/Documents/Projects/UNI/Bachelor/prog/python/qqgg/monte_carlo.py in sample_unweighted_array(num, f, interval, increment_borders, report_efficiency, proc, cache, **kwargs)
585 _FUN = f # there is no other way :(
586
--> 587 workers = [
588 SamplingWorker.remote(
589 num_samples=num,
~/Documents/Projects/UNI/Bachelor/prog/python/qqgg/monte_carlo.py in <listcomp>(.0)
586
587 workers = [
--> 588 SamplingWorker.remote(
589 num_samples=num,
590 interval=interval,
/usr/lib/python3.8/site-packages/ray/actor.py in remote(self, *args, **kwargs)
377 A handle to the newly created actor.
378 """
--> 379 return self._remote(args=args, kwargs=kwargs)
380
381 def options(self, **options):
/usr/lib/python3.8/site-packages/ray/actor.py in _remote(self, args, kwargs, num_cpus, num_gpus, memory, object_store_memory, resources, is_direct_call, max_concurrency, name, detached)
527 # So, here pass actor_creation_function_descriptor to make
528 # sure export actor class correct.
--> 529 worker.function_actor_manager.export_actor_class(
530 meta.modified_class,
531 meta.actor_creation_function_descriptor,
/usr/lib/python3.8/site-packages/ray/function_manager.py in export_actor_class(self, Class, actor_creation_function_descriptor, actor_method_names)
357 "class_name": actor_creation_function_descriptor.class_name,
358 "module": actor_creation_function_descriptor.module_name,
--> 359 "class": pickle.dumps(Class),
360 "job_id": job_id.binary(),
361 "collision_identifier": self.compute_collision_identifier(Class),
/usr/lib/python3.8/site-packages/ray/cloudpickle/cloudpickle_fast.py in dumps(obj, protocol, buffer_callback)
70 cp = CloudPickler(file, protocol=protocol,
71 buffer_callback=buffer_callback)
---> 72 cp.dump(obj)
73 return file.getvalue()
74
/usr/lib/python3.8/site-packages/ray/cloudpickle/cloudpickle_fast.py in dump(self, obj)
615 def dump(self, obj):
616 try:
--> 617 return Pickler.dump(self, obj)
618 except RuntimeError as e:
619 if "recursion" in e.args[0]:
/usr/lib/python3.8/site-packages/lhapdf.cpython-38-x86_64-linux-gnu.so in lhapdf.PDF.__reduce_cython__()
TypeError: self._ptr cannot be converted to a Python object for pickling
#+end_example
:END:
: array([[ 2.00392989, 0.03589851, 0.13781655],
: [-0.77083958, 0.01088047, 0.1545276 ],
: [-1.36224887, 0.02099844, 0.05346773],
: ...,
: [-0.22217984, 0.01724194, 0.06289104],
: [-1.26972433, 0.23321426, 0.01352318],
: [ 1.76699256, 0.01239091, 0.10577669]])
@ -452,11 +388,11 @@ file.
Let's look at a histogramm of eta samples.
#+begin_src jupyter-python :exports both :results raw drawer
draw_histo(result[:, 0], "asht", bins=100)
draw_histo_auto(result[:, 0], "asht", bins=100)
#+end_src
#+RESULTS:
:RESULTS:
| <Figure | size | 432x288 | with | 1 | Axes> | <matplotlib.axes._subplots.AxesSubplot | at | 0x7fb080632490> |
[[file:./.ob-jupyter/29ac0eecec5e1fb3efacb59e786c1a3231d26d54.png]]
| <Figure | size | 432x288 | with | 1 | Axes> | <matplotlib.axes._subplots.AxesSubplot | at | 0x7f1f3dd9f340> |
[[file:./.ob-jupyter/3658a99592960354e2b5997443ea0a9de8426d9a.png]]
:END:

View file

@ -1 +1 @@
\(\mathfrak{e} = 60\%\)
\(\mathfrak{e} = 59\%\)

View file

@ -1 +1 @@
\(\sigma = \SI{0.0538\pm 0.0009}{\pico\barn}\)
\(\sigma = \SI{0.0537\pm 0.0009}{\pico\barn}\)

View file

@ -1 +1 @@
\(N = 2191\)
\(N = 2290\)

View file

@ -1 +1 @@
\(\sigma = \SI{0.0536\pm 0.0010}{\pico\barn}\)
\(\sigma = \SI{0.0547\pm 0.0009}{\pico\barn}\)

View file

@ -1 +1 @@
\(N = 131\)
\(N = 155\)

View file

@ -1 +1 @@
\(\sigma = \SI{0.05402\pm 0.00013}{\pico\barn}\)
\(\sigma = \SI{0.05389\pm 0.00013}{\pico\barn}\)

View file

@ -183,9 +183,14 @@ def get_xs_distribution_with_pdf(xs, q, e_hadron, quarks=None, pdf=None):
return distribution, (pdf.xMin, pdf.xMax)
def sample_momenta(num_samples, dist, interval, e_hadron, upper_bound=None):
def sample_momenta(num_samples, dist, interval, e_hadron, upper_bound=None, **kwargs):
res, eff = monte_carlo.sample_unweighted_array(
num_samples, dist, interval, upper_bound=upper_bound, report_efficiency=True
num_samples,
dist,
interval,
upper_bound=upper_bound,
report_efficiency=True,
**kwargs
)
cosθ, x_1, x_2 = res.T
return momenta(e_hadron, x_1[None, :], x_2[None, :], cosθ[None, :]), eff

View file

@ -102,7 +102,7 @@ def draw_ratio_plot(histograms, normalize_to=1, **kwargs):
)
set_up_axis(ax_ratio, pimp_top=False)
ax_ratio.set_ylabel('ratio')
ax_ratio.set_ylabel("ratio")
draw_histogram(
ax_ratio,
[heights / reference, edges],
@ -131,7 +131,7 @@ def draw_histogram(
histogram,
errorbars=True,
hist_kwargs=dict(color="#1f77b4"),
errorbar_kwargs=dict(color="orange"),
errorbar_kwargs=dict(),
normalize_to=None,
):
"""Draws a histogram with optional errorbars using the step style.
@ -161,14 +161,10 @@ def draw_histogram(
hist_plot = ax.step(edges, [heights[0], *heights], **hist_kwargs)
if errorbars is not False:
ax.errorbar(
centers,
heights,
deviations,
linestyle="none",
color=hist_plot[0].get_color(),
**errorbar_kwargs
)
if "color" not in errorbar_kwargs:
errorbar_kwargs["color"] = hist_plot[0].get_color()
ax.errorbar(centers, heights, deviations, linestyle="none", **errorbar_kwargs)
ax.set_xlim(*[edges[0], edges[-1]])

View file

@ -140,6 +140,7 @@ def sample_momenta(sample_num, interval, charge, esp, seed=None, **kwargs):
cosθ_sample = monte_carlo.sample_unweighted_array(
sample_num, lambda x: diff_xs_cosθ(x, charge, esp), interval_cosθ, **kwargs
)
print(cosθ_sample)
φ_sample = np.random.uniform(0, 1, sample_num)
def make_momentum(esp, cosθ, φ):

View file

@ -5,6 +5,7 @@ import matplotlib.ticker as ticker
import functools
import numpy as np
import os
import errno
###############################################################################
# Utility #
@ -31,15 +32,34 @@ def numpy_cache(cache_arg_name):
@functools.wraps(f)
def caching_wrapper(*args, **kwargs):
if cache_arg_name in kwargs:
if not kwargs[cache_arg_name]:
del kwargs[cache_arg_name]
return f(*args, **kwargs)
path = kwargs[cache_arg_name] + ".npy"
print("Trying cache")
if os.path.isfile(path):
return np.load(path)
name, result = np.load(path, allow_pickle=True)
print(f.__name__)
if f.__name__ == name[0]:
return result
raise RuntimeError(
f"Try to read to cache from function '{name[0]}'."
)
del kwargs[cache_arg_name]
result = f(*args, **kwargs)
np.save(path, result)
if not os.path.exists(os.path.dirname(path)):
try:
os.makedirs(os.path.dirname(path))
except OSError as exc: # Guard against race condition
if exc.errno != errno.EEXIST:
raise
np.save(path, ([f.__name__], result))
return result

BIN
test.npy

Binary file not shown.