Exemple #1
0
def test_constant_current(series_test):
    xdata = 2 * series_test.parameters.get("k3") / series_test.parameters.get("j0")
    p = pylbo.plot_spectrum_multi(
        series_test, xdata=xdata, use_squared_omega=True, markersize=3
    )
    p.ax.set_yscale("symlog", linthresh=1e-8)
    p.ax.set_xlim(1.88, 2.12)
    p.ax.set_ylim(-1e-3, 1e6)
    return p.fig
def test_gravito_mhd(series_test):
    xdata = series_test.get_k0_squared()
    y_scaling = 1 / series_test.get_alfven_speed(which_values="average") ** 2
    p = pylbo.plot_spectrum_multi(
        series_test, xdata=xdata, use_squared_omega=True, markersize=3
    )
    p.set_y_scaling(y_scaling)
    p.ax.set_xlim(0, 550)
    p.ax.set_ylim(0, 550)
    return p.fig
def test_coronal_fluxtubes(series_test):
    xdata = (series_test.parameters.get("k3") *
             coronal_tube_setup["config"]["parameters"]["r0"])
    y_scaling = 1 / (xdata * series_test.get_sound_speed("maximum"))
    p = pylbo.plot_spectrum_multi(series_test,
                                  xdata=xdata,
                                  use_squared_omega=False,
                                  markersize=3)
    p.set_y_scaling(y_scaling)
    p.ax.set_ylim(0.84, 5.1)
    return p.fig
def test_interchange_flow(series_test):
    xdata = np.linspace(0, np.pi, len(series_test)) / np.pi
    y_scaling = 1 / series_test.get_alfven_speed(which_values="average") ** 2
    p = pylbo.plot_spectrum_multi(
        series_test, xdata=xdata, use_squared_omega=True, markersize=3
    )
    p.set_y_scaling(y_scaling)
    p.ax.set_xlim(-0.01, 1.01)
    p.ax.set_ylim(-4.1, 14.4)
    p.ax.set_xticks(np.arange(0, 1.2, 0.2))
    p.ax.set_yticks(np.arange(-4, 16, 2))
    return p.fig