Generate kfactors for polarized observables#132
Conversation
|
This PR is mostly to keep track of @toonhasenack work, we might no merge this in the end. |
| import argparse | ||
|
|
||
|
|
||
| def get_gpaths(folder): |
There was a problem hiding this comment.
@toonhasenack when using type hints you can actually drop the repeated argument type in the doc string - see e.g. the second example here
| strf_data += f"{data[i]} 0.0\n" | ||
|
|
||
| date = dt.now().date() | ||
| string = ( |
There was a problem hiding this comment.
Make this a module constant
| + strf_data | ||
| ) | ||
|
|
||
| os.makedirs(output_name, exist_ok=True) |
Maybe this is not a priority, but I think we do want to merge because this strategy will persists also in the mid-term |
|
See latest push for adjustments |
Are you sure that this should belong to Pineko? It is quite DIS specific... (even more, just specific to some observable) |
I think it is fine to have it here, pineko has the k-factor option - of course the other option is to push it back to yadism |
|
@toonhasenack please remember the comments from above and also try to unify the scripts as much as you can, they are all similar to each other PS: as always: please also fix pre-commit |
Pineko is applying k-factors, but not computing them. We always kept Pineko process agnostic, and I believe that's a good thing (since all the complexity of the processes is delegated to the respective generators, and we avoid coupling to a specific one - in particular DIS, as in APFEL). |
okay, I agree - so @toonhasenack
|
Yes indeed that would be the proper fix. I can take care of it, here. |
What do you mean with all keys? |
all metadata present in original grid like |
this is done in #161 - so please just close @toonhasenack when you have moved the scripts |
|
@toonhasenack please don't push here. Close this one an reopen in yadism. |
| for i, bin in enumerate(bins): | ||
| prediction[i] = ( | ||
| bin["y"]["mid"] | ||
| * (2 - bin["y"]["mid"]) | ||
| / (bin["y"]["mid"] ** 2 + 2 * (1 - bin["y"]["mid"])) | ||
| ) |
There was a problem hiding this comment.
@toonhasenack Here we are missing the
|
moved to NNPDF/yadism#270 |
Initial pull request for generating the K-factors of the F1 structure functions for polarized DIS data.