Skip to content
Snippets Groups Projects
Select Git revision
  • a330b22d66fad27935b23ab304189e439d4085a0
  • master default protected
  • 110-having-best_jmuon-returning-only-complete-tracks
  • ruff
  • offline_trk_fields
  • extend-km3buu-w2list
  • 84_read_DST
  • remove-gseagen
  • improve-docs
  • awkward2-support
  • 94-new-km3net-dataformat-release-v2-2-0-2
  • code-cleanup
  • 93-reading-summary-slices-and-extracting-the-rates-of-each-optical-module
  • summary-slice-extractor
  • add-summaryslice-docs
  • isbitset-for-ulonglong
  • 81-with-sliced-tracks-as-input-for-best-tracks-tool-does-seem-to-still-process-all-events
  • 79-suggestions-to-improve-documentation
  • 85-could-best_track-return-array-of-indices-for-whole-run
  • 82-add-aashower-fitinf-to-best-track-method
  • user-newly-defined-root-defs
  • v1.2.4
  • v1.2.3
  • v1.2.2
  • v1.2.0
  • v0.1.2
  • v1.1.0
  • v1.0.2
  • v1.0.1
  • v1.0.0
  • v0.29.2
  • v0.29.1
  • v0.29.0
  • v0.28.0
  • v0.27.3
  • v0.27.2
  • v0.27.1
  • v0.27.0
  • v0.26.1
  • v0.26.0
  • v0.25.2
41 results

plot_offline_usr.py

Blame
  • Tamas Gal's avatar
    Tamas Gal authored
    a330b22d
    History
    plot_offline_usr.py 876 B
    """
    Reading usr data of events
    ==========================
    
    To access the ``usr`` data of events, use the ``.usr`` property which behaves
    like a dictionary and returns ``lazyarray``, compatible to the ``numpy.array``
    interface. The available keys can be accessed either as attributes or via a
    dictionary lookup:
    """
    
    import km3io as ki
    from km3net_testdata import data_path
    
    #####################################################
    # First, pass a filename to the `OfflineReader` class to open the file.
    # Note that only some meta information is read into memory.
    
    r = ki.OfflineReader(data_path("offline/usr-sample.root"))
    
    
    #####################################################
    # Accessing the usr fields:
    
    print(r.events.usr_names.tolist())
    
    
    #####################################################
    # to access data of a specific key:
    
    print(ki.tools.usr(r.events, "DeltaPosZ"))