Skip to content

Commit

Permalink
Small fixes after YETI
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMStraub committed Jan 10, 2018
1 parent 0b8d6d0 commit 2441616
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 60 deletions.
24 changes: 12 additions & 12 deletions 1 Installation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,17 @@
"Unit tests play an important role in making the code as reliable as possible and making development easier "
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"(If the `nosetests` command doesn't work on your system, try running `python3 -m nose flavio` instead)"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand All @@ -376,7 +387,7 @@
"### Installing Jupyter & IPython\n",
"\n",
"```bash\n",
"pip3 install jupyter --user\n",
"pip3 install ipython jupyter --user\n",
"```\n",
"\n",
"... and the run it:\n",
Expand Down Expand Up @@ -421,17 +432,6 @@
"4. [Fits](4 Fits.ipynb) (statistical inference)\n",
"5. [Extending flavio](5 Extending.ipynb) (adding new observables)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
51 changes: 24 additions & 27 deletions 2 Basic concepts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,9 @@
"metadata": {},
"outputs": [],
"source": [
"%time flavio.sm_uncertainty('<P5p>(B0->K*mumu)',\n",
" q2min=1, q2max=6, N=100)"
"%%time\n",
"flavio.sm_uncertainty('<P5p>(B0->K*mumu)',\n",
" q2min=1, q2max=6, N=100)"
]
},
{
Expand All @@ -390,8 +391,9 @@
"metadata": {},
"outputs": [],
"source": [
"%time flavio.sm_uncertainty('<P5p>(B0->K*mumu)',\n",
" q2min=1, q2max=6, N=100, threads=2)"
"%%time\n",
"flavio.sm_uncertainty('<P5p>(B0->K*mumu)',\n",
" q2min=1, q2max=6, N=100, threads=2)"
]
},
{
Expand Down Expand Up @@ -421,11 +423,24 @@
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
"slide_type": "subslide"
}
},
"source": [
"This can now be visualized:"
"This can now be visualized.\n",
"\n",
"Necessary imports:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import flavio.plots as fpl\n",
"%matplotlib inline\n",
"%config InlineBackend.figure_format = 'svg'"
]
},
{
Expand Down Expand Up @@ -524,36 +539,18 @@
"### Things to do with measurements: e.g. plots"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Necessary imports"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import flavio.plots as fpl\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"%config InlineBackend.figure_format = 'svg'"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true,
"scrolled": false,
"slideshow": {
"slide_type": "subslide"
"slide_type": ""
}
},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"obs = '<P5p>(B0->K*mumu)';\n",
"fpl.bin_plot_exp(obs, col_dict={'LHCb': 'C0', 'CMS': 'C1', 'ATLAS': 'C2'});\n",
"plt.legend()\n",
Expand Down
14 changes: 1 addition & 13 deletions 3 Wilson coefficients.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
},
"outputs": [],
"source": [
"! cat 'SPheno.spc.MSSM'"
"! cat 'files/SPheno.spc.MSSM'"
]
},
{
Expand Down Expand Up @@ -495,18 +495,6 @@
"source": [
"Next: [Fits](4 Fits.ipynb)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true,
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
18 changes: 11 additions & 7 deletions 4 Fits.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,17 @@
"Plotting the result"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fpl.density_contour_joint(scan.result[:, -2], scan.result[:, -1]);\n",
"plt.xlim([-0.07, 0.07]);\n",
"plt.ylim([-2, 2]);"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -900,13 +911,6 @@
"source": [
"Next: [Extending flavio](5 Extending.ipynb)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion 5 Extending.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": ""
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ flavio==0.27
matplotlib>=2.1
nose
RISE
emcee
iminuit

0 comments on commit 2441616

Please sign in to comment.