import numpy as np
import matplotlib.pyplot as plt

import glob, os

for CSVFile in glob.glob("y*.csv"):
    A = np.genfromtxt(CSVFile, delimiter=';').astype(int)[1:]
    print len(A)
    tmp = [] 
    for i in range(len(A)/2-1):
        tmp.append( 256*(A[2*i]&0b11)+A[2*i+1] )
        #print A[i+1]-A[i]
    plt.plot(tmp[1700:2000])
    F = int(CSVFile.split(".")[0].split("-")[-1])
    plt.title("SPI@ "+str(F/1.0E6) + "MHz")
    plt.savefig("yeay"+CSVFile.split(".")[0]+".jpg")
    plt.show()
5000

png

CSVFile = "0-5000-19200000.csv" A = np.genfromtxt(CSVFile, delimiter=';').astype(int) tmp = [] for i in range(len(A[1:])/2): tmp.append( A[2i]256 + A[2*i + 1]) plt.plot(tmp[60:200]) F = int(CSVFile.split(".")[0].split("-")[-1]) plt.title("SPI@ "+str(F/1.0E6) + "MHz") plt.savefig(CSVFile.split(".")[0]+"-detail.jpg") plt.show()



results matching ""

    No results matching ""