def test_zp():
    ds = data_dir_load(zp)
    yield assert_equal, str(ds), "plt32.2d.hdf5"
    for test in small_patch_amr(zp, _zp_fields, input_center="c",
                                input_weight="rhs"):
        test_zp.__name__ = test.description
        yield test
Exemple #2
0
def test_LyA():
    ds = data_dir_load(LyA)
    assert_equal(str(ds), "plt00000")
    for test in small_patch_amr(
        ds, _nyx_fields, input_center="c", input_weight=("boxlib", "Ne")
    ):
        test_LyA.__name__ = test.description
        yield test
Exemple #3
0
def test_beam():
    ds = data_dir_load(beam)
    assert_equal(str(ds), "plt03008")
    for test in small_patch_amr(ds, _warpx_fields,
                                input_center="c",
                                input_weight="Ex"):
        test_beam.__name__ = test.description
        yield test
Exemple #4
0
def test_langmuir():
    ds = data_dir_load(langmuir)
    assert_equal(str(ds), "plt00020_v2")
    for test in small_patch_amr(ds, _warpx_fields, 
                                input_center="c",
                                input_weight="Ex"):
        test_langmuir.__name__ = test.description
        yield test
Exemple #5
0
def test_plasma():
    ds = data_dir_load(plasma)
    assert_equal(str(ds), "plt00030_v2")
    for test in small_patch_amr(
        ds, _warpx_fields, input_center="c", input_weight=("mesh", "Ex")
    ):
        test_plasma.__name__ = test.description
        yield test
Exemple #6
0
def test_A2052():
    ds = data_dir_load(A2052, cls=SkyDataFITSDataset)
    assert_equal(str(ds), "A2052_merged_0.3-2_match-core_tmap_bgecorr.fits")
    for test in small_patch_amr(ds,
                                _fields_A2052,
                                input_center="c",
                                input_weight="ones"):
        test_A2052.__name__ = test.description
        yield test
Exemple #7
0
def test_acis():
    from yt.frontends.fits.misc import setup_counts_fields
    ds = data_dir_load(acis, cls=EventsFITSDataset)
    ebounds = [(0.1, 2.0), (2.0, 5.0)]
    setup_counts_fields(ds, ebounds)
    assert_equal(str(ds), "acisf05356N003_evt2.fits.gz")
    for test in small_patch_amr(ds, _fields_acis, input_center="c", input_weight="ones"):
        test_acis.__name__ = test.description
        yield test
Exemple #8
0
def test_grs():
    ds = data_dir_load(grs, cls=FITSDataset, kwargs={"nan_mask": 0.0})
    yield assert_equal, str(ds), "grs-50-cube.fits"
    for test in small_patch_amr(grs,
                                _fields_grs,
                                input_center="c",
                                input_weight="ones"):
        test_grs.__name__ = test.description
        yield test
Exemple #9
0
def test_velocity_field():
    ds = data_dir_load(vf, cls=FITSDataset)
    yield assert_equal, str(ds), "velocity_field_20.fits"
    for test in small_patch_amr(vf,
                                _fields_vels,
                                input_center="c",
                                input_weight="ones"):
        test_velocity_field.__name__ = test.description
        yield test
Exemple #10
0
def test_zp():
    ds = data_dir_load(zp)
    yield assert_equal, str(ds), "plt32.2d.hdf5"
    for test in small_patch_amr(zp,
                                _zp_fields,
                                input_center="c",
                                input_weight="rhs"):
        test_tb.__name__ = test.description
        yield test
Exemple #11
0
def test_cfradial_grid_field_values():
    ds = data_dir_load(cf)
    fields_to_check = [("cf_radial", field) for field in _fields_cfradial]
    wtfield = ("cf_radial", "reflectivity")
    for test in small_patch_amr(ds,
                                fields_to_check,
                                input_center=ds.domain_center,
                                input_weight=wtfield):
        test_cfradial_grid_field_values.__name__ = test.description
        yield test
Exemple #12
0
def test_beam():
    ds = data_dir_load(beam)
    assert_equal(str(ds), "plt03008")
    for param in ("number of boxes", "maximum zones"):
        # PR 2807
        # these parameters are only populated if the config file attached to this
        # dataset is read correctly
        assert param in ds.parameters
    for test in small_patch_amr(
        ds, _warpx_fields, input_center="c", input_weight=("mesh", "Ex")
    ):
        test_beam.__name__ = test.description
        yield test
