Code Monkey home page Code Monkey logo

coffeandbacon's Introduction

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 coffea 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
# optional, because output saved in repository: ./make_pileup.py
./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 the hists.coffea file as created by run_baconbits.py, but the top background notebook can be run after downloading the test baconbits.

coffeandbacon's People

Contributors

nsmith- avatar lgray avatar annawoodard avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.