Skip to main content

HighResAnalysis

The current repository is in development and is not guaranteed to work The working version can be found https://github.com/diamondIPP/HighResAnalysis

Prerequisites

  • python>=3.6
    • python=3.10 was used for the development
  • cmake>=3.7

Installation

  • First, install mamba. If you do not yet have conda install then getting Mambaforge is the recommended way to get mamba. Here is the instruction for Linux.
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh"
bash Mambaforge-Linux-x86_64.sh 

If this not the case for you. You can follow the instruction on mamba install page

  • Next you can install root. In the root installation instructions you need to replace conda with mamba and skip the instructions about the environment, since the Mambaforge already created the default base environment.
mamba config --set channel_priority strict
mamba install root
mamba install -c conda-forge root
  • Install the analysis code:
pip install HighResAnalysys
  • Optionally install other useful python packages:
mamba install -c conda-forge scikit-learn numpy pandas 
mamba install pyarrow openpyxl xlrd pytables requests sqlalchemy
mamba install -c fastai nbdev
mamba install jupyterlab
mamba install jupyternotebook
mamba install ipython
mamba install notebook
mamba install voila
  • For the installation of the software hosted on the GitHub it is useful to make a dedicated folder:
mkdir software
cd software
- And clone all the necessary packages there:
        git clone git@github.com:diamondIPP/DRS4-v5-shared.git
        git clone git@github.com:diamondIPP/proteus.git
        git clone git@github.com:diamondIPP/judith.git
        git clone git@github.com:diamondIPP/HVClient.git
        git clone git@github.com:diamondIPP/eudaq-2.git
  • generate shh keys and copy them to login.phys.ethz.ch
        ssh-keygen
        ssh-copy-id username@login.phys.ethz.ch
  • Clone the analysis setup from GitHub. It contains all the necessary config files:
git clone git@github.com:diamondIPP/setup-analysis.git HighResAnalysis
cd HighResAnalysis/
  • To install the converters follow the instructions on the respective pages:
    • proteus
      • It will need Eigen3 and you will have to tell cmake the path to it.
    • judith (only for CERN data)
    • eudaq2 (only for DESY data)

Example analysis of the DESY data

the data need to be frist pre-converted:

>analyse --run=4

you will need to import a couple of libraries. Most of the tools are in src.dut_analysis. It will load the data and set all the cuts. The draw module from plotting library has some useful functions and presets that allow plotting histograms and graphs

from HighResAnalysis.src.dut_analysis import *
from HighResAnalysis.plotting.draw import *
Welcome to JupyROOT 6.28/00

Initialize the DUTAnalysis with run number, DUT number, and a string indicating the year and the month of the beam test

run4 = DUTAnalysis(4, 0, '201912')
--- Palette ------ 55

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
STARTING DUT ANALYSIS of D02, run 4 (Dec 2019), 2.50M ev |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

************** Initing Converter *****************
*************** Initing PROTEUS ******************

A small function that allows inline plotting of ROOT histograms

def dc(): get_last_canvas().Draw()

Let’s plot a signal distribution

run4.draw_charge_distribution()
dc()
INFO:     10:34:18 --> Creating directory: /Users/hits/Documents/GitHub/HighResAnalysis/HighResAnalysis/results/201912
INFO:     10:34:18 --> saving plot: SignalDist
WARNING:  10:34:19 --> Diamond server is not mounted in /Users/hits/mounts/high-rate

Release files for HighResAnalysis 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for HighResAnalysis 0.0.7
File Size Uploaded
HighResAnalysis-0.0.7.tar.gz 128.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for HighResAnalysis 0.0.7
File Interpreter ABI Platform
HighResAnalysis-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 277.0 kB

Release files / HighResAnalysis-0.0.7.tar.gz

Download URL HighResAnalysis-0.0.7.tar.gz
Size 128.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a8d5dcadb85c43f5a0fabbbac22ee1eb0e2731288c478e9b39abb4d20d2c927a
BLAKE2b-256 checksum
How to use checksums
f87c42582a9b53fd7b8588a1d3d89b2560833097452deaf20b4c24e4feabbe39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / HighResAnalysis-0.0.7-py3-none-any.whl

Download URL HighResAnalysis-0.0.7-py3-none-any.whl
Size 148.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4e728ab77bd930249bcc555ade6cd9dfbd7df6272f1b753acb8883430722ab2
BLAKE2b-256 checksum
How to use checksums
5b077d1514af6828a62cd922b6e15a21a683c34feb5b4513421e3f8c735364f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page