Ejemplo n.º 1
0
from MVA_hires import MVA
from importar_datos import importar_lpw, importar_mag
"""
Hace el MVA
calcula el ángulo entre normales
calcula el ancho de la mpb
calcula la corriente

NO NECESITA YA ACTUALIZAR LA FECHA EN GDOCS
"""

year, month, day, doy = fechas()
ti_MVA, tf_MVA = tiempos()

mag, t, B, posicion = importar_mag(year, month, day, ti_MVA - 1, tf_MVA + 1)
lpw, t_lpw, e_density = importar_lpw(year, month, day, ti_MVA - 1, tf_MVA + 1)

(
    x3,
    normal_boot,
    normal_fit,
    inicio,
    fin,
    B_cut,
    t1,
    t2,
    t3,
    t4,
    B_medio_vectorial,
    fila,
    hoja_parametros,
Ejemplo n.º 2
0
calcula el ángulo entre normales
calcula el ancho de la mpb
calcula la corriente
No estoy segura de si debería cambiar algo más que simplemente el orden como tomo t1 t2 t3 t4
"""

year, month, day, doy = fechas()
ti, tf = tiempos("Región de análisis (no MVA)")
ti_MVA, tf_MVA = tiempos("Intervalo del MVA")

print(
    "Si tira error de que no encuentra el path, hay que abrir una vez el disco manualmente para que lo monte"
)

mag, t, B, posicion = importar_mag(year, month, day, ti, tf)
lpw, t_lpw, e_density = importar_lpw(year, month, day, ti, tf)
x3, B_cut, t_cut, posicion_cut, nr = MVA(year, month, day, ti_MVA, tf_MVA)
normal_ajuste, t4, t3, t2, t1 = ajuste(year, month, day, doy, ti_MVA, tf_MVA,
                                       nr)

M = len(t)
M_cut = len(t_cut)

normal_boot = bootstrap_completo(B_cut, M_cut, nr, 1000)

######
# constantes
q_e = 1.6e-19  # carga electron #C

#########
# buscamos el ángulo entre las normales
Ejemplo n.º 3
0
t1, t2, t3, t4 = 18.2167, 18.2204, 18.235, 18.2476
t_up = t1 - 0.015
t_down = t4 + 0.015

# la explicación de esto está en la función al final de todo

r_simu = np.transpose([x_tray, y_tray, z_tray]) * 3390
zi = donde(posicion[:, 2], r_simu[0, 2])
zf = donde(posicion[:, 2], r_simu[-1, 2])

posicion_cut = posicion[zi:zf]
t_cut = t[zi:zf]
B_cut = B_mag[zi:zf]
t_simu = np.linspace(t_cut[0], t_cut[-1], len(r_simu))

lpw, t_lpw, e_density, flag = importar_lpw(2016, "03", 16, t_cut[0], t_cut[-1])
swia, t_swia, proton_density, sw_vel = importar_swica(2016, "03", 16, t_cut[0],
                                                      t_cut[-1])

# los valores estos los elegi mirando los gráficos de la función ancho
ti_simu = t_simu[donde(x_tray, 1.15)]
tf_simu = t_simu[donde(x_tray, 1.01)]

ii = donde(t_simu, ti_simu)
jj = donde(t_simu, tf_simu)

year = 2016
month = 3
day = 16

tiempo_mag = np.array(