Exemplo n.º 1
0
def test_coeval_st(ic, perturb_field):
    coeval = wrapper.run_coeval(
        init_box=ic,
        perturb=perturb_field,
        flag_options={"USE_TS_FLUCT": True},
    )

    assert isinstance(coeval.spin_temp_struct, wrapper.TsBox)
Exemplo n.º 2
0
def test_coeval_vs_low_level(ic):

    coeval = wrapper.run_coeval(
        redshift=20,
        init_box=ic,
        zprime_step_factor=1.1,
        regenerate=True,
        flag_options={"USE_TS_FLUCT": True},
        write=False,
    )

    st = wrapper.spin_temperature(
        redshift=20,
        init_boxes=ic,
        zprime_step_factor=1.1,
        regenerate=True,
        flag_options={"USE_TS_FLUCT": True},
        write=False,
    )

    assert np.allclose(coeval.Tk_box, st.Tk_box)
    assert np.allclose(coeval.Ts_box, st.Ts_box)
    assert np.allclose(coeval.x_e_box, st.x_e_box)
Exemplo n.º 3
0
def test_coeval_against_direct(ic, perturb_field, ionize_box):
    coeval = wrapper.run_coeval(perturb=perturb_field, init_box=ic)

    assert coeval.init_struct == ic
    assert coeval.perturb_struct == perturb_field
    assert coeval.ionization_struct == ionize_box