Skip to content

4.Run everywhere!!

Laura Pérez-Molina edited this page Jun 27, 2023 · 2 revisions

GaeJupyter

It is posible to run from a browser with a CIEMAT tool, you only need a $\verb+afs+$ user.

Type in your browser:

https://gaejupyter.ciemat.es/

And introduce your $\verb+afs+$ credentials. You will access to a launcher from which you can use terminals or jupyter notebooks as usual.

Open a terminal and insert the following commands:

1.- Select the path directory you see on the left sidebar:

cd /home/nfs/user/**yourafsuser**

2.- Create a virtual enviroment where we can install the latest version of python

mkdir venv_python3.7

cd venv_python3.7

/cvmfs/sft.cern.ch/lcg/releases/Python/3.7.3-f4f57/x86_64-centos7-gcc7-opt/bin/python3 -m venv .

source bin/activate

You should activate it each time you log in and want to use the python version installed there with source /home/nfs/user/**yourafsuser/venv_python3.7/bin/activate, whenever you want to deactivate it and run deactivate .

3.-Clone the repository in your folder:

Go to your home directory cd /home/nfs/user/**yourafsuser** and run

git clone https://github.com/CIEMAT-Neutrino/CYTHON_TOOLS.git

This way, we clone the repository to a location where you can move through the files (the CYTHON_TOOLS folder should appear in the sidebar). Activate your virtual enviroment source /home/nfs/user/**yourafsuser**/venv_python3.7/bin/activate and install the needed packages to run the macros (the installation is needed only the first time you are configuring your virtual enviroment).

If is not the first time you are using the macros make sure you are using the last version and run:

git fetch
git reset --hard HEAD
git pull

⚠️ This will RESET ALL YOUR local changes and get the last version of the main branch of the repository.

cd scripts

sh setup.sh

cd ../macros

⚠️ Warning: while sh setup.sh is running it may ask for a sudo password for installing the latex module. We are not sudo here, so we cannot install latex (do not worry about this).

4.- Everything is prepared to run the macros and for that you can follow the structure that follows:

python3 XXmacro.py InputFile

In the input file you should introduce the information of the runs you want to analyse:

   # Do not use spaces " " except between KEYWORD and input variables
   # If input variables are a list, use "," as a separator

    ########################
    ####   DAQ INFO     ####
    ########################
    TYPE: ADC
    MODEL: 5725S
    BITS: 16384
    DYNAMIC_RANGE: 2
    SAMPLING: 4e-9

    ########################
    ####   RUNS INFO    ####
    ########################
    RAW_DATA: DAT
    PATH: ../data
    MONTH: Feb22_2

    OV_LABEL: OV1

    MUONS_RUNS: 29
    LIGHT_RUNS: 9
    ALPHA_RUNS: 25
    CALIB_RUNS: 1,8

    CHAN_LABEL: SiPM0,PMT,SC
    CHAN_TOTAL: 0,4,6
    CHAN_POLAR: -1,-1,1
    CHAN_AMPLI: 250,50,1030

    ########################
    ####  CHARGE INFO   ####
    ########################
    TYPE: ChargeAveRange,ChargeRange
    REF: AveWvf
    I_RANGE: -1
    F_RANGE: 8

(we are working on the visualization in jupyter notebooks)

Clone this wiki locally