Exemple #13
0
def test_cm1_mesh_fields():
    ds = data_dir_load(cm1sim)
    assert_equal(str(ds), "nc4_cm1_lofs_tornado_test.nc")

    # run the small_patch_amr tests on safe fields
    ic = ds.domain_center
    for test in small_patch_amr(ds, _fields, input_center=ic, input_weight=None):
        test_cm1_mesh_fields.__name__ = test.description
        yield test

    # manually run the Grid and Field Values tests on dbz (do not want to run the
    # ProjectionValuesTest for this field)
    if can_run_ds(ds):
        dso = [None, ("sphere", (ic, (0.1, "unitary")))]
        for field in [("cm1", "dbz")]:
            yield GridValuesTest(ds, field)
            for dobj_name in dso:
                yield FieldValuesTest(ds, field, dobj_name)
Exemple #14
0
def test_blast():
    ds = data_dir_load(blast)
    assert_equal(str(ds), "Blast.0100")
    for test in small_patch_amr(ds, _fields_blast):
        test_blast.__name__ = test.description
        yield test
Exemple #15
0
def test_cloud():
    ds = data_dir_load(cloud)
    assert_equal(str(ds), "Cloud.0050")
    for test in small_patch_amr(ds, _fields_cloud):
        test_cloud.__name__ = test.description
        yield test
def test_blast():
    ds = data_dir_load(blast)
    yield assert_equal, str(ds), "Blast.0100"
    for test in small_patch_amr(blast, _fields_blast):
        test_blast.__name__ = test.description
        yield test
Exemple #17
0
def test_gc():
    ds = data_dir_load(gc)
    yield assert_equal, str(ds), "data.0077.3d.hdf5"
    for test in small_patch_amr(gc, _fields):
        test_gc.__name__ = test.description
        yield test
Exemple #18
0
def test_AM06():
    ds = data_dir_load(AM06)
    assert_equal(str(ds), "AM06.out1.00400")
    for test in small_patch_amr(ds, _fields_AM06):
        test_AM06.__name__ = test.description
        yield test
Exemple #19
0
def test_toro1d():
    ds = data_dir_load(toro1d)
    assert_equal(str(ds), 'data0001')
    for test in small_patch_amr(ds, ds.field_list):
        test_toro1d.__name__ = test.description
        yield test
Exemple #20
0
def test_radtube():
    ds = data_dir_load(rt)
    assert_equal(str(ds), "plt00500")
    for test in small_patch_amr(ds, _orion_fields):
        test_radtube.__name__ = test.description
        yield test
def test_kho():
    ds = data_dir_load(kho)
    yield assert_equal, str(ds), "data.0004.hdf5"
    for test in small_patch_amr(kho, _fields):
        test_kho.__name__ = test.description
        yield test
def test_sloshing():
    ds = data_dir_load(sloshing)
    yield assert_equal, str(ds), "sloshing_low_res_hdf5_plt_cnt_0300"
    for test in small_patch_amr(sloshing, _fields):
        test_sloshing.__name__ = test.description
        yield test
def test_wind_tunnel():
    ds = data_dir_load(wt)
    yield assert_equal, str(ds), "windtunnel_4lev_hdf5_plt_cnt_0030"
    for test in small_patch_amr(wt, _fields_2d):
        test_wind_tunnel.__name__ = test.description
        yield test
def test_grs():
    ds = data_dir_load(grs, cls=FITSDataset, kwargs={"nan_mask":0.0})
    yield assert_equal, str(ds), "grs-50-cube.fits"
    for test in small_patch_amr(grs, _fields_grs, input_center="c", input_weight="ones"):
        test_grs.__name__ = test.description
        yield test
def test_velocity_field():
    ds = data_dir_load(vf, cls=FITSDataset)
    yield assert_equal, str(ds), "velocity_field_20.fits"
    for test in small_patch_amr(vf, _fields_vels, input_center="c", input_weight="ones"):
        test_velocity_field.__name__ = test.description
        yield test
def test_stripping():
    ds = data_dir_load(stripping, kwargs={"units_override":uo_stripping})
    yield assert_equal, str(ds), "rps.0062"
    for test in small_patch_amr(stripping, _fields_stripping):
        test_stripping.__name__ = test.description
        yield test
