Skip to content

kmondal/coffeandbacon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coffea and bacon

A repository for using columnar analysis on bacon(bits) files.

Setup

To use, first an environment must be setup. If running on your laptop, running pip install fnal-column-analysis-tools jupyter should get most of the way there. It might be preferable to install some of these things via conda. Note, this is a python 3 package, python 2 is end of life so get used to print(). To install at the LPC, there is a script:

source setup_lcg.sh

On future use at LPC, run source env_lcg.sh.

Running the Hbb analysis on baconbits

The following recipe runs all the relevant code to produce templates similar to those of sampleContainer:

cd analysis
./compile_corrections.py
./boostedHbbProcessor.py
./run_baconbits.py --executor futures --sample Hbb_2017
python baconbits-templates.py
python convert2d.py
ls hist_1DZbb*

This will take about 25 minutes to run. To just get your feet wet, look at ./run_baconbits.py --help, then run

./download_testbits.sh
./run_baconbits.py --sample test_bits

which will not take much time.

Plots with jupyter

To use jupyter on a laptop, jupyter notebook should work. To use juptyer at LPC, start a notebook server with, e.g. jupyter notebook --no-browser --port $PORT, substituing your favorite port: pick a random integer in (8000,65535). Often, you'll need an ssh tunnel, which can be accomplished via, e.g. ssh -L $PORT:localhost:$PORT server.address

Check out some of the notebooks in the analysis directory. Most will need hists.pkl.gz as created by run_baconbits.py, but the top background notebook can be run after downloading the test baconbits.

About

A delicious breakfast

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 49.1%
  • Python 47.6%
  • Shell 3.3%