You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following up on #178 I would like to improve ResultsHandler.
As a first step, instead of using class ad-hoc named attributes to store sensitivity, discovery potentials and other outputs I would like to wrap all this in a single object.
Then I would like to add the calculation of the 3 sigma discovery potential (or at least make the significance threshold configurable).
Questions:
should the result object have a flat structure (for example fields like sensitivity-value, sensitivity-error, discovery-potential-5sigma-value, etc.) or a nested structure (['sensitivity']['value'], etc.)? While the nested structure is more intuitive, it is also more complicate to implement and may not really make the object more usable;
should we standardize the structure using native python dataclasses or be bold and open the door to the use of pydantic in flarestack (after @robertdstein suggestion)?
I would really love to use a pydantic model. That way, it would also be really easy to export all the results as a json. I think it should not be that complicated to implement.
Re the nested-vs-flat question: I think a nested structure is not that much more useful or intuitive so I think a flat structure is better in terms of complication to usefulness.
Following up on #178 I would like to improve
ResultsHandler
.As a first step, instead of using class ad-hoc named attributes to store sensitivity, discovery potentials and other outputs I would like to wrap all this in a single object.
Then I would like to add the calculation of the 3 sigma discovery potential (or at least make the significance threshold configurable).
Questions:
sensitivity-value
,sensitivity-error
,discovery-potential-5sigma-value
, etc.) or a nested structure (['sensitivity']['value']
, etc.)? While the nested structure is more intuitive, it is also more complicate to implement and may not really make the object more usable;dataclasses
or be bold and open the door to the use ofpydantic
inflarestack
(after @robertdstein suggestion)?I will start by converting
flarestack/flarestack/core/results.py
Lines 104 to 114 in d93f511
The text was updated successfully, but these errors were encountered: