Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JEarth.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5version=1.0
6script=${0##*/}
7
8# ------------------------------------------------------------------------------------------
9#
10# Utility script to run JEarth.
11#
12# ------------------------------------------------------------------------------------------
13
14if [ -z $JPP_DIR ]; then
15 echo "Variable JPP_DIR undefined."
16 exit
17fi
18
19source $JPP_DIR/setenv.sh $JPP_DIR
20
21set_variable DEBUG 2
22set_variable WORKDIR ${TMPDIR:-/tmp}/
23
24if do_usage $*; then
25 usage "$script <energy>"
26fi
27
28case $# in
29 1) set_variable E $1;;
30 *) fatal "Wrong number of arguments."
31esac
32
33if (( 1 )); then
34
35 $JPP_DIR/examples/JPhysics/JEarth \
36 -E $E \
37 -o $WORKDIR/earth.root \
38 -n 100000000
39fi
40
41JPlot2D \
42 -f $WORKDIR/earth.root:hs \
43 -O COLZ \
44 -> "x [m]" \
45 -< "y [m]" \
46 -T "source"
47
48
49ZMAX=`JPrintResult -f ${TMPDIR:-/tmp}/earth.root:ht -F GetMaximum`
50
51ZMIN=$(( $ZMAX * 0.81))
52ZMAX=$(( $ZMAX * 1.01))
53
54JPlot2D \
55 -f $WORKDIR/earth.root:ht \
56 -> "x [m]" \
57 -< "y [m]" \
58 -z "$ZMIN $ZMAX" \
59 -O COLZ \
60 -T "target"
61
62
63JPlot2D \
64 -f $WORKDIR/earth.root:h2 \
65 -z "0.5 1e6" -Z \
66 -> "Tx" \
67 -< "Ty" \
68 -N "X 505" \
69 -N "Y 505" \
70 -O COLZ \
71 -T "target"