@pytest.mark.long_5s
@pytest.mark.SingleOP
@pytest.mark.SCIM
def test_default_proj_Br_time_space(self, import_data):
    SCIM_006 = import_data['SCIM_006']
    simu = import_data['simu']
    time = import_data['time']
    angle = import_data['angle']
    flux = import_data['flux']
    freq_max = import_data['freq_max']
    N0 = import_data['N0']
    Id_ref = import_data['Id_ref']
    Iq_ref = import_data['Iq_ref']
    time_arr = squeeze(time.get_data())
    angle_arr = squeeze(angle.get_data())
    flux_arr = flux.get_data()
    norm_angle = {'space_order': Norm_ref(ref=3)}
    simu = Simu1(name='test_default_proj_Br_time_space', machine=SCIM_006)
    simu.mag = None
    simu.force = None
    simu.struct = None
    simu.input = InputFlux(B_dict={'Br': flux}, time=time, angle=angle, OP=OPdq(N0=N0, Id_ref=Id_ref, Iq_ref=Iq_ref))
    out = Output(simu=simu)
    simu.run()
    out2 = Output(simu=simu)
    Br_reduced = flux_arr[0:672, 0:672]
    time_reduced = time_arr[0:672]
    angle_reduced = angle_arr[0:672]
    Time2 = Data1D(name='time', unit='s', symmetries={'period': 3}, values=time_reduced)
    Angle2 = Data1D(name='angle', unit='rad', symmetries={'period': 3}, values=angle_reduced, normalizations=norm_angle)
    Br2 = DataTime(symbol='B_r', name='Airgap radial flux density', unit='T', axes=[Time2, Angle2], values=Br_reduced)
    out2.mag.B = VectorField(name='Airgap flux density', symbol='B', components={'radial': Br2})
    plt.close('all')
    out.mag.B.plot_2D_Data('time', 'angle[0]{°}', data_list=[out2.mag.B], is_auto_ticks=False, legend_list=['Reference', 'Periodic'], save_path=join(save_path, 'test_default_proj_Br_dataobj_period.png'), is_show_fig=False, **dict_2D)
    out.mag.B.plot_2D_Data((('freqs=[0,' + str(freq_max)) + ']'), data_list=[out2.mag.B], legend_list=['Reference', 'Periodic'], is_auto_ticks=False, save_path=join(save_path, 'test_default_proj_Br_dataobj_period_fft.png'), is_show_fig=False, **dict_2D)
    out3 = Output(simu=simu)
    t0 = time_arr[0]
    tf = time_arr[(- 1)]
    deltat = (time_arr[1] - time_arr[0])
    a0 = angle_arr[0]
    deltaa = (angle_arr[1] - angle_arr[0])
    Na = len(angle_arr)
    Time3 = DataLinspace(name='time', unit='s', initial=t0, final=(tf + deltat), step=deltat, include_endpoint=False)
    Angle3 = DataLinspace(name='angle', unit='rad', normalizations=norm_angle, initial=a0, step=deltaa, number=Na, include_endpoint=False)
    Br3 = DataTime(symbol='B_r', name='Airgap radial flux density', unit='T', axes=[Time3, Angle3], values=flux_arr)
    out3.mag.B = VectorField(name='Airgap flux density', symbol='B', components={'radial': Br3})
    plt.close('all')
    out.mag.B.plot_2D_Data('angle{°}', data_list=[out3.mag.B], legend_list=['Reference', 'Linspace'], is_auto_ticks=False, save_path=join(save_path, 'test_default_proj_Br_dataobj_linspace.png'), is_show_fig=False, **dict_2D)
    out.mag.B.components['radial'].axes[1].normalizations['space_order'] = Norm_ref(ref=3)
    out.mag.B.plot_2D_Data('wavenumber->space_order=[0,100]', data_list=[out3.mag.B], legend_list=['Reference', 'Linspace'], is_auto_ticks=False, save_path=join(save_path, 'test_default_proj_Br_dataobj_linspace_fft.png'), is_show_fig=False, **dict_2D)
    simu4 = Simu1(name='test_default_proj_Br_time_space_ift', machine=SCIM_006)
    simu4.mag = None
    simu4.force = None
    simu4.struct = None
    simu4.input = InputFlux(B_dict={'Br': flux}, time=time, angle=angle, OP=OPdq(N0=N0, Id_ref=Id_ref, Iq_ref=Iq_ref))
    out4 = Output(simu=simu4)
    simu4.run()
    out4.post.legend_name = 'Inverse FT'
    plt.close('all')
    out.mag.B.plot_2D_Data('angle{°}', data_list=[out4.mag.B], legend_list=['Reference', 'Inverse FFT'], is_auto_ticks=False, save_path=join(save_path, 'test_default_proj_Br_dataobj_ift.png'), is_show_fig=False, **dict_2D)
    out.mag.B.plot_2D_Data('wavenumber=[0,100]', data_list=[out4.mag.B], legend_list=['Reference', 'Inverse FFT'], is_auto_ticks=False, save_path=join(save_path, 'test_default_proj_Br_dataobj_ift_fft.png'), is_show_fig=False, **dict_2D)
    out5 = Output(simu=simu)
    t0 = 0.01
    tf = 0.04
    Nt = 3000
    time5 = linspace(0.01, 0.04, 3000, endpoint=True)
    Br5 = (0.2 * sin(((375 * time5) - 1.5)))
    Time5 = DataLinspace(name='time', unit='s', initial=t0, final=tf, number=Nt, include_endpoint=True)
    flux5 = DataTime(symbol='B_r', name='Airgap radial flux density', unit='T', axes=[Time5], values=Br5)
    out5.mag.B = VectorField(name='Airgap flux density', symbol='B', components={'radial': flux5})
    plt.close('all')
    out.mag.B.plot_2D_Data('time', 'angle[0]{°}', data_list=[out5.mag.B], legend_list=['Br', '0.2sin(375t-1.5)'], save_path=join(save_path, 'test_default_proj_Br_compare.png'), is_auto_ticks=False, is_show_fig=False, **dict_2D)
