-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblack-hole-generator
executable file
·43 lines (37 loc) · 1.27 KB
/
black-hole-generator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
#
# (c) 2018-2025 m4r35n357@gmail.com (Ian Smith), for licencing see the LICENCE file
. ./base.sh
choice=$(yad --columns=2 --title="Black Hole Parameter Generators" --form --separator=" " --align=right \
--field="Geodesic Type":CB \
-- '^Timelike!Lightlike')
case $? in
1) exit;;
esac
set $choice
type=$1
plot () {
/usr/bin/gnuplot << EOF
set key left
set terminal qt size 600,450
set yrange [*:$5]
set xlabel "$3"
set ylabel "$4 potential"
plot 0.0 title 'zero ref.', '$user_data' using $1:$2 title "$4" with lines
pause mouse close
EOF
}
case $type in
Timelike) ./h-kerr-gen-particle \
$(yad --columns=2 --title="Generate Parameters (particle)" --form --separator=" " --align=right \
--field="Solver Tolerance" --field="Rmin" --field="Rmax (-1 for circular)" \
--field="Elevation (degrees)" --field="BH spin (-ve for retrograde)":NUM \
-- "1.0e-9" "4.0" "12.0" \
"63.0" '0.8!-1.0..1.0!0.1!1') >$user_data
plot 1 2 'r' 'R' 10 &
plot 3 4 'theta' 'THETA' 1 & ;;
Lightlike) ./h-kerr-gen-light \
$(yad --columns=2 --title="Generate Parameters (light)" --form --separator=" " --align=right \
--field="r":NUM --field="BH spin":NUM \
-- '3.0!1.0..4.0!0.1!1' '0.8!-1.0..1.0!0.1!1') ;;
esac