Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Eduardo Rodrigues
    @eduardo-rodrigues
    Let's talk at the workshop … Have(ing) a good trip ...
    benkrikler
    @benkrikler
    Can you give the function an option to specify the output type explicitly?
    Henry Schreiner
    @henryiii
    Adding two keyword only arguments, bh=True and bh_storage does it. That way it provides an iterative path to change from numpy. I like that.
    Eduardo Rodrigues
    @eduardo-rodrigues
    Seems good ...
    Hans Dembinski
    @HDembinski
    I invite you all to comment on the name trim
    and/or anything else you think about this
    Jordan Palmer
    @jordan-palmer
    @henryiii, are there plans to include the ability to project within a specific bin range in the near future? eg h[:,a:b:bh.project]
    Martin Ritter
    @daritter
    @henryiii IWo
    (stupid app)
    I would prefer a more explicit name for the keyword argument than just two letters. Yes, it's easy to type but also not very descriptive I'm reading it
    Henry Schreiner
    @henryiii
    @jordan-palmer h[:,a:b:bh.project] is planned, but is dependent on boostorg/histogram#238 at the moment. Once “crop” or whatever it ends up being called is added, it should make this easy to implement.
    Henry Schreiner
    @henryiii
    @daritter It’s actually , bh=True, nine unaboidable characters already. And, since boost_histogram as bh is the recommend way to use the library, I think it’s not too bad. What would you have instead? bh_object would be more descriptive. object=True (and likewise not prefixing the other bh specific arguments, like storage) would risk colliding with a future numpy release; but the risk there is very low.
    (I miss Ruby’s Symbol for something like this)
    Henry Schreiner
    @henryiii
    @jordan-palmer This is the boost-histogram issue: scikit-hep/boost-histogram#135
    Jordan Palmer
    @jordan-palmer
    @henryiii Thank you for the info
    Henry Schreiner
    @henryiii
    boost-histogram has landed in conda-forge, thanks to @chrisburr!
    The hands-on workbook was updated for 0.5.2 today, as well: https://github.com/henryiii/pres-bhandhist - the .axes usage makes things much nicer.
    Outputs are fully rendered, too.
    Hans Dembinski
    @HDembinski
    boost::histogram compiles into 53 lines of vectorized assembly code on clang-9 https://godbolt.org/z/632yzE
    Also boost::histogram got a new Github frontpage, thanks to all who commented on the new logo! :)
    Hans Dembinski
    @HDembinski
    Nice talk from Scott Meyers about CPU caches. Some of it is directly relevant to histograms and why filling a histogram is difficult to parallelize.
    https://www.aristeia.com/TalkNotes/ACCU2011_CPUCaches.pdf
    Hans Dembinski
    @HDembinski
    I am working on extending the mean accumulator in Boost.Histogram to accept more than one sample, so that you can make a profile that compute several means in parallel, like in this example
    https://github.com/boostorg/histogram/blob/develop/examples/guide_custom_accumulators_3.cpp
    Making it so that it will also work in boost-histogram requires some more thought. The problem in boost-histogram is always that the number of means to compute is only known at run-time, not at compile-time. This changes everything in C++.
    Henry Schreiner
    @henryiii
    IMG_3939.jpeg
    Eduardo Rodrigues
    @eduardo-rodrigues
    I hope I gave Hans and you a good support in my reply just a few seconds ago at CHEP 2019 :-).
    Henry Schreiner
    @henryiii
    Boost.Histogram (C++) made it to the summary slides! And then it was the only question of the summaries so far! (Question: who is developing it, answer, Hans Dembensi named twice for the C++, and Henry Schreiner named once for developing Python bindings, too.
    While not very explicilty mentioned, boost-histogram snuck in too:
    IMG_3938.jpeg
    The discussion was about the stability of being in Boost, so very good!
    Hans Dembinski
    @HDembinski
    Wow, awesome! Thank you @henryiii and @eduardo-rodrigues !
    I think many analysts will use Boost.Histogram indirectly through boost-histogram or hist in the end, so any mention of Boost.Histogram (C++) is also great for boost-histogram.
    Henry Schreiner
    @henryiii
    Windows wheels for Python 3.8 (and manylinux1 for 3.8) are now available for boost-histogram 0.5.2!
    Hans Dembinski
    @HDembinski
    Great :)
    Hans Dembinski
    @HDembinski
    I read a document today which tries to establish additional rules for data publication at the LHC
    The ideas discussed in the note are related to efforts of storing the likelihood in a reusable way, see pyhf
    One noteworthy point was that they wanted to have histogram which can store arbitrary metadata with each bin. Such a thing is easy to implement with Boost.Histogram.
    Hans Dembinski
    @HDembinski
    Here is a demo how that would work
    https://godbolt.org/z/6SpYkg
    Eduardo Rodrigues
    @eduardo-rodrigues
    Nice and simple :+1:!
    What's the use case given for per-bin metadata?
    Nicholas Smith
    @nsmith-
    I'm sure there's many but personally I'd like per-bin metadata to label enum bins for plotting later
    @henryiii is this exposed in the python?
    Eduardo Rodrigues
    @eduardo-rodrigues
    I ask as I never really had to add metadata for every single bin in my analysis histos in > 15 years of physics work ;-). Either I'm doing something fundamentally wrong or there can't be that many serious use-cases ...
    Nicholas Smith
    @nsmith-
    ah I guess for me its only each position along an axis, not necessarily each bin in the outer product of axes' bins
    Hans Dembinski
    @HDembinski
    @eduardo-rodrigues I never did that either. You can always have a separate array with the same layout as the histogram and store your metadata there, then address your separate array with the bin index of the original array
    Nevertheless, I thought it is cute that you can do something so fancy with boost::histogram, basically effortless
    @nsmith- No, this functionality is not exposed to Python. And there is no equivalent functionality to add metadata for each bin of each axis individually, except for the general option to add arbitrary metadata to any axis
    you can do this instead:
    a = bh.axis.regular(3, 0, 1, metadata=["foo", "bar", "baz"])
    Hans Dembinski
    @HDembinski
    @eduardo-rodrigues regarding the use case, it was something about Rivet
    It was in a serious draft report on how to preserve the detailed experimental result better, i can send the link tomorrow when i am in the office again
    Eduardo Rodrigues
    @eduardo-rodrigues
    @HDembinski, interesting. I would be curious to read it, as I had not thought about exp-theory validation and data preservation.
    As said, agreed that it's cute that you can implement the requirement so easily. Something to splash out somewhere in your docs ;-)?