OpenCores
URL https://opencores.org/ocsvn/phr/phr/trunk

Subversion Repositories phr

[/] [phr/] [trunk/] [doc/] [gastos/] [comp_2012-09-10/] [list.py] - Blame information for rev 237

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 63 guanucolui
#******************** IMPORT LIBRARY ****************
2
import os
3
import re
4
 
5
#********************* BEGIN ALGORITHM ***********************
6
print("\n ****** Para salir precione CTRL-C *****")
7
try:
8
    cpld          = open("cpld.cmp", "r")
9
    fpga          = open("fpga.cmp", "r")
10
    OOCD_placa    = open("OOCD_placa.cmp", "r")
11
    S3Proto_Power = open("S3Proto_Power.cmp", "r")
12
    for i in range(1,4,1):
13
        for j in range(0,(len(cpld)),1):
14
            pre_list = file_pre.next()
15
            pos_list = file_pos.next()
16
            pre_data = pre_list.rsplit("\t")
17
            pos_data = pos_list.rsplit("\t")
18
        for j in range(0,(len(pre_data)-2),1):
19
            error_data.append((float(pre_data[j])-float(pos_data[j])));
20
            xx.append(float(j))
21
        print error_data
22
        plt.plot(xx,error_data,"ro")
23
        plt.axis([0, len(pre_data)-2, -0.1, 0.1])
24
        plt.draw()
25
        plt.show()
26
        plt.grid(True)
27
    input()
28
    print("\n Fin de programa")
29
 
30
except ValueError:
31
    print("\n Error en el dato")
32
except KeyboardInterrupt:
33
    print("\n Se cierra el programa")
34
    plt.axis([0, len(pre_data)-1, -0.01, 0.01])
35
    plt.draw()
36
    plt.show()
37
    exit()
38
except IOError:
39
    print("\n No se puede abrir el archivo.")
40
    exit()
41
except EOFError:
42
    print("\n Se termino la lectura de archivos. \n Presione CTRL + C para salir");
43
finally:
44
    file_pre.close()
45
    file_pos.close()

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.