@pytest.mark.long_5s
@pytest.mark.SingleOP
@pytest.mark.SCIM
def test_default_proj_Br_time_space(self, import_data):
    SCIM_006 = import_data['SCIM_006']
    simu = import_data['simu']
    time = import_data['time']
    angle = import_data['angle']
    flux = import_data['flux']
    freq_max = import_data['freq_max']
    N0 = import_data['N0']
    Id_ref = import_data['Id_ref']
    Iq_ref = import_data['Iq_ref']
    time_arr = squeeze(time.get_data())
    angle_arr = squeeze(angle.get_data())
    flux_arr = flux.get_data()
    norm_angle = {'space_order': Norm_ref(ref=3)}
    simu = Simu1(name='test_default_proj_Br_time_space', machine=SCIM_006)
    simu.mag = None
    simu.force = None
    simu.struct = None
    simu.input = InputFlux(B_dict={'Br': flux}, time=time, angle=angle, OP=OPdq(N0=N0, Id_ref=Id_ref, Iq_ref=Iq_ref))
    out = Output(simu=simu)
    simu.run()
    out2 = Output(simu=simu)
    Br_reduced = flux_arr[0:672, 0:672]
    time_reduced = time_arr[0:672]
    angle_reduced = angle_arr[0:672]
    Time2 = Data1D(name='time', unit='s', symmetries={'period': 3}, values=time_reduced)
    Angle2 = Data1D(name='angle', unit='rad', symmetries={'period': 3}, values=angle_reduced, normalizations=norm_angle)
    Br2 = DataTime(symbol='B_r', name='Airgap radial flux density', unit='T', axes=[Time2, Angle2], values=Br_reduced)
    out2.mag.B = VectorField(name='Airgap flux density', symbol='B', components={'radial': Br2})
    plt.close('all')
    out.mag.B.plot_2D_Data('time', 'angle[0]{°}', data_list=[out2.mag.B], is_auto_ticks=False, legend_list=['Reference', 'Periodic'], save_path=join(save_path, 'test_default_proj_Br_dataobj_period.png'), is_show_fig=False, **dict_2D)
    out.mag.B.plot_2D_Data((('freqs=[0,' + str(freq_max)) + ']'), data_list=[out2.mag.B], legend_list=['Reference', 'Periodic'], is_auto_ticks=False, save_path=join(save_path, 'test_default_proj_Br_dataobj_period_fft.png'), is_show_fig=False, **dict_2D)
    out3 = Output(simu=simu)
    t0 = time_arr[0]
    tf = time_arr[(- 1)]
    deltat = (time_arr[1] - time_arr[0])
    a0 = angle_arr[0]
    deltaa = (angle_arr[1] - angle_arr[0])
    Na = len(angle_arr)
    Time3 = DataLinspace(name='time', unit='s', initial=t0, final=(tf + deltat), step=deltat, include_endpoint=False)
    Angle3 = DataLinspace(name='angle', unit='rad', normalizations=norm_angle, initial=a0, step=deltaa, number=Na, include_endpoint=False)
    Br3 = DataTime(symbol='B_r', name='Airgap radial flux density', unit='T', axes=[Time3, Angle3], values=flux_arr)
    out3.mag.B = VectorField(name='Airgap flux density', symbol='B', components={'radial': Br3})
    plt.close('all')
    out.mag.B.plot_2D_Data('angle{°}', data_list=[out3.mag.B], legend_list=['Reference', 'Linspace'], is_auto_ticks=False, save_path=join(save_path, 'test_default_proj_Br_dataobj_linspace.png'), is_show_fig=False, **dict_2D)
    out.mag.B.components['radial'].axes[1].normalizations['space_order'] = Norm_ref(ref=3)
    out.mag.B.plot_2D_Data('wavenumber->space_order=[0,100]', data_list=[out3.mag.B], legend_list=['Reference', 'Linspace'], is_auto_ticks=False, save_path=join(save_path, 'test_default_proj_Br_dataobj_linspace_fft.png'), is_show_fig=False, **dict_2D)
    simu4 = Simu1(name='test_default_proj_Br_time_space_ift', machine=SCIM_006)
    simu4.mag = None
    simu4.force = None
    simu4.struct = None
    simu4.input = InputFlux(B_dict={'Br': flux}, time=time, angle=angle, OP=OPdq(N0=N0, Id_ref=Id_ref, Iq_ref=Iq_ref))
    out4 = Output(simu=simu4)
    simu4.run()
    out4.post.legend_name = 'Inverse FT'
    plt.close('all')
    out.mag.B.plot_2D_Data('angle{°}', data_list=[out4.mag.B], legend_list=['Reference', 'Inverse FFT'], is_auto_ticks=False, save_path=join(save_path, 'test_default_proj_Br_dataobj_ift.png'), is_show_fig=False, **dict_2D)
    out.mag.B.plot_2D_Data('wavenumber=[0,100]', data_list=[out4.mag.B], legend_list=['Reference', 'Inverse FFT'], is_auto_ticks=False, save_path=join(save_path, 'test_default_proj_Br_dataobj_ift_fft.png'), is_show_fig=False, **dict_2D)
    out5 = Output(simu=simu)
    t0 = 0.01
    tf = 0.04
    Nt = 3000
    time5 = linspace(0.01, 0.04, 3000, endpoint=True)
    Br5 = (0.2 * sin(((375 * time5) - 1.5)))
    Time5 = DataLinspace(name='time', unit='s', initial=t0, final=tf, number=Nt, include_endpoint=True)
    flux5 = DataTime(symbol='B_r', name='Airgap radial flux density', unit='T', axes=[Time5], values=Br5)
    out5.mag.B = VectorField(name='Airgap flux density', symbol='B', components={'radial': flux5})
    plt.close('all')
    out.mag.B.plot_2D_Data('time', 'angle[0]{°}', data_list=[out5.mag.B], legend_list=['Br', '0.2sin(375t-1.5)'], save_path=join(save_path, 'test_default_proj_Br_compare.png'), is_auto_ticks=False, is_show_fig=False, **dict_2D)