-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbee-step-stats-percentile.sh
executable file
·62 lines (49 loc) · 1.32 KB
/
bee-step-stats-percentile.sh
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
echo_img_html_f()
{
echo "<img src='$1' width='400'/>"
}
bee_id_field="bee_id_i"
pos_delta_field="pos_delta_f"
percentiles="25 75"
for yyyymmdd in 2015-09-07 2015-09-08 2015-09-09
do
for bee_id_i in 104
do
q="${bee_id_field}:${bee_id_i}"
for unit in px mm
do
case $unit in
px)
y_axis=50
plot_y_multiplier=
;;
mm)
y_axis=9
plot_y_multiplier=0.18
;;
*)
continue
;;
esac
if [[ -z "${plot_y_multiplier}" ]]
then
plot_y_multiplier_opt=
plot_y_multiplier_desc=
else
plot_y_multiplier_opt="--plot-y-multiplier ${plot_y_multiplier}"
plot_y_multiplier_desc=" x ${plot_y_multiplier}"
fi
png_file="./bee-${bee_id_i}-step-stats-percentile-${yyyymmdd}-${unit}.png"
echo_img_html_f $png_file
./bee-step-stats.py ${png_file} "${q}" \
"${pos_delta_field}:[0+TO+*]" \
--timestamp-range-start "${yyyymmdd}T00:00:00.000Z" \
--timestamp-range-end "${yyyymmdd}T23:59:59.999Z" \
--pos-delta-percentile ${percentiles} \
${plot_y_multiplier_opt} \
--plot-axis -1 25 0 ${y_axis} \
--plot-title "${yyyymmdd} percentile((${percentiles}),${pos_delta_field})${plot_y_multiplier_desc}
${q}"
done
done
done