Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
KM3BUU
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
simulation
KM3BUU
Commits
8d3fa039
Commit
8d3fa039
authored
1 year ago
by
Johannes Schumann
Browse files
Options
Downloads
Patches
Plain Diff
Add script for doing initialisations
parent
2ac40da0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
km3buu/utils/initials.py
+53
-0
53 additions, 0 deletions
km3buu/utils/initials.py
with
53 additions
and
0 deletions
km3buu/utils/initials.py
0 → 100755
+
53
−
0
View file @
8d3fa039
#!/usr/bin/env python
# coding=utf-8
# Filename: initials.py
# Author: Johannes Schumann <jschumann@km3net.de>
"""
Initialisation script for different KM3BUU parts
Usage:
initials.py (--proposal)
initials.py (-h | --help)
PROPOSAL setup crosssection tables of proposal based on the standard settings used in KM3BUU
Options:
-h --help Show this screen.
"""
import
logging
FORMAT
=
'
%(asctime)s %(levelname)s %(filename)s -- %(message)s
'
logging
.
basicConfig
(
format
=
FORMAT
)
logging
.
getLogger
().
setLevel
(
logging
.
INFO
)
def
main
():
from
docopt
import
docopt
args
=
docopt
(
__doc__
)
if
args
[
'
--proposal
'
]:
from
km3buu.config
import
Config
tablepath
=
Config
().
proposal_itp_tables
logging
.
info
(
f
"
Writing PROPOSAL tables to:
{
tablepath
}
"
)
from
km3buu.propagation
import
_setup_utility
,
PROPOSAL_LEPTON_DEFINITIONS
,
PROPOSAL_TARGET_WATER
import
proposal
as
pp
pp
.
InterpolationSettings
.
tables_path
=
'
.
'
_setup_utility
(
PROPOSAL_LEPTON_DEFINITIONS
[
13
](),
PROPOSAL_TARGET_WATER
)
_setup_utility
(
PROPOSAL_LEPTON_DEFINITIONS
[
15
](),
PROPOSAL_TARGET_WATER
)
_setup_utility
(
PROPOSAL_LEPTON_DEFINITIONS
[
-
13
](),
PROPOSAL_TARGET_WATER
)
_setup_utility
(
PROPOSAL_LEPTON_DEFINITIONS
[
-
15
](),
PROPOSAL_TARGET_WATER
)
_setup_utility
(
PROPOSAL_LEPTON_DEFINITIONS
[
13
](),
PROPOSAL_TARGET_ROCK
)
_setup_utility
(
PROPOSAL_LEPTON_DEFINITIONS
[
15
](),
PROPOSAL_TARGET_ROCK
)
_setup_utility
(
PROPOSAL_LEPTON_DEFINITIONS
[
-
13
](),
PROPOSAL_TARGET_ROCK
)
_setup_utility
(
PROPOSAL_LEPTON_DEFINITIONS
[
-
15
](),
PROPOSAL_TARGET_ROCK
)
if
__name__
==
'
__main__
'
:
main
()
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