2022-03-18 14:29:49 +01:00
|
|
|
import math
|
|
|
|
import numpy as np
|
2022-03-24 15:39:51 +01:00
|
|
|
# import matplotlib.pyplot as plt
|
2022-06-02 12:12:41 +02:00
|
|
|
import csv
|
2022-03-18 14:29:49 +01:00
|
|
|
|
|
|
|
#"C:\Users\quent\OneDrive\Bureau\ENSC\TransD\Framboisier\02400001.TXT"
|
|
|
|
#! /usr/bin/env python3
|
|
|
|
# -*- coding: UTF-8 -*-
|
|
|
|
|
2022-06-02 12:12:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
taille = 100000
|
2022-05-31 11:33:26 +02:00
|
|
|
freq = 250
|
2022-03-18 14:29:49 +01:00
|
|
|
periode = 1 / freq
|
|
|
|
temps = periode * taille
|
|
|
|
resultat = np.zeros(taille)
|
2022-06-02 12:12:41 +02:00
|
|
|
i = 0
|
|
|
|
# opening the CSV file
|
|
|
|
with open('rawData.csv', mode ='r') as file:
|
|
|
|
|
|
|
|
# reading the CSV file
|
|
|
|
csvFile = csv.DictReader(file)
|
|
|
|
|
|
|
|
# displaying the contents of the CSV file
|
|
|
|
for lines in csvFile:
|
|
|
|
resultat[i] = lines
|
|
|
|
print(lines)
|
|
|
|
i+=1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
2022-03-24 15:39:51 +01:00
|
|
|
resultat*=resultat
|
2022-03-24 15:54:30 +01:00
|
|
|
aire = 0
|
2022-03-18 14:29:49 +01:00
|
|
|
for i in range(taille-1):
|
2022-03-24 15:54:30 +01:00
|
|
|
aire += (resultat[i]+resultat[i+1]) / 2 * periode
|
2022-06-02 12:12:41 +02:00
|
|
|
res = aire/temps
|
|
|
|
print(res)"""
|