Ejemplo n.º 1
0
import pandas as pd
import numpy as np
from marco import experimento
import matplotlib.pyplot as plt
'''tengo que empalmar las distintas mediciones que estan en un mismo archivo'''
vacio = experimento('/home/marco/Documents/fac/labo4/vacio/', claves=['.txt'])

for a in vacio:
    m = vacio.cargar_pd(a)
    sep = m[m['Tiempo'] == 'Tiempo']
    loc = list(sep.T)  #esto agarra las posiciones donde estan los separadores
    loc.append(len(m))
    #loc=[925,1868]

    for i, v in enumerate(loc[:-1]):
        ultimo_t = float(m['Tiempo'].iloc[loc[i] - 1])
        c = loc[i + 1] - loc[i] - 1
        d = m['Tiempo'].iloc[loc[i] + 1:loc[i + 1]] = m['Tiempo'].iloc[
            loc[i] + 1:loc[i + 1]].astype('float') + ultimo_t * np.ones((c, ))
        print(d)
        print(ultimo_t)
        # if loc[:-1] == v:
        #     pass
    loc[-1] -= 1
    m = m.drop(loc)
    m = m.astype('float64')
    m = m.drop(columns='$Medicion')
    m.to_csv(a)
Ejemplo n.º 2
0
TODO
    +hacer grafico dv vs dt ajustar y sacar alpha
        -graficar por separado calentar y enfriar
    -plotear delta temps contra los volts para las resistencias
    -comparar graficos del mismo proceso(enfriando con y sin voltage, etc)
    -estimar efecto joule

'''
from marco import experimento
import warnings
import numpy as np
import matplotlib.pyplot as plt
from uncertainties import unumpy as un

plt.rcParams['mathtext.default']= 'regular'
termo = experimento("cacatermometria/diados/tempsposta")
# termo.mediciones(claves=["temp",'csv'])
archivos = [
        ['tempnuevas_apagar_1amp_2.csv',18.0,0,0
        ],['tempnuevas_enfriar_1amp_2.csv',18.0,0.97,0.7
        ],['tempnuevas_apagado_1-5amp_1.csv',18.0,0,0
        ],['tempnuevas_enfriar_1amp_3.csv',18.0,1,0.7
        ],['tempnuevas_enfriar_1amp_4.csv',18.0,1,0.7
        ],['tempnuevas_enfriar_1-5amp_1.csv',18.0,1.5,1.1

        ],['tempnuevas_enfriar_2amp_1.csv',18.0,1.98,1.4

        ],['tempnuevas_calentar_1-75amp_1.csv',18.0,1.74,1.3
        # ],['tempnuevas_enfriar_1-75amp_prueba.csv',18.0

        ],['temperaturas_recalentar_1-75_1.csv',18.0,1.74,1.7
Ejemplo n.º 3
0
from marco import experimento
import numpy as np
import matplotlib.pyplot as plt

termo = experimento("termometria/diados")
# termo.mediciones(claves=["medi",'csv'])
archivos = [
    # ['medicion_calentar_1amp_2.csv',18.0],
    # ['medicion_apagar_1amp_2.csv',18.0],
    # ['medicion_calentar_1amp_3.csv',18.0],
    # ['medicion_calentar_1amp_4.csv',18.0],
    # ['medicion_enfriar_1-5amp_1.csv',18.0],
    # ['medicion_apagado_1-5amp_1.csv',18.0],
    # ['medicion_calentar_2amp_1.csv',18.0],
    # ['medicion_calentar_1-75amp_1.csv',18.0],
    ['medicion_enfriar_1-75amp_1.csv', 18.0],
    # ['medicion_enfriar_1-75amp_prueba.csv',18.0],
]


def plotear(labels, *args):
    # labels = ['Termo1','Termo2','Voltaje']
    for i, var in enumerate(args):
        plt.plot(S, var, '.', label=labels[i])

    plt.title(medicion.split('.')[0])
    plt.legend(loc='best')
    plt.ylabel('Temperatura (C)')
    plt.xlabel('Tiempo (S)')
    # plt.show()
    # plt.savefig(medicion.split('.')[0])
Ejemplo n.º 4
0
from marco import experimento
import numpy as np
# import matplotlib.pyplot as plt
termo = experimento('.')
termo.mediciones(claves=['barrido'])
print(termo.archivos)

res = [
    '_barrido_0-1_resonancia_2_', 'barrido_0-1Hz_resonancia',
    'barrido_0-5Hz_resonancia', 'barrido_0-5Hz_resonancia (2)',
    'barrido_1Hz_resonancia'
]
pico = [
    '7_barrido_2-5Hz_pico150',
    '8_barrido_1Hz_pico150_2',
]
antires = [
    'barrido_1Hz_antiresonancia',
    'barrido_1Hz_antiresonancia2',
]

todos = [res, pico, antires]

# def plotear(X, *args):
#     labels = ['Frecuencia','Voltaje Cuarzo','Voltaje']
#     for i,var in enumerate(args):
#         plt.plot(X,var,'.',label=labels[i])


#     # plt.title(medicion.split('.')[0])
#     # plt.legend(loc='best')