Exemple #27
0
def test_stripping():
    ds = data_dir_load(stripping, kwargs={"units_override": uo_stripping})
    assert_equal(str(ds), "rps.0062")
    for test in small_patch_amr(ds, _fields_stripping):
        test_stripping.__name__ = test.description
        yield test
Exemple #28
0
def test_mhdvortex():
    ds = data_dir_load(mhdvortex)
    assert_equal(str(ds), "Data_000018")
    for test in small_patch_amr(ds, _fields_mhdvortex):
        test_mhdvortex.__name__ = test.description
        yield test
Exemple #29
0
def test_RT_particles():
    ds = data_dir_load(RT_particles)
    assert_equal(str(ds), "plt00050")
    for test in small_patch_amr(ds, _castro_fields):
        test_RT_particles.__name__ = test.description
        yield test
Exemple #30
0
def test_jet():
    ds = data_dir_load(jet, kwargs={"units_override": jet_units})
    yield assert_equal, str(ds), "jet_000002"
    for test in small_patch_amr(ds, _fields_jet):
        test_jet.__name__ = test.description
        yield test
Exemple #31
0
def test_star():
    ds = data_dir_load(star)
    assert_equal(str(ds), "plrd01000")
    for test in small_patch_amr(ds, _orion_fields):
        test_star.__name__ = test.description
        yield test
def test_gc():
    ds = data_dir_load(gc)
    yield assert_equal, str(ds), "data.0077.3d.hdf5"
    for test in small_patch_amr(gc, _fields):
        test_gc.__name__ = test.description
        yield test
Exemple #33
0
def test_moving7():
    ds = data_dir_load(m7)
    yield assert_equal, str(ds), "moving7_0010"
    for test in small_patch_amr(m7, _fields):
        test_moving7.__name__ = test.description
        yield test
def test_star():
    ds = data_dir_load(star)
    yield assert_equal, str(ds), "plrd01000"
    for test in small_patch_amr(star, _fields):
        test_star.__name__ = test.description
        yield test
Exemple #35
0
def test_sedov_tunnel():
    ds = data_dir_load(sedov)
    yield assert_equal, str(ds), "sedov_tst_0004"
    for test in small_patch_amr(ds, _fields):
        test_sedov_tunnel.__name__ = test.description
        yield test
Exemple #36
0
def test_blastwave_cylindrical_3D():
    ds = data_dir_load(blastwave_cylindrical_3D)
    for test in small_patch_amr(ds, _get_fields_to_check(ds)):
        test_blastwave_cylindrical_3D.__name__ = test.description
        yield test
Exemple #37
0
def test_tb():
    ds = data_dir_load(tb)
    yield assert_equal, str(ds), "data.0005.3d.hdf5"
    for test in small_patch_amr(tb, _fields):
        test_tb.__name__ = test.description
        yield test
def test_cloud():
    ds = data_dir_load(cloud)
    yield assert_equal, str(ds), "Cloud.0050"
    for test in small_patch_amr(cloud, _fields_cloud):
        test_cloud.__name__ = test.description
        yield test
Exemple #39
0
def test_plummer():
    ds = data_dir_load(plummer)
    assert_equal(str(ds), "plummer_000000")
    for test in small_patch_amr(ds, _fields_plummer):
        test_plummer.__name__ = test.description
        yield test
def test_moving7():
    ds = data_dir_load(m7)
    yield assert_equal, str(ds), "moving7_0010"
    for test in small_patch_amr(m7, _fields):
        test_moving7.__name__ = test.description
        yield test
Exemple #41
0
def test_jiw():
    ds = data_dir_load(jiw)
    assert_equal(str(ds), "Data_000060")
    for test in small_patch_amr(ds, _fields_jiw):
        test_jiw.__name__ = test.description
        yield test
def test_radtube():
    ds = data_dir_load(rt)
    yield assert_equal, str(ds), "plt00500"
    for test in small_patch_amr(rt, _fields):
        test_radtube.__name__ = test.description
        yield test
Exemple #43
0
def test_psiDM():
    ds = data_dir_load(psiDM)
    yield assert_equal, str(ds), "psiDM_000020"
    for test in small_patch_amr(ds, _fields_psiDM):
        test_psiDM.__name__ = test.description
        yield test
def test_tb():
    ds = data_dir_load(tb)
    yield assert_equal, str(ds), "data.0005.3d.hdf5"
    for test in small_patch_amr(tb, _fields):
        test_tb.__name__ = test.description
        yield test