legend-exp / legend-data-monitor

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

fixed append for special parameters + channel mean #112

Closed sofia-calgaro closed 1 year ago

sofia-calgaro commented 1 year ago

Previously, I hadn't tested the "saving": "append" case for special parameters too. The point is that we need to load also columns for the parameters we used to get the special one (eg baseline and wf_max for wf_max_rel). Of course this applies if the special parameter is based on not null parameters (see settings/special-parameters.json for more info).

sofia-calgaro commented 1 year ago

before merging, still need to

sofia-calgaro commented 1 year ago

Checks for correctness of append option done for:

sofia-calgaro commented 1 year ago

The evaluation of the mean column is fixed when using the append option. Before, multiple values were present for a fixed detector because doing old_df[param_mean] = new_df[param_mean] I was not considering that the two dataframes actually have different lengths. Now we map the new mean values saved in new_df into old_df, making the mapping through the channel ID, and then we merge horizontally the two dataframes.