Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
km3io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
km3py
km3io
Commits
0bb9553e
Commit
0bb9553e
authored
5 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Update
parent
aaf25213
No related branches found
No related tags found
1 merge request
!14
Add premiere talk
Pipeline
#8507
passed
5 years ago
Stage: test
Stage: coverage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
talks/premiere.org
+27
-16
27 additions, 16 deletions
talks/premiere.org
with
27 additions
and
16 deletions
talks/premiere.org
+
27
−
16
View file @
0bb9553e
...
...
@@ -51,21 +51,31 @@ pip install -e ~/Dev/km3io
- *Goal*: provide a **standalone**, **independent** access to KM3NeT data
- Uses the [[https://github.com/scikit-hep/uproot][uproot]] library to access ROOT data
- Provides convenient wrapper classes
- Maximum performance due to
numpy and numba
- Maximum performance due to
[[https://www.numpy.org][numpy]] and [[http://numba.pydata.org][numba]]
- Data are read lazily:
- only loaded into memory when directly accessed
- apply several cut masks on huge datasets without reading them into the memory
** uproot
- Describe the projec
- describe Scikit-HEP
- thanks to Jim
- etc.
** Installation
- Dependencies:
- Python 3.5+
- uproot (a small Python package, installed automatically via ~pip~)
- no binaries!
- *No ROOT, Jpp or aanet* required to read ROOT files
- Releases are published on the official Python package repository:
- ~pip install km3io~
** Why is it so cool?
- Runs on Linux, macOS, Windows, as long as Python 3.5+ is installed
- Every data is a ~numpy~ array or ~awkward~ array (~numpy~ compatible array of complex data structures)
** awkward arrays?
- some details on it
- maybe the link to the talk which Jim gave on a HEP conference about awkward arrays
* Accessing Online (DAQ) Data
** km3io supports the following DAQ datatypes
...
...
@@ -85,7 +95,8 @@ pip install -e ~/Dev/km3io
*** Opening a run file
#+BEGIN_SRC python :results output replace :session km3io :exports both
import km3io
f = km3io.DAQReader("KM3NeT_00000044_00006880.root") # Random run from iRODS
# A run from iRODS
f = km3io.DAQReader("KM3NeT_00000044_00006880.root")
print(f.events)
print(f.summaryslices)
print(f.timeslices)
...
...
@@ -94,7 +105,7 @@ print(f.timeslices)
#+RESULTS:
: Number of events: 115038
: Number of summaryslices: 182668
: Available timeslice streams:
SN, L1
: Available timeslice streams:
L1, SN
*** Investigating timeslice frames
...
...
@@ -121,6 +132,8 @@ print(a_timeslice.frames[806451572].pmt[:42])
*** Checking the number of UDP packets in summary slices
- functions to parse binary masks and bit positions from the KM3NeT format definitions
#+BEGIN_SRC python :results output replace :session km3io :exports both
f = km3io.DAQReader("KM3NeT_00000044_00006880.root")
sumslice = f.summaryslices.slices[23]
...
...
@@ -144,14 +157,15 @@ print(km3io.daq.get_number_udp_packets(sumslice.dq_status))
* Offline (MC/reco) Data
** Reading offline files (aka aanet-ROOT files)
#+ATTR_REVEAL: :frag (appear)
- Events
- header information
- hits
- tracks (from reconstruction)
- MC tracks
- MC information
- MC tracks
- MC hits
- Reco information
- tracks
- reconstruction info and parameters
** Opening a reconstructed MUPAGE file
#+BEGIN_SRC python :results output replace :session km3io :exports both
...
...
@@ -160,7 +174,7 @@ print(f)
#+END_SRC
#+RESULTS:
: <km3io.offline.OfflineReader object at 0x
7f8eeb436e2
0>
: <km3io.offline.OfflineReader object at 0x
1155bde5
0>
** Investigating events and tracks
#+BEGIN_SRC python :results output replace :session km3io :exports both
...
...
@@ -210,7 +224,7 @@ offline hit:
pattern_flags : 0
#+end_example
*** Tracks
*** Tracks
:noexportpresentation:
#+BEGIN_SRC python :results output replace :session km3io :exports both
print(f[0].tracks[0])
...
...
@@ -262,18 +276,15 @@ offline track:
** Extracting the energy of every first reco track in each event
#+BEGIN_SRC python :results output replace :session km3io :exports both
# from irods:mc/v5.2/mcv5.2.mupage_10T.sirene.jte.1186.root
f = km3io.OfflineReader("mupage.root")
print(f.mc_tracks)
print(f.mc_tracks.id.counts)
mask = f.mc_tracks.id.counts > 0
print(f.events)
# number of tracks per event
print(f.mc_tracks.E.counts)
mask = f.mc_tracks.E.counts > 0
print(f.mc_tracks.E[mask, 0])
#+END_SRC
#+RESULTS:
: Number of tracks: 12236
: [11 2 3 ... 10 1 4]
: [17.72 73.213 10884.78 1694.332 1221.061 22945.123 11019.418 ...]
* ORCA DU4 RBR Analysis Example
** A tiny function to extract track attributes from a list of files
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment