Exemplo n.º 1
0
def test_run_end2end_with_shear_seeding(sim_config):
    seed_kwargs = dict(
        rng_seed=42,
        gal_rng_seed=43,
        coadd_rng_seed=44,
        mdet_rng_seed=45,
        star_rng_seed=46,
    )
    res1 = run_end2end_with_shear(
        cfg=copy.deepcopy(sim_config),
        g1=0.02,
        g2=0.0,
        **seed_kwargs,
    )

    res2 = run_end2end_with_shear(
        cfg=copy.deepcopy(sim_config),
        g1=0.02,
        g2=0.0,
        **seed_kwargs,
    )

    assert recursive_equal(res1, res2)

    for k in seed_kwargs:
        _kws = copy.deepcopy(seed_kwargs)
        _kws[k] = 100
        res3 = run_end2end_with_shear(
            cfg=copy.deepcopy(sim_config),
            g1=0.02,
            g2=0.0,
            **_kws,
        )
        assert not recursive_equal(res1, res3), k
Exemplo n.º 2
0
def test_generate_sim_seeding(sim_config):
    sdata1 = _run_sim(copy.deepcopy(sim_config), 42, 43, 45)
    sdata2 = _run_sim(copy.deepcopy(sim_config), 42, 43, 45)

    assert recursive_equal(sdata1, sdata2)

    for seed_set in [(52, 43, 34), (42, 53, 67)]:
        sdata3 = _run_sim(copy.deepcopy(sim_config), *seed_set)
        assert not recursive_equal(sdata1, sdata3)
Exemplo n.º 3
0
def test_generate_sim_wcs_changes(sim_config, key, val):
    sdata1 = _run_sim(copy.deepcopy(sim_config), 42, 43, 45)
    sconfig = copy.deepcopy(sim_config)
    sconfig["se"]["wcs_config"][key] = val
    sdata2 = _run_sim(sconfig, 42, 43, 45)

    assert not recursive_equal(sdata1, sdata2)
def test_run_des_pizza_cutter_coadding_on_sim_seeding(sim_config):
    cdata1 = _run_to_pizza_cutter(
        copy.deepcopy(sim_config),
        42,
        43,
        44,
        45,
    )

    cdata2 = _run_to_pizza_cutter(
        copy.deepcopy(sim_config),
        42,
        43,
        44,
        45,
    )
    assert recursive_equal(cdata1, cdata2)

    for seed_set in [(52, 43, 44, 45), (42, 53, 44, 47), (42, 43, 54, 67)]:
        cdata3 = _run_to_pizza_cutter(
            copy.deepcopy(sim_config),
            *seed_set,
        )
        assert not recursive_equal(cdata1, cdata3)