Jpp 21.0.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JLight.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 plot optical properties of sea water.
11#
12# ------------------------------------------------------------------------------------------
13
14
15if [ -z $JPP_DIR ]; then
16 echo "Variable JPP_DIR undefined."
17 exit
18fi
19
20
21source $JPP_DIR/setenv.sh $JPP_DIR
22
23set_variable DEBUG 2
24set_variable WORKDIR ${TMPDIR:-/tmp}/
25set_variable DIR $JPP_DIR/examples/JSirene
26set_variable: FORMAT GRAPHICS_FORMAT gif
27set_variable+ BATCH GRAPHICS_BATCH -B
28
29if do_usage $*; then
30 usage "$script [working directory]"
31fi
32
33case $# in
34 1) set_variable WORKDIR $1;;
35esac
36
37
38OUTPUT_FILE=$WORKDIR/light.root
39
40$DIR/JLight \
41 -o $OUTPUT_FILE
42
43
44JPlot1D \
45 -f ${OUTPUT_FILE}:"pure" \
46 -f ${OUTPUT_FILE}:"smith&baker" \
47 -y "1.0 300" \
48 -Y \
49 -> "#lambda [nm]" \
50 -\^ "#lambda_{abs} [m]" \
51 -T "" \
52 -o water.$FORMAT $BATCH
53
54JPlot1D \
55 -f ${OUTPUT_FILE}:abs \
56 -y "0 100" \
57 -> "#lambda [nm]" \
58 -\^ "#lambda_{abs} [m]" \
59 -L TR \
60 -o abs.$FORMAT $BATCH
61
62
63JPlot1D \
64 -f ${OUTPUT_FILE}:scat \
65 -y "0 150" \
66 -> "#lambda [nm]" \
67 -\^ "#lambda_{scat} [m]" \
68 -L TR \
69 -o scat.$FORMAT $BATCH
70
71
72JPlot1D \
73 -f ${OUTPUT_FILE}:vp \
74 -y "1.0 1.6" \
75 -> "#lambda [nm]" \
76 -\^ "n" \
77 -L TR \
78 -o vp.$FORMAT $BATCH
79
80
81JPlot1D \
82 -f ${OUTPUT_FILE}:vg \
83 -y "1.0 1.6" \
84 -> "#lambda [nm]" \
85 -\^ "c/v_{group}" \
86 -L TR \
87 -o vg.$FORMAT $BATCH
88
89
90JPlot1D \
91 -f ${OUTPUT_FILE}:Ps \
92 -y "1e-2 20" -Y \
93 -> "cos(#theta)" \
94 -\^ "d^{2}P/dcos(#theta)d#phi" \
95 -L TR \
96 -o Ps.$FORMAT $BATCH