From 566d41f104dfc1f2c5b1a9fb78a9c656886b3962 Mon Sep 17 00:00:00 2001 From: Mayank Pachori Date: Sat, 6 Jul 2024 14:00:31 +0530 Subject: [PATCH] An addition of code is done so that directories is created if they are not present. The change is done to facilitate the user as he would not have to create directory on his own he can just download and run the code. --- Python Code/SoS_Acquisition.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Python Code/SoS_Acquisition.py b/Python Code/SoS_Acquisition.py index 9335131..ca4d7fa 100644 --- a/Python Code/SoS_Acquisition.py +++ b/Python Code/SoS_Acquisition.py @@ -12,7 +12,10 @@ import matplotlib.pyplot as plt import numpy as np import time - +import os +# Create directories if they don't exist +os.makedirs("data/X/", exist_ok=True) +os.makedirs("data/Y/", exist_ok=True) ''' COM Port, The first argument of function below needs to changed according @@ -113,7 +116,7 @@ def capture(): # plt.show() - plt.pause(0.1) + plt.pause(.001) print('Enter the number of plots you need')