HEP-PBSP / SIMUnet

The public code for SIMUnet, a NNPDF based tool to perform simultaneous determination of PDFs and EFT Wilson coefficients.
https://hep-pbsp.github.io/SIMUnet/
GNU General Public License v3.0
2 stars 2 forks source link

Make fixed observables dataset_inputs #16

Closed LucaMantani closed 12 months ago

LucaMantani commented 1 year ago

Adapt the code for the fixed observables so that they are not special datasets, but they are to be listed among the other datasets with a further flag "PDF-independent=True" or similar. This way, the treatment of the datasets in validphys becomes more straightforward.

Zaharid commented 1 year ago

FWIW I started implementing in this way, and still feel it may have been a better idea. But at the time I decided against it because one ends up having to specialize the low level predictions and potentially adapt many actions depending on whether variable pdfs are supported or not. Notably the basic results action takes a pdf as an input. So I thought it was better to be explicit about it. It is true that a lot of the actions would be trivial rather than break or be wrong, especially if most of them think that the predictions are similar, no mater the origin.

I think the way to do this would be through some low level structure rather than a flag. The structure would be a "trivial fktable" and would use different code for computing results than the one in convolutions.py. Note that these things are similar to fktables in that they logically belong to theories, and also could be potentially aggregated together. This way only the actions that care about the difference would notice it, and it would look like a regular dataset to the rest of them. I think the dispatching mechanism that decides how predictions are made should be one step up from convolutions.py, since that module is all about pdfs.

It is likely that the least amount of breakage would be achieved my making results an "explicit_node" (i.e. an provider that dispatches to different actions with different dependendencies; in this case, with or without pdfs). It may help to have a lower level predictions actions (with results becoming just a tuple of data and theory with little to no logic). Unfortunately it is a bit of a rabbit hole no matter what.

All in all, the change would be quite fiddly and time consuming (I would estimate a few weeks), and one needs to assess carefully whether it is merited.

J-M-Moore commented 1 year ago

This is more of a note to self about how this could be done... we can keep the existing Fixed Observable code, but change the runcard structure so that fixed observables are not initially declared as something different, but as a dataset_input. At the start of performfit.py, we intercept replicas_info and convert those dataset_inputs with are fixed observables and convert them properly to Fixed Observables in the code sense.

J-M-Moore commented 1 year ago

Now being implemented as part of https://github.com/LucaMantani/simunet_release/pull/18

J-M-Moore commented 1 year ago

This is more of a note to self about how this could be done... we can keep the existing Fixed Observable code, but change the runcard structure so that fixed observables are not initially declared as something different, but as a dataset_input. At the start of performfit.py, we intercept replicas_info and convert those dataset_inputs with are fixed observables and convert them properly to Fixed Observables in the code sense.

This turned out not to be the best way - instead I have added a new Observable Layer type called Fixed, alongside the standard DIS and DY observable layers