-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathanalysis.nim
45 lines (36 loc) · 1.1 KB
/
analysis.nim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import sequtils
import sugar
import strutils, strformat
import rdstdin
import docopt
const doc = """
Timepix Analysis tool
Usage:
analysis [options]
analysis <HDF5file> [options]
Options:
-h --help Show this help
--version Show version
Documentation:
This tool provides a unified interface to the Timepix analysis suite.
It's a CLI tool, allowing either to call individual analysis procedures
manually or loading a JSON file containinig commands to be executed.
Alternatively one may call one of a set of predefined analysis procedures,
which combine different parts, e.g.:
Fe spectrum:
- read data from a run
- write to H5
- perform geometry calculations on clusters
- make rough cut on geometric properties and write Fe spectrum to
H5 file
In the future this tool will also provide access to template Python plotting
scripts to create plots from the data automatically.
"""
proc main() =
let args = docopt(doc)
echo args
while true:
let line = readLineFromStdin("> ")
echo &"Line read: {line}"
when isMainModule:
main()