Coder Social home page Coder Social logo

Comments (13)

cschwan avatar cschwan commented on August 21, 2024 1

I'm preparing a test to check this and there seems to be a problem indeed; Grid::delete_bins seems to have no effect.

from pineappl.

cschwan avatar cschwan commented on August 21, 2024

Commit 46f3e5f adds a method Grid::delete_bins which does what is needed at a very basic level. We still need:

  • Python bindings and
  • a CLI subcommand (possibly after merging #95)
  • testing and unit tests.

from pineappl.

alecandido avatar alecandido commented on August 21, 2024

Python bindings provided in cd7bbaf

It builds, but I had some difficulties to test it. I tried in the interpreter, but it seems not to change the grid...

from pineappl.

cschwan avatar cschwan commented on August 21, 2024

Commit fccd890 fixes the problem, and commit 191f62c 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?

from pineappl.

cschwan avatar cschwan commented on August 21, 2024

Commit 5e629bf fixes yet another bug and commit aeddd4f adds the CLI.

from pineappl.

alecandido avatar alecandido commented on August 21, 2024

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?

from pineappl.

cschwan avatar cschwan commented on August 21, 2024

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.

from pineappl.

alecandido avatar alecandido commented on August 21, 2024

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)

from pineappl.

cschwan avatar cschwan commented on August 21, 2024

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.

from pineappl.

felixhekhorn avatar felixhekhorn commented on August 21, 2024

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

from pineappl.

cschwan avatar cschwan commented on August 21, 2024

OK, no problem, I'll take care of it.

from pineappl.

alecandido avatar alecandido commented on August 21, 2024

Oh damn, you're right.

There are also a couple of CMS grids.

from pineappl.

cschwan avatar cschwan commented on August 21, 2024

Removing any bins should work since commit 50c12c4.

from pineappl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.