|
1 | 1 | {
|
2 | 2 | "cells": [
|
3 | 3 | {
|
| 4 | + "attachments": {}, |
4 | 5 | "cell_type": "markdown",
|
5 | 6 | "id": "f4bdc262",
|
6 | 7 | "metadata": {},
|
|
24 | 25 | ]
|
25 | 26 | },
|
26 | 27 | {
|
| 28 | + "attachments": {}, |
27 | 29 | "cell_type": "markdown",
|
28 | 30 | "id": "49c44094",
|
29 | 31 | "metadata": {},
|
|
35 | 37 | ]
|
36 | 38 | },
|
37 | 39 | {
|
| 40 | + "attachments": {}, |
38 | 41 | "cell_type": "markdown",
|
39 | 42 | "id": "991a4343",
|
40 | 43 | "metadata": {},
|
|
77 | 80 | ]
|
78 | 81 | },
|
79 | 82 | {
|
| 83 | + "attachments": {}, |
80 | 84 | "cell_type": "markdown",
|
81 | 85 | "id": "808b4789",
|
82 | 86 | "metadata": {},
|
|
130 | 134 | ]
|
131 | 135 | },
|
132 | 136 | {
|
| 137 | + "attachments": {}, |
133 | 138 | "cell_type": "markdown",
|
134 | 139 | "id": "a22d0859",
|
135 | 140 | "metadata": {},
|
|
349 | 354 | ]
|
350 | 355 | },
|
351 | 356 | {
|
| 357 | + "attachments": {}, |
352 | 358 | "cell_type": "markdown",
|
353 | 359 | "id": "3243414e",
|
354 | 360 | "metadata": {},
|
|
395 | 401 | ]
|
396 | 402 | },
|
397 | 403 | {
|
| 404 | + "attachments": {}, |
398 | 405 | "cell_type": "markdown",
|
399 | 406 | "id": "b0b27a46",
|
400 | 407 | "metadata": {},
|
|
434 | 441 | ]
|
435 | 442 | },
|
436 | 443 | {
|
| 444 | + "attachments": {}, |
437 | 445 | "cell_type": "markdown",
|
438 | 446 | "id": "2114307f",
|
439 | 447 | "metadata": {},
|
|
476 | 484 | ]
|
477 | 485 | },
|
478 | 486 | {
|
| 487 | + "attachments": {}, |
479 | 488 | "cell_type": "markdown",
|
480 | 489 | "id": "62bbc8c8",
|
481 | 490 | "metadata": {},
|
|
596 | 605 | ]
|
597 | 606 | },
|
598 | 607 | {
|
| 608 | + "attachments": {}, |
599 | 609 | "cell_type": "markdown",
|
600 | 610 | "id": "b66c8142",
|
601 | 611 | "metadata": {},
|
|
661 | 671 | ]
|
662 | 672 | },
|
663 | 673 | {
|
| 674 | + "attachments": {}, |
664 | 675 | "cell_type": "markdown",
|
665 | 676 | "id": "5feb786b",
|
666 | 677 | "metadata": {},
|
|
735 | 746 | ]
|
736 | 747 | },
|
737 | 748 | {
|
| 749 | + "attachments": {}, |
738 | 750 | "cell_type": "markdown",
|
739 | 751 | "id": "9f861625",
|
740 | 752 | "metadata": {},
|
|
758 | 770 | ]
|
759 | 771 | },
|
760 | 772 | {
|
| 773 | + "attachments": {}, |
761 | 774 | "cell_type": "markdown",
|
762 | 775 | "id": "6ea49c8e-2d20-47d5-8fd6-2f51e4ef1e0e",
|
763 | 776 | "metadata": {},
|
|
781 | 794 | },
|
782 | 795 | "outputs": [],
|
783 | 796 | "source": [
|
784 |
| - "config = cabinetry.configuration.load(\"cabinetry_config.yml\")\n", |
| 797 | + "cabinetry_config = cabinetry.configuration.load(\"cabinetry_config.yml\")\n", |
785 | 798 | "\n",
|
786 | 799 | "# rebinning: lower edge 110 GeV, merge bins 2->1\n",
|
787 |
| - "rebinning_router = utils.get_cabinetry_rebinning_router(config, rebinning=slice(110j, None, hist.rebin(2)))\n", |
788 |
| - "cabinetry.templates.build(config, router=rebinning_router)\n", |
789 |
| - "cabinetry.templates.postprocess(config) # optional post-processing (e.g. smoothing)\n", |
790 |
| - "ws = cabinetry.workspace.build(config)\n", |
| 800 | + "rebinning_router = utils.get_cabinetry_rebinning_router(cabinetry_config, rebinning=slice(110j, None, hist.rebin(2)))\n", |
| 801 | + "cabinetry.templates.build(cabinetry_config, router=rebinning_router)\n", |
| 802 | + "cabinetry.templates.postprocess(cabinetry_config) # optional post-processing (e.g. smoothing)\n", |
| 803 | + "ws = cabinetry.workspace.build(cabinetry_config)\n", |
791 | 804 | "cabinetry.workspace.save(ws, \"workspace.json\")"
|
792 | 805 | ]
|
793 | 806 | },
|
794 | 807 | {
|
| 808 | + "attachments": {}, |
795 | 809 | "cell_type": "markdown",
|
796 | 810 | "id": "6feae4d5",
|
797 | 811 | "metadata": {},
|
|
839 | 853 | ]
|
840 | 854 | },
|
841 | 855 | {
|
| 856 | + "attachments": {}, |
842 | 857 | "cell_type": "markdown",
|
843 | 858 | "id": "aab2493c",
|
844 | 859 | "metadata": {},
|
|
876 | 891 | ]
|
877 | 892 | },
|
878 | 893 | {
|
| 894 | + "attachments": {}, |
879 | 895 | "cell_type": "markdown",
|
880 | 896 | "id": "fe677e60",
|
881 | 897 | "metadata": {},
|
|
906 | 922 | ]
|
907 | 923 | },
|
908 | 924 | {
|
| 925 | + "attachments": {}, |
909 | 926 | "cell_type": "markdown",
|
910 | 927 | "id": "35e5a9aa",
|
911 | 928 | "metadata": {},
|
|
936 | 953 | ],
|
937 | 954 | "source": [
|
938 | 955 | "model_prediction = cabinetry.model_utils.prediction(model)\n",
|
939 |
| - "figs = cabinetry.visualize.data_mc(model_prediction, data, close_figure=True, config=config)\n", |
| 956 | + "figs = cabinetry.visualize.data_mc(model_prediction, data, close_figure=True, config=cabinetry_config)\n", |
940 | 957 | "figs[0][\"figure\"]"
|
941 | 958 | ]
|
942 | 959 | },
|
|
965 | 982 | ]
|
966 | 983 | },
|
967 | 984 | {
|
| 985 | + "attachments": {}, |
968 | 986 | "cell_type": "markdown",
|
969 | 987 | "id": "9908c2a2",
|
970 | 988 | "metadata": {},
|
|
994 | 1012 | ],
|
995 | 1013 | "source": [
|
996 | 1014 | "model_prediction_postfit = cabinetry.model_utils.prediction(model, fit_results=fit_results)\n",
|
997 |
| - "figs = cabinetry.visualize.data_mc(model_prediction_postfit, data, close_figure=True, config=config)\n", |
| 1015 | + "figs = cabinetry.visualize.data_mc(model_prediction_postfit, data, close_figure=True, config=cabinetry_config)\n", |
998 | 1016 | "figs[0][\"figure\"]"
|
999 | 1017 | ]
|
1000 | 1018 | },
|
|
1023 | 1041 | ]
|
1024 | 1042 | },
|
1025 | 1043 | {
|
| 1044 | + "attachments": {}, |
1026 | 1045 | "cell_type": "markdown",
|
1027 | 1046 | "id": "269f8c3a",
|
1028 | 1047 | "metadata": {},
|
|
1059 | 1078 | "name": "python",
|
1060 | 1079 | "nbconvert_exporter": "python",
|
1061 | 1080 | "pygments_lexer": "ipython3",
|
1062 |
| - "version": "3.8.16" |
| 1081 | + "version": "3.9.16" |
1063 | 1082 | }
|
1064 | 1083 | },
|
1065 | 1084 | "nbformat": 4,
|
|
0 commit comments