Closed cschwan closed 2 years ago
Commit 46f3e5f96bed627d5745536fb6074cbdc95b8ec7 adds a method Grid::delete_bins
which does what is needed at a very basic level. We still need:
Python bindings provided in cd7bbaf298326fc5edcdcb2b75868784816dfe5e
It builds, but I had some difficulties to test it. I tried in the interpreter, but it seems not to change the grid...
I'm preparing a test to check this and there seems to be a problem indeed; Grid::delete_bins
seems to have no effect.
Commit fccd89065b1df9693ef20e820d13ded9db5f240f fixes the problem, and commit 191f62ccad633013357e969cfad4406963dfc895 makes sure it stays fixed. However, the current implementation has the limitation that only bins from the left and/or from the right can be removed. Is that a problem for our purposes?
Commit 5e629bff0315c69a0fd7693654cc57dfcdab49d7 fixes yet another bug and commit aeddd4fb907ec0fbb91cc01972e539f8bcf67c41 adds the CLI.
However, the current implementation has the limitation that only bins from the left and/or from the right can be removed. Is that a problem for our purposes?
I'm not sure to have understood what the limitation consists of...
Can you make an example of something I can't do?
Say you have 10 bins you can't delete 3 and 4, for instance, because they are neither at the left (first bin would be 0) nor are they at the right (last bin would be 9). You could, however, delete bin 3 and 4 if you'd also delete 0, 1 and 2 at the same time, or alternatively if you'd delete 5, 6, 7, 8 and 9.
Ok, now I understand, and it might be a limitation in general, but (if I remember correctly) the filters in apfelcomb.db
should be all at the beginning.
In any case, we'll raise a dedicated issue if and only if we find something for which is needed. For the time being it is perfect as it is.
(I was confused by the words left and right, since each bin has a left end and a right end, but now I perfectly understand)
I was bit imprecise, so thanks for asking for a clarification! I agree with your proposal to open a separate Issue when this becomes a problem, and we'll know that as soon as the todo!()
macro panics.
Unfortunately we will hit this case ... since I had already a very preliminary look at the cutting, I realized this already (but thought back then, that in fact you did NOT have this limitation): the case is DYE866P
OK, no problem, I'll take care of it.
Oh damn, you're right.
There are also a couple of CMS grids.
Removing any bins should work since commit 50c12c41036d2a54edd8b4cec0e9db3e9da1a4ec.
We need a method in
Grid
and a subcommand in the CLI to remove specific bins from a PineAPPL grid.@felixhekhorn @AleCandido