Closed alecandido closed 2 years ago
Merging #90 (9576553) into master (32e63c9) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #90 +/- ##
=======================================
Coverage 85.64% 85.64%
=======================================
Files 14 14
Lines 2076 2076
=======================================
Hits 1778 1778
Misses 298 298
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 32e63c9...9576553. Read the comment docs.
The situation with BinRemapper
is unfortunately complicated, as I didn't forsee something like it would be needed when I designed the Grid
struct. I think what you want to do is to use BinInfo
, for which you can get an instance using Grid::bin_info
. With a BinInfo
object you can get all limits using BinInfo::left
and BinInfo::right
, and also the normalizations using BinInfo::normalizations
, irrespectively of whether there's a remapper or not. This you can use to a set a remapper.
I took the chance to add grid.scale
to python API.
It's doing nothing else, then I would merge.
All right, go ahead!
Hi @cschwan, as you know from #89 we are dealing with normalizations, and I proposed to skip
pineappl remap
and write instead something in python.The idea is:
Nevertheless, point 2 is not that easy, so I tried to figure a way out of it, as easy as possible.
I had a look inside
pineappl remap
, and I found that you useBinRemapper
to apply normalization: https://github.com/N3PDF/pineappl/blob/32e63c92cd9ea8358d6e193e068a9ee33d917979/pineappl_cli/src/remap.rs#L155-L161 and this is the only place where the CLI argumentnorm
appears.So my idea for point 2 would be:
grid.more_members.upgrade()
should guarantee is available)BinRemapper
Unfortunately, I noticed the
remapper
inside themore_members
is an option, so it might not be available, then: what should I do in the case?Moreover, I would need to implement a getter for
bin_remapper
in python, and before even inpineappl
crate. Then I was wondering:normalize
/renormalize
a method ofGrid
directly insidepineappl
?P.S.: I needed a commit to open the PR, but I had nothing to commit, so the moment we start I'll just squash it and remove the empty
help
file