Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jppy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
jppy
Commits
55b25602
Commit
55b25602
authored
5 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Update readme
parent
f46187d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.rst
+45
-20
45 additions, 20 deletions
README.rst
with
45 additions
and
20 deletions
README.rst
+
45
−
20
View file @
55b25602
...
...
@@ -10,7 +10,7 @@ The jppy Python package
.. image:: https://examples.pages.km3net.de/km3badges/docs-latest-brightgreen.svg
:target: https://km3py.pages.km3net.de/jppy
This software provides Python access to functionalities in Jpp, like accesing
This software provides Python access to functionalities in Jpp, like acces
s
ing
PDF functions.
It currently depends on a few Jpp headers (no Jpp compilation needed) and on
...
...
@@ -35,21 +35,39 @@ or from a local clone::
Example - Using PDFs
====================
Here is an example how to play around with muon PDFs using the ``jppy`` module::
Here is an example how to play around with muon PDFs using the ``jppy`` module
in Lyon. Notice that ``jppy`` is already installed in the ``jpp/master``
module::
░ tgal@cca010:~
░ 13:22:51 > module load jpp/master
░ tgal@cca010:~
░ 13:22:54 > module list
Currently Loaded Modulefiles:
1) xrootd/4.8.1 5) tools/tig/2.4.1
2) km3net_env/1.1 6) tools/the_silver_searcher/2.2.0
3) python/3.7.5 7) root/6.18.04
4) tools/neovim/0.5.0 8) jpp/master
░ tgal@cca010:~
░ 13:22:56 > ipython
Python 3.7.5 (default, Nov 1 2019, 21:18:20)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.9.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import jppy
In [2]: jppy.pdf.JMuonPDF?
In [2]: jppy.version
Out[2]: '3.0.0a6'
In [3]: jppy.pdf.JMuonPDF?
Docstring: <no docstring>
Init docstring: __init__(self: jppy.pdf.JMuonPDF, file_descriptor: str, TTS: float, number_of_points: int = 25, epsilon: float = 1e-10) -> None
File:
~/dev/pybind
/jppy
.
pdf.cpython-37m-x86_64-linux-gnu.so
File:
/pbs/throng/km3net/software/python/3.7.5/lib/python3.7/site-packages
/jppy
/
pdf.cpython-37m-x86_64-linux-gnu.so
Type: pybind11_type
Subclasses:
In [3]:
Do you really want to exit ([y]/n)? n
In [3]: muon_pdf = jppy.pdf.JMuonPDF("/pbs/throng/km3net/src/Jpp/master/data/J%p.dat", 0)
In [4]: muon_pdf = jppy.pdf.JMuonPDF("/pbs/throng/km3net/src/Jpp/master/data/J%p
...: .dat", 0)
loading input from file /pbs/throng/km3net/src/Jpp/master/data/J1p.dat... OK
loading input from file /pbs/throng/km3net/src/Jpp/master/data/J2p.dat... OK
loading input from file /pbs/throng/km3net/src/Jpp/master/data/J3p.dat... OK
...
...
@@ -58,23 +76,30 @@ Here is an example how to play around with muon PDFs using the ``jppy`` module::
loading input from file /pbs/throng/km3net/src/Jpp/master/data/J6p.dat... OK
adding PDFs... OK
In [
4
]: muon_pdf.calculate?
In [
5
]: muon_pdf.calculate?
Docstring: calculate(self: jppy.pdf.JMuonPDF, E: float, R: float, theta: float, phi: float, t1: float) -> JTOOLS::JResultPDF<double>
Type: method
In [5]: result = muon_pdf.calculate(10, 5, 0, 0, 23)
In [6]: result = muon_pdf.calculate(10, 5, 0, 0, 23)
In [7]: result?
Type: JResultPDF
String form: <jppy.pdf.JResultPDF object at 0x7f735b5ca770>
File: /pbs/throng/km3net/software/python/3.7.5/lib/python3.7/site-packages/jppy/pdf.cpython-37m-x86_64-linux-gnu.so
Docstring: <no docstring>
Init docstring: __init__(self: jppy.pdf.JResultPDF, f: float, fp: float, v: float, V: float) -> None
In [
6
]: result.f
Out[
6
]: 0.0015357848280127355
In [
8
]: result.f
Out[
8
]: 0.0015357848280127355
In [
7
]: result.fp
Out[
7
]: -2.228096911939611e-05
In [
9
]: result.fp
Out[
9
]: -2.228096911939611e-05
In [
8
]: result.v
Out[
8
]: 0.02490276362751662
In [
10
]: result.v
Out[
10
]: 0.02490276362751662
In [
9
]: result.V
Out[
9
]: 0.1164929687159807
In [
11
]: result.V
Out[
11
]: 0.1164929687159807
In [1
0
]: %timeit muon_pdf.calculate(10, 5, 0, 0, 23)
2.
13
µs ± 2
42
ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
In [1
2
]: %timeit muon_pdf.calculate(10, 5, 0, 0, 23)
2.
47
µs ± 2
93
ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
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