Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 1.49 KB

README_jupyter.md

File metadata and controls

61 lines (47 loc) · 1.49 KB

Jupyter Notebook

Some instruction to use Jupyter Notebook. For CERN users, it's also possible to use SWAN directly with ROOT+Python+Jupyter binding and kernel service.

Jupyter

Installation

pip3 install jupyter

Other options of installation can be found here.

Running the Notebook

jupyter notebook

This will print some information about the notebook server in your terminal, and open your default web browser to this URL.

The following code should open the given notebook in the currently running notebook server, starting one if necessary.

jupyter notebook notebook.ipynb

More details can be found from the official users guide.

Convert C marcos or pyroot macros to notebooks

Here is a script converttonotebook.py used to convert ROOT official tutorial codes to notebooks.

But it requires some header lines at the beginning of the macros:

/// \file
/// \ingroup tutorial_fit
/// \notebook
/// Simple fitting example (1-d histogram with an interpreted function)
///
/// \macro_image
/// \macro_output
/// \macro_code
///
/// \author XXX

or for pyroot

## \file
## \ingroup tutorial_pyroot
## \notebook
## Fit example.
##
## \macro_image
## \macro_output
## \macro_code
##
## \author XXX