creotech-sayma-testsuite/get_and_plot_sayma_data

35 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

#!/bin/sh
# Script to acquire data on local RP(s) and plot the data.
# Assumed file hierachy on local:
# ./ (current dir)
# ├── plot_sayma_data.py
# ├── rp_get_sayma_data.py
# └── <dir-name>/
# | (possible existing data files, will be overwritten)
# ├── rp_..._y1_raw.bin.py
# ├── rp_..._y2_raw.bin.py
# └── ...
if [[ $1 = "" ]] || [[ $2 = "" ]] || [[ $3 = "" ]] || [[ $4 = "" ]] || [[ $5 = "" ]] || [[ $6 = "" ]]
then
echo "Arguments: <dir name> <RP#1 name> <RP#1 channel> <RP#2 name> <RP#1 channel> <RP#1 name>:<IN1 gain>,<IN2 gain> [<RP#2 name>:<IN1 gain>,<IN2 gain>]"
echo "(If RP#1 and RP#2 are the same, skip the bracketed arguments)"
echo "Examples: "
2021-05-13 10:27:16 +08:00
echo "(1) mlabs-raw mlabs-1 1 mlabs-1 2 mlabs-1:LV,HV"
echo "(2) creotech-raw creotech-1 1 creotech-2 1 creotech-1:LV,LV creotech-2:HV,HV"
exit
fi
# Acquire data from RPs
if [[ $2 = $4 ]]
then
2021-05-05 11:47:46 +08:00
python3 rp_get_sayma_data.py $1 $6
else
2021-05-05 11:47:46 +08:00
python3 rp_get_sayma_data.py $1 $6 $7
fi
# Plot data from saved data
# (Note: requires numpy, matplotlib and scipy on local)
python plot_sayma_data.py $1 $2:$3 $4:$5