legend-exp / legend-data-monitor

LEGEND data monitoring
https://legend-data-monitor.readthedocs.io
MIT License
0 stars 5 forks source link

added saving of dataframes for par1 vs par2 case #108

Closed sofia-calgaro closed 1 year ago

sofia-calgaro commented 1 year ago

Now, you can specifiy "saving": "overwrite" in your config json file and the code does not crash anymore.

Since the building of the output shelve object reads the dataframe/plot_info objects containing both par1 and par2 data/info, it was necessary to loop over individual parameters and separate the dataframe/plot_info objects.

Then, output shelve object now looks like (as if we inspected the two parameters separately - this helps us, in a second stage, to play more easily with the stored output dataframes):

<shelve-object>
└── "monitoring"
    └── "<evt_type>" // can be: pulser, phy, all, FC_bsln, muon, ...
      └── "<par1>"
      ├ ├── df_<subsystem> // eg. "df_geds" = dataframe with data for all ged channels
      ├ └── plot_info // dictionary with plotting info for the given parameter (eg. title, units, labels, ...)
      └── "<par2>"
        ├── df_<subsystem> 
        └── plot_info 
sofia-calgaro commented 1 year ago

Tested & working cases (ie we build the output shelve object in the correct way, with the correct columns, for par1 and par2 separately):