예제 #1
0
#     M = int(m + 600)
#     plt.plot(x[m:M], B[m:M, 0], label=i)
#
# plt.show()

"""
Comparación de B y de la densidad de protones
"""

t1t2t3t4 = [18.2167, 18.2204, 18.235, 18.2476]
i1 = donde(t, t1t2t3t4[0])
i2 = donde(t, t1t2t3t4[1])
i3 = donde(t, t1t2t3t4[2])
i4 = donde(t, t1t2t3t4[3])

idx = diezmar(t, t_swia)

plt.figure()
plt.plot(posicion[:, 0] / 3390, np.linalg.norm(B_mag, axis=1), label="MAVEN")
plt.axvline(posicion[i1, 0] / 3390, color="C2", linestyle="--", label="t1")
plt.axvline(posicion[i2, 0] / 3390, color="C3", linestyle="--", label="t2")
plt.axvline(posicion[i3, 0] / 3390, color="C4", linestyle="--", label="t3")
plt.axvline(posicion[i4, 0] / 3390, color="C5", linestyle="--", label="t4")
plt.xlabel("x (RM)")
plt.ylabel("|B| (nT)")
plt.legend()

plt.figure()
plt.plot(
    posicion[:, 0] / 3390 + 600 / 3390, np.linalg.norm(B_mag, axis=1), label="MAVEN"
)
예제 #2
0
파일: Ecv.py 프로젝트: gabybosc/MPB
    fin = donde(t, tf)

    t_cut = t[inicio:fin]
    B_cut = B[inicio:fin]
    posicion_cut = posicion[inicio:fin]
    return mag, t_cut, B_cut, posicion_cut


swia, t_swia, density, vel_mso = importar_swia_vel(
    year, month, day, ti_ms, tf_down
)
mag, t_mag, B, posicion = importar_mag(year, month, day, ti_ms, tf_down)


# quiero diezmar el tiempo y el campo para que sean los mismos que tiene swia
idx = diezmar(t_mag, t_swia)

tmag_diezmado = t_mag[idx]
B_cut = B[idx]
posicion_cut = posicion[idx]

inicio_up = donde(t_swia, ti_down)  # tiene que dar lo mismo si uso tswia o tmag
fin_up = donde(t_swia, tf_down)

ti_funda = donde(tmag_diezmado, ti_ms)
tf_funda = donde(tmag_diezmado, tf_ms)
####################


B_avg = np.empty((len(idx), 3))
v_maven = np.empty((len(idx), 3))