Skip to content
Snippets Groups Projects
Commit 5db7e4b0 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Expand env-vars and set default for file descriptors

parent c33fd621
No related branches found
No related tags found
No related merge requests found
Pipeline #8861 passed
......@@ -6,11 +6,11 @@
Plot PDF of Cherenkov light from muon using Jpp interpolation tables.
Usage:
cherenkov_muon.py [options] -f FILE_DESCRIPTOR
cherenkov_muon.py [options]
cherenkov_muon.py (-h | --help)
Options:
-f FILE_DESCRIPTOR Descriptor of the PDFs (e.g. $JPP_DIR/data/J%p.dat).
-f FILE_DESCRIPTOR Descriptor of the PDFs [default: $JPP_DIR/data/J%p.dat].
--energy=<GeV> Muon energy [default: 1e3].
--distance=<m> Distance of approach [default: 50].
--tts=<ns> PMT time smearing [default: 0.0].
......@@ -27,6 +27,7 @@ from docopt import docopt
docopt(__doc__)
import functools
import os
import matplotlib
matplotlib.use("Agg")
......@@ -46,7 +47,8 @@ def main():
"west": (np.pi / 2, np.pi)
}
muon_pdf = jppy.pdf.JMuonPDF(args['-f'], TTS=float(args['--tts']))
muon_pdf = jppy.pdf.JMuonPDF(os.path.expandvars(args['-f']),
TTS=float(args['--tts']))
xs = np.linspace(float(args['--xmin']), float(args['--xmax']),
int(args['--n-points']))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment