plot_sayma_data: Add option to skip data plotting

master
Harry Ho 2021-10-06 12:26:20 +08:00
parent 203129284a
commit 8b397c0728
1 changed files with 10 additions and 6 deletions

View File

@ -31,6 +31,9 @@ def main():
parser.add_argument("--log",
help="path of the log file where the measurement record will be appended",
type=str)
parser.add_argument("--noplot",
help="do not show data plot, which is blocking until the GUI is closed",
action="store_true")
args = parser.parse_args()
# Must only compare 2 data
@ -77,6 +80,7 @@ def main():
# Print the phase difference
print(angle)
if not args.noplot:
# Normalize y1 and y2 for plotting
y1 /= abs(y1).max()
y2 /= abs(y2).max()