plot_sayma_data: Add option to skip data plotting
This commit is contained in:
parent
203129284a
commit
8b397c0728
@ -31,6 +31,9 @@ def main():
|
|||||||
parser.add_argument("--log",
|
parser.add_argument("--log",
|
||||||
help="path of the log file where the measurement record will be appended",
|
help="path of the log file where the measurement record will be appended",
|
||||||
type=str)
|
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()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# Must only compare 2 data
|
# Must only compare 2 data
|
||||||
@ -77,12 +80,13 @@ def main():
|
|||||||
# Print the phase difference
|
# Print the phase difference
|
||||||
print(angle)
|
print(angle)
|
||||||
|
|
||||||
# Normalize y1 and y2 for plotting
|
if not args.noplot:
|
||||||
y1 /= abs(y1).max()
|
# Normalize y1 and y2 for plotting
|
||||||
y2 /= abs(y2).max()
|
y1 /= abs(y1).max()
|
||||||
plot.plot(y1)
|
y2 /= abs(y2).max()
|
||||||
plot.plot(y2)
|
plot.plot(y1)
|
||||||
plot.show()
|
plot.plot(y2)
|
||||||
|
plot.show()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user