DUNE-DAQ / fdreadoutlibs

fdreadoutlibs
0 stars 3 forks source link

Tools to plot Trigger Primitive object #144

Open adam-abed-abud opened 10 months ago

adam-abed-abud commented 10 months ago

At the moment only a simple python application is available to plot TPStream data. This needs to be improved. First, there is a need to have a tool that unpacks TP stream data (currently only a test application in trigger is available). The plotting application should be customizable to provide (if available) a channel map in order to distinguish the U,V,Z planes.

adam-abed-abud commented 10 months ago

Hi Dario, thanks for preparing the branch.

Here are a few comments:

-- the location of the app should be in scripts/ not in apps/. Check how this is done in the develop branch. -- Give the possibility to the user of providing as an input either an hdf5 file to be extracted OR a txt file with the data already parsed -- All the argument should have a "-" instead of "_". Example: --input_file should be --input-file -- What is the benefit of storing the output numpy array? -- Make sure that an error is thrown if matplotlib is not available -- When you parse the output TPs in txt. Are they all time ordered correctly? -- img_groups is not an ideal name for its functionality. -- In the DAQ we do not write names and dates in the code. Github takes care of that. I would remove this:

File name: main.py
Author: Dario Pullia
Date created: 29/09/2023

-- I suggest to use the following tool as a starting point for the plotting: https://github.com/DUNE-DAQ/fdreadoutlibs/blob/develop/scripts/plot_trigprim_output_data.py. The output I obtained using data from the 50l setup does not make much sense. Can you check again and compare it with the above tool?