You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[numpythia](https://github.com/scikit-hep/numpythia)| Interface between FastJet and NumPy. |
88
90
|[pyjet](https://github.com/scikit-hep/pyjet)| Interface between PYTHIA and NumPy. |
89
91
90
-
## Jupyter extensions
91
-
92
-
Jupyter has a wide ecosystem of extensions that can be used to extend the functionality. Some useful extensions for HEP data analysis are summarised here.
93
-
94
-
| Name | Use |
95
-
| ------------ | --------------- |
96
-
| nbdime | Simplifies diffing and merging of jupyter notebooks that are stored in version control. |
97
-
| jupytext | Splits notebooks into a `.ipynb` and `.py` file for easier version control and to allow them to be run as scripts idependently of jupyter. |
98
92
99
93
## Tutorials
100
94
101
-
See tutorials here and other resources collected by [IML HEP-ML Resources](https://github.com/iml-wg/HEP-ML-Resources#tutorials)
95
+
See tutorials here and other resources collected by [IML HEP-ML Resources](https://github.com/iml-wg/HEP-ML-Resources#tutorials).
96
+
102
97
103
98
## ROOT and interoperability with ROOT
104
99
105
100
For many particle physics experiments, a lot of data is stored within ROOT files. This means at very least one must have the ability to read ROOT files. ROOT also serves as a tool suite designed to solve many computational problems encountered in HEP, which means that one may want to access some of this tool suite. The following packages below are worth knowing for these situations:
106
101
107
102
| Package name | Use | Pro | Con | Further information |
|[ostap](https://github.com/OstapHEP/ostap)| User-friendly & more intuitive interface to(Py)ROOT | Many decorations to ROOT classes | Requires C++ code compilation ||
109
105
|[uproot](https://github.com/scikit-hep/uproot)| Native Python ROOT I/O | Easy to install, fast, no dependence on C++ ROOT | Although can read all ROOT files, can only write ROOT files with specific objects. ||
110
106
| root_numpy, root_pandas | ROOT to/from Numpy and Pandas, like uproot | full ROOT functionality, like TFormula | slower than uproot, binary incompatibilities with different versions of ROOT ||
111
107
|[ROOT conda](https://nlesc.gitbooks.io/cern-root-conda-recipes/content/installing_root_via_anaconda.html)| Using ROOT within Anaconda | Easy to get ROOT installed with PyROOT support | Not all features of ROOT and getting dated (6.04 Py2.7/3.4 since XENON1T uses that) |[Recipes](https://github.com/NLeSC/root-conda-recipes)|
@@ -115,6 +111,16 @@ For many particle physics experiments, a lot of data is stored within ROOT files
115
111
|[pyhf](https://github.com/diana-hep/pyhf)| statistical analysis / fitting | pure python implementation of HistFactory specification with auto-diff enabled backends in tensorflow, pytorch, and MXNet | not yet interoperable with ROOT-based RooFit models |[pyhf](https://github.com/diana-hep/pyhf)|
116
112
117
113
114
+
## Jupyter extensions
115
+
116
+
Jupyter has a wide ecosystem of extensions that can be used to extend the functionality. Some useful extensions for HEP data analysis are summarised here.
117
+
118
+
| Name | Use |
119
+
| ------------ | --------------- |
120
+
| nbdime | Simplifies diffing and merging of jupyter notebooks that are stored in version control. |
121
+
| jupytext | Splits notebooks into a `.ipynb` and `.py` file for easier version control and to allow them to be run as scripts idependently of jupyter. |
122
+
123
+
118
124
## Speeding up code
119
125
120
126
Often, it is not needed anymore to write C++/C routines that get wrapped since there are other ways to speed up your Python code. Namely:
@@ -126,6 +132,7 @@ Often, it is not needed anymore to write C++/C routines that get wrapped since t
126
132
|[numpy](http://www.numpy.org)| Expressing your code as array options means you get native-C speeds. |
127
133
| NumExpr | single pass "mapper" operations (one input → one output). |
128
134
135
+
129
136
## Binding C/C++ to Python
130
137
131
138
*Before you read this, realize that this is for existing C++ code. If you want to write new C/C++ code for speed, see section above.*
@@ -145,6 +152,7 @@ At present, the best summary of how to bind code in HEP applications comes from
145
152
| swig | Wrapping C++ code | Widely used. | Have to write wrapper file and feels dated. ||
146
153
| Boost | Wrapping C++ code | Widely used. | Giant dependency since Boost does many other things.||
147
154
155
+
148
156
## Experimental codes
149
157
150
158
Stealing code from other physicists is its own sign of flattery. Codes that are abandoned more than two years will get struck through.:
0 commit comments