HighResAnalysis


NameHighResAnalysis JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/dmitryhits/HighResAnalysis
SummaryAnalysis of High Resolution Data from CERN and DESY beam tests
upload_time2023-05-24 12:43:47
maintainer
docs_urlNone
authorDmitry Hits
requires_python>=3.7
licenseApache Software License 2.0
keywords nbdev jupyter notebook python alignment telescope testbeam
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            HighResAnalysis
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

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](https://www.python.org)\>=3.6
  - python=3.10 was used for the development
- [cmake](https://cmake.org)\>=3.7
  - optionally [cmake GUI](https://cmake.org/runningcmake/), for example
    ccmake

## Installation

- First, install `mamba`. If you do not yet have `conda` install then
  getting
  [Mambaforge](https://github.com/conda-forge/miniforge#mambaforge) is
  the recommended way to get `mamba`. Here is the instruction for Linux.

``` shell
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](https://mamba.readthedocs.io/en/latest/installation.html#installation "complete mamba installation instructions")

- Next you can install [root](https://root.cern.ch). In the [root
  installation instructions](https://root.cern/install/#conda) you need
  to replace `conda` with `mamba` and skip the instructions about the
  environment, since the `Mambaforge` already created the default `base`
  environment.

``` shell
mamba config --set channel_priority strict
mamba install root
mamba install -c conda-forge root
```

- Install the analysis code:

``` shell
pip install HighResAnalysys
```

- Optionally install other useful python packages:

``` shell
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:

``` shell
mkdir software
cd software
```

    - And clone all the necessary packages there:

``` shell
        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

``` shell
        ssh-keygen
        ssh-copy-id username@login.phys.ethz.ch
```

- Clone the analysis setup from GitHub. It contains all the necessary
  config files:

``` shell
git clone git@github.com:diamondIPP/setup-analysis.git HighResAnalysis
cd HighResAnalysis/
```

- To install the converters follow the instructions on the respective
  pages:
  - [proteus](https://github.com/diamondIPP/proteus)
    - It will need
      [Eigen3](https://eigen.tuxfamily.org/index.php?title=Main_Page)
      and you will have to tell `cmake` the path to it.
  - [judith](https://github.com/diamondIPP/judith) (only for CERN data)
  - [eudaq2](https://github.com/diamondIPP/eudaq-2) (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

``` python
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

``` python
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

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

Let’s plot a signal distribution

``` python
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

![](index_files/figure-commonmark/cell-5-output-2.png)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dmitryhits/HighResAnalysis",
    "name": "HighResAnalysis",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "nbdev jupyter notebook python alignment telescope testbeam",
    "author": "Dmitry Hits",
    "author_email": "dmitry.hits@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f8/7c/42582a9b53fd7b8588a1d3d89b2560833097452deaf20b4c24e4feabbe39/HighResAnalysis-0.0.7.tar.gz",
    "platform": null,
    "description": "HighResAnalysis\n================\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\nThe current repository is in development and is not guaranteed to work\nThe working version can be found\nhttps://github.com/diamondIPP/HighResAnalysis\n\n## Prerequisites\n\n- [python](https://www.python.org)\\>=3.6\n  - python=3.10 was used for the development\n- [cmake](https://cmake.org)\\>=3.7\n  - optionally [cmake GUI](https://cmake.org/runningcmake/), for example\n    ccmake\n\n## Installation\n\n- First, install `mamba`. If you do not yet have `conda` install then\n  getting\n  [Mambaforge](https://github.com/conda-forge/miniforge#mambaforge) is\n  the recommended way to get `mamba`. Here is the instruction for Linux.\n\n``` shell\ncurl -L -O \"https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh\"\nbash Mambaforge-Linux-x86_64.sh \n```\n\nIf this not the case for you. You can follow the instruction on [mamba\ninstall\npage](https://mamba.readthedocs.io/en/latest/installation.html#installation \"complete mamba installation instructions\")\n\n- Next you can install [root](https://root.cern.ch). In the [root\n  installation instructions](https://root.cern/install/#conda) you need\n  to replace `conda` with `mamba` and skip the instructions about the\n  environment, since the `Mambaforge` already created the default `base`\n  environment.\n\n``` shell\nmamba config --set channel_priority strict\nmamba install root\nmamba install -c conda-forge root\n```\n\n- Install the analysis code:\n\n``` shell\npip install HighResAnalysys\n```\n\n- Optionally install other useful python packages:\n\n``` shell\nmamba install -c conda-forge scikit-learn numpy pandas \nmamba install pyarrow openpyxl xlrd pytables requests sqlalchemy\nmamba install -c fastai nbdev\nmamba install jupyterlab\nmamba install jupyternotebook\nmamba install ipython\nmamba install notebook\nmamba install voila\n```\n\n- For the installation of the software hosted on the GitHub it is useful\n  to make a dedicated folder:\n\n``` shell\nmkdir software\ncd software\n```\n\n    - And clone all the necessary packages there:\n\n``` shell\n        git clone git@github.com:diamondIPP/DRS4-v5-shared.git\n        git clone git@github.com:diamondIPP/proteus.git\n        git clone git@github.com:diamondIPP/judith.git\n        git clone git@github.com:diamondIPP/HVClient.git\n        git clone git@github.com:diamondIPP/eudaq-2.git\n```\n\n- generate shh keys and copy them to login.phys.ethz.ch\n\n``` shell\n        ssh-keygen\n        ssh-copy-id username@login.phys.ethz.ch\n```\n\n- Clone the analysis setup from GitHub. It contains all the necessary\n  config files:\n\n``` shell\ngit clone git@github.com:diamondIPP/setup-analysis.git HighResAnalysis\ncd HighResAnalysis/\n```\n\n- To install the converters follow the instructions on the respective\n  pages:\n  - [proteus](https://github.com/diamondIPP/proteus)\n    - It will need\n      [Eigen3](https://eigen.tuxfamily.org/index.php?title=Main_Page)\n      and you will have to tell `cmake` the path to it.\n  - [judith](https://github.com/diamondIPP/judith) (only for CERN data)\n  - [eudaq2](https://github.com/diamondIPP/eudaq-2) (only for DESY data)\n\n## Example analysis of the DESY data\n\nthe data need to be frist pre-converted:\n\n`>analyse --run=4`\n\nyou will need to import a couple of libraries. Most of the tools are in\n`src.dut_analysis`. It will load the data and set all the cuts. The\n`draw` module from plotting library has some useful functions and\npresets that allow plotting histograms and graphs\n\n``` python\nfrom HighResAnalysis.src.dut_analysis import *\nfrom HighResAnalysis.plotting.draw import *\n```\n\n    Welcome to JupyROOT 6.28/00\n\nInitialize the DUTAnalysis with run number, DUT number, and a string\nindicating the year and the month of the beam test\n\n``` python\nrun4 = DUTAnalysis(4, 0, '201912')\n```\n\n    --- Palette ------ 55\n\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n    STARTING DUT ANALYSIS of D02, run 4 (Dec 2019), 2.50M ev |\n    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n    ************** Initing Converter *****************\n    *************** Initing PROTEUS ******************\n\nA small function that allows inline plotting of ROOT histograms\n\n``` python\ndef dc(): get_last_canvas().Draw()\n```\n\nLet\u2019s plot a signal distribution\n\n``` python\nrun4.draw_charge_distribution()\ndc()\n```\n\n    INFO:     10:34:18 --> Creating directory: /Users/hits/Documents/GitHub/HighResAnalysis/HighResAnalysis/results/201912\n    INFO:     10:34:18 --> saving plot: SignalDist\n    WARNING:  10:34:19 --> Diamond server is not mounted in /Users/hits/mounts/high-rate\n\n![](index_files/figure-commonmark/cell-5-output-2.png)\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Analysis of High Resolution Data from CERN and DESY beam tests",
    "version": "0.0.7",
    "project_urls": {
        "Homepage": "https://github.com/dmitryhits/HighResAnalysis"
    },
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python",
        "alignment",
        "telescope",
        "testbeam"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b077d1514af6828a62cd922b6e15a21a683c34feb5b4513421e3f8c735364f8",
                "md5": "ab1dcaa3f6f7fbd3f1679bec79acacc3",
                "sha256": "c4e728ab77bd930249bcc555ade6cd9dfbd7df6272f1b753acb8883430722ab2"
            },
            "downloads": -1,
            "filename": "HighResAnalysis-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ab1dcaa3f6f7fbd3f1679bec79acacc3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 148787,
            "upload_time": "2023-05-24T12:43:45",
            "upload_time_iso_8601": "2023-05-24T12:43:45.499640Z",
            "url": "https://files.pythonhosted.org/packages/5b/07/7d1514af6828a62cd922b6e15a21a683c34feb5b4513421e3f8c735364f8/HighResAnalysis-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f87c42582a9b53fd7b8588a1d3d89b2560833097452deaf20b4c24e4feabbe39",
                "md5": "5911ed84e4946cbb9ebb7b0d05d92042",
                "sha256": "a8d5dcadb85c43f5a0fabbbac22ee1eb0e2731288c478e9b39abb4d20d2c927a"
            },
            "downloads": -1,
            "filename": "HighResAnalysis-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "5911ed84e4946cbb9ebb7b0d05d92042",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 128222,
            "upload_time": "2023-05-24T12:43:47",
            "upload_time_iso_8601": "2023-05-24T12:43:47.082683Z",
            "url": "https://files.pythonhosted.org/packages/f8/7c/42582a9b53fd7b8588a1d3d89b2560833097452deaf20b4c24e4feabbe39/HighResAnalysis-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-24 12:43:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dmitryhits",
    "github_project": "HighResAnalysis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "highresanalysis"
}
        
Elapsed time: 1.70279s