From 6d584cc921a156fcf09d46e4ab684635074c2770 Mon Sep 17 00:00:00 2001
From: rodri <rgracia@km3net.de>
Date: Fri, 14 May 2021 12:35:44 +0200
Subject: [PATCH] example to create and write jobcard

---
 notebooks/create_jobcard.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 notebooks/create_jobcard.py

diff --git a/notebooks/create_jobcard.py b/notebooks/create_jobcard.py
new file mode 100644
index 0000000..e144571
--- /dev/null
+++ b/notebooks/create_jobcard.py
@@ -0,0 +1,16 @@
+#!/usr/bin/python3
+
+from km3buu.jobcard import generate_neutrino_jobcard
+from km3buu.jobcard import write_jobcard
+from km3buu.jobcard import XSECTIONMODE_LOOKUP, PROCESS_LOOKUP, FLAVOR_LOOKUP
+
+events = 1000
+energy_min = 0.1
+energy_max = 50
+interaction = "cc"
+flavor = "electron"
+target_z = 8
+target_a = 16
+fluxfile = None
+jc = generate_neutrino_jobcard(events, interaction, flavor, (energy_min,energy_max), (target_z,target_a),fluxfile=fluxfile)
+write_jobcard(jc,"./job.job")
-- 
GitLab