-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·157 lines (124 loc) · 5.8 KB
/
test.sh
File metadata and controls
executable file
·157 lines (124 loc) · 5.8 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#!/usr/bin/env bash
# Exospective test suite
# Primary target: Gliese 570 Secondary: Epsilon Indi (two-point journey)
# SIMBAD lookups are always enabled; results are cached after the first run.
SCRIPT="python exospective.py"
# ── Coordinates ───────────────────────────────────────────────────────────────
G570_RA=224.3667
G570_DEC=-21.4155
G570_DIST=5.89
G570_NAME="Gliese 570"
EIND_RA=330.8402
EIND_DEC=-56.7860
EIND_DIST=3.64
EIND_NAME="Epsilon Indi"
# ── Helpers ───────────────────────────────────────────────────────────────────
PASS=0
FAIL=0
header() {
echo
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
printf " %s\n" "$1"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
}
run() {
# run <label> <command...>
local label="$1"; shift
echo
echo "▶ $label"
if "$@"; then
echo " [ok]"
PASS=$((PASS + 1))
else
echo " [FAILED]"
FAIL=$((FAIL + 1))
fi
}
# ── Charts ────────────────────────────────────────────────────────────────────
header "CHARTS | Gliese 570 → examples/"
run "allsky + polar projections" \
$SCRIPT \
--ra $G570_RA --dec $G570_DEC --distance $G570_DIST \
--name "$G570_NAME" \
--output-dir examples
# ── Tables ────────────────────────────────────────────────────────────────────
header "TABLES | Observer at Gliese 570"
run "20 brightest (pretty, ly)" \
$SCRIPT \
--ra $G570_RA --dec $G570_DEC --distance $G570_DIST \
--table 20
run "20 nearest (distance sort, parsecs)" \
$SCRIPT \
--ra $G570_RA --dec $G570_DEC --distance $G570_DIST \
--table 20 --sort-by distance --parsecs
run "10 brightest (CSV format)" \
$SCRIPT \
--ra $G570_RA --dec $G570_DEC --distance $G570_DIST \
--table 10 --format csv
run "10 brightest (HTML format)" \
$SCRIPT \
--ra $G570_RA --dec $G570_DEC --distance $G570_DIST \
--table 10 --format html
# ── Journeys: Sol → Gliese 570 ────────────────────────────────────────────────
header "JOURNEY | Sol → Gliese 570"
run "default (1.0 pc threshold, ly, pretty)" \
$SCRIPT --journey \
--to-ra $G570_RA --to-dec $G570_DEC --to-distance $G570_DIST \
--to-name "$G570_NAME"
run "parsecs" \
$SCRIPT --journey \
--to-ra $G570_RA --to-dec $G570_DEC --to-distance $G570_DIST \
--to-name "$G570_NAME" \
--parsecs
run "CSV format" \
$SCRIPT --journey \
--to-ra $G570_RA --to-dec $G570_DEC --to-distance $G570_DIST \
--to-name "$G570_NAME" \
--format csv
run "HTML format" \
$SCRIPT --journey \
--to-ra $G570_RA --to-dec $G570_DEC --to-distance $G570_DIST \
--to-name "$G570_NAME" \
--format html
run "narrow threshold (0.5 pc)" \
$SCRIPT --journey \
--to-ra $G570_RA --to-dec $G570_DEC --to-distance $G570_DIST \
--to-name "$G570_NAME" \
--approach-distance 0.5
run "wide threshold (2.0 pc)" \
$SCRIPT --journey \
--to-ra $G570_RA --to-dec $G570_DEC --to-distance $G570_DIST \
--to-name "$G570_NAME" \
--approach-distance 2.0
# ── Journeys: two-point ───────────────────────────────────────────────────────
header "JOURNEY | Two-point (Gliese 570 → Epsilon Indi)"
run "default (1.0 pc threshold, ly, pretty)" \
$SCRIPT --journey \
--from-ra $G570_RA --from-dec $G570_DEC --from-distance $G570_DIST \
--from-name "$G570_NAME" \
--to-ra $EIND_RA --to-dec $EIND_DEC --to-distance $EIND_DIST \
--to-name "$EIND_NAME"
run "wide threshold (2.0 pc)" \
$SCRIPT --journey \
--from-ra $G570_RA --from-dec $G570_DEC --from-distance $G570_DIST \
--from-name "$G570_NAME" \
--to-ra $EIND_RA --to-dec $EIND_DEC --to-distance $EIND_DIST \
--to-name "$EIND_NAME" \
--approach-distance 2.0
run "parsecs, CSV format" \
$SCRIPT --journey \
--from-ra $G570_RA --from-dec $G570_DEC --from-distance $G570_DIST \
--from-name "$G570_NAME" \
--to-ra $EIND_RA --to-dec $EIND_DEC --to-distance $EIND_DIST \
--to-name "$EIND_NAME" \
--parsecs --format csv
# ── Summary ───────────────────────────────────────────────────────────────────
echo
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
printf " %d passed" $PASS
if [ $FAIL -gt 0 ]; then
printf ", %d FAILED" $FAIL
fi
echo
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
[ $FAIL -eq 0 ]