Python-based EDM analysis » History » Version 6
Python-based EDM analysis¶
Python is awesome! You can start using it for your analysis in two ways: 1) writing Python-based ROOT macros (pyROOT), or interact with ROOT files directly in a JupyerLab environment (JupyROOT) 2) Convert ROOT file into Numpy/HDF/etc. format and fit using Python tools directly (e.g. scipy-optimize).
To get started you need to set-up the official blinding tools on your laptop here: https://cdcvs.fnal.gov/redmine/projects/gm2analyses/wiki/Library_installation
Then go to the bottom of that page, and follow "Using the code in Python3". There are already examples provided for a 5 parameter fit by Kim!¶
Here is one for the tracker fit for an EDM-based analysis
To install JupyerLab on your laptop follow the instructions here: https://jupyterlab.readthedocs.io/en/stable/
Make sure to go via the pip installation route (not anaconda!).
That's it! The rest is the same as using a ROOT C macro, but being in a Jupyer environment one can execute things interactively and use native Python plotting tools.