Code Monkey home page Code Monkey logo

Comments (5)

darrylmasson avatar darrylmasson commented on May 24, 2024

What kind of examples are we looking for? hax usage in general or how to do specific things?

from hax.

JelleAalbers avatar JelleAalbers commented on May 24, 2024

Both would be very useful :-) But most questions I get are about selecting runs (tags selection, using hax.runs.datasets with pandas queries), inspecting waveforms and using the trigger / acquisition monitor data.

from hax.

darrylmasson avatar darrylmasson commented on May 24, 2024

I threw this note together quickly for runs database interfacing, which hopefully deals with the first item on the list. I also have a note or two somewhere with slightly expanded cuts examples that more or less combines Jelle's example on hax.cuts with the preselection cuts, and one on the basic analysis procedure of setting up a notebook, loading data, making plots, and that sort of thing. I originally wrote most of them to give our legion of undergrads something to start from, but they seem like the kind of thing it may be worth brushing up a bit and adding to the hax examples.

from hax.

JelleAalbers avatar JelleAalbers commented on May 24, 2024

Nice! This will be very useful for new analysts and people supervising new analysts (whether these come in legions or not). I've never used regex pattern matching for tags, good to see it actually works ;-) If you make a pull request I will merge it into master. Your other notebooks are also very welcome, right now we only have a few outdated general examples and some examples showing off specific functionality.

If you're looking for a thing or two to add to this example:

  • You can chain tags selection to require the presence of more than one tag, e.g. :
tsel = hax.runs.tags_selection
tsel(tsel(include='sciencerun*'), include='unblinded')
  • If you want to view all tags combinations you have in dsets, you can do np.unique(dsets.tags)
  • A few words on the pax version policy option might be useful, or just a link to #30 to make new people aware such a thing exists (although they won't use it in the first month probably). If you use things like location != "" this can control whether or not a dataset appears in your selection.

More seasoned analysts might also like to know:

  • The rather arcanely named field reader__ini__name in hax.runs.datasets is actually the run mode name, which can be useful for selection as well (e.g. if you want to select all 1ms noise runs).
  • Probably overkill for beginners, but hax.runs.get_run_info can also be very useful (e.g. hax.runs.get_run_info([6000, 6001], 'processor.DEFAULT.electron_lifetime_liquid'))

from hax.

JelleAalbers avatar JelleAalbers commented on May 24, 2024

Fixed in #224

from hax.

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.