IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue 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
Pranav Sampathkumar
corsika
Commits
fea943db
Commit
fea943db
authored
4 years ago
by
Maximilian Reininghaus
Browse files
Options
Downloads
Patches
Plain Diff
create muon/hadron track files for plot_tracks.sh
parent
e769036e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tools/plot_tracks.sh
+24
-12
24 additions, 12 deletions
Tools/plot_tracks.sh
with
24 additions
and
12 deletions
Tools/plot_tracks.sh
+
24
−
12
View file @
fea943db
...
@@ -10,22 +10,32 @@
...
@@ -10,22 +10,32 @@
# with this script you can plot an animation of output of TrackWriter
# with this script you can plot an animation of output of TrackWriter
track_dat
=
$1
tracks_dat
=
"
$1
"
muon_dat
=
$2
if
[
-z
"
$tracks_dat
"
]
;
then
echo
"usage:
$0
<tracks.dat> [output.gif]"
>
&2
if
[
-z
"
$track_dat
"
]
||
[
-z
"
$muon_dat
"
]
;
then
echo
"usage:
$0
<hadron.dat> <muon.dat> [output.gif]"
>
&2
exit
1
exit
1
fi
fi
output
=
$3
directory
=
$(
dirname
"
$tracks_dat
"
)
hadrons_dat
=
"
$directory
/hadrons.dat"
muons_dat
=
"
$directory
/muons.dat"
if
[
"
$muons_dat
"
-ot
"
$tracks_dat
"
-o
"
$hadrons_dat
"
-ot
"
$muons_dat
"
]
;
then
echo
"splitting
$tracks_dat
into
$muons_dat
and
$hadrons_dat
."
cat
"
$tracks_dat
"
| egrep
'^\s+-*13\s'
>
"
$muons_dat
"
cat
"
$tracks_dat
"
| egrep
-v
'^\s+-*13\s'
>
"
$hadrons_dat
"
fi
output
=
"
$2
"
if
[
-z
"
$output
"
]
;
then
if
[
-z
"
$output
"
]
;
then
output
=
"
$track_dat
.gif"
output
=
"
$track
s
_dat
.gif"
fi
fi
echo
"creating
$output
..."
cat
<<
EOF
| gnuplot
cat
<<
EOF
| gnuplot
set term
png
size 900,900
set term
gif animate
size 900,900
#
set output "
$output
"
set output "
$output
"
#set zrange [0:40e3]
#set zrange [0:40e3]
#set xrange [-10:10]
#set xrange [-10:10]
...
@@ -36,9 +46,11 @@ set zlabel "z / m"
...
@@ -36,9 +46,11 @@ set zlabel "z / m"
set title "CORSIKA 8 preliminary"
set title "CORSIKA 8 preliminary"
do for [t=0:359:1] {
do for [t=0:359:1] {
set output sprintf("%03d_
$output
", t)
# for separate file per angle:
set view 90, t
# set output sprintf("%03d_
$output
", t)
splot "
$muon_dat
" u 3:4:5:6:7:8 w vectors nohead lt rgb "red" t "", "
$track_dat
" u 3:4:5:6:7:8 w vectors nohead lc rgb "black" t ""
set view 80, t
splot "
$muons_dat
" u 3:4:5:6:7:8 w vectors nohead lt rgb "red" t "", "
$hadrons_dat
" u 3:4:5:6:7:8 w vectors nohead lc rgb "black" t ""
}
}
EOF
EOF
...
...
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