#!/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 # └── / # | (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: :, [:,]" echo "(If RP#1 and RP#2 are the same, skip the bracketed arguments)" echo "Examples: " echo "(1) mlabs-raw mlabs 1 mlabs 2 mlabs: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 python3 rp_get_sayma_data.py $1 $6 else 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