diff --git a/Py-Script/Traitement-FFT.py b/Py-Script/Traitement-FFT.py index 6907068..6460b30 100644 --- a/Py-Script/Traitement-FFT.py +++ b/Py-Script/Traitement-FFT.py @@ -71,7 +71,8 @@ f = np.fft.fftfreq(Fe,tstep) #axe des abscisses: fréquence #Définition des courbes des plots ax1.plot(t,y) # print y(t) -ax2.plot(f,abs(sp)) +ax2.plot(f,abs(sp))#ax1 = plt.axes() + #Lancement de l'affichage du plot plt.show() \ No newline at end of file diff --git a/Py-Script/courbe.py b/Py-Script/courbe.py index eea86a1..f7bd647 100644 --- a/Py-Script/courbe.py +++ b/Py-Script/courbe.py @@ -1,3 +1,4 @@ +from asyncore import read import math import numpy as np import matplotlib.pyplot as plt @@ -8,25 +9,13 @@ import csv #! /usr/bin/env python3 # -*- coding: UTF-8 -*- -csv_reader1 = csv.reader(open('../RawDataFiles/RawData1.csv')) #Ouvre le fichier .csv -capteurs = [] +with open('../RawDataFiles/RawData1.csv', 'r') as f: + data = csv.reader(f, quoting = csv.QUOTE_MINIMAL) + for lign in data: + print(lign) + print("\n") -for ligne in csv_reader1: - capteurs.append(ligne) -x = [] -y = [] - -for capteur in capteurs: - x.append(capteur[0]) - y.append(capteur[1]) - -# fig1, (ax1, ax2) = plt.subplots(2, 1) -# fig1 = plt.figure(1, figsize = (5.91, 2.758)) -# ax1 = fig1 - -np.empty([8, 500]) -np.array([[]]) plt.xlabel('Temps') plt.ylabel('Tension')