Ejemplo n.º 1
0
def test_segyiotests_writer_from_seisnc(temp_dir, segyio3d_test_files):
    file, segyio_kwargs = segyio3d_test_files
    seisnc = temp_dir / file.with_suffix(".siesnc").name
    segy_converter(str(file), ncfile=seisnc, silent=True, **segyio_kwargs)
    outfile = temp_dir / file.name
    segy_writer(seisnc, outfile)
    ds = segy_loader(str(outfile), silent=True, **well_known_byte_locs("standard_3d"))
    assert isinstance(ds, xr.Dataset)
Ejemplo n.º 2
0
def test_segyiotests_writer_from_ds(temp_dir, segyio3d_test_files, il_chunks):
    file, segyio_kwargs = segyio3d_test_files
    ds = segy_loader(str(file), silent=True, **segyio_kwargs)
    outfile = temp_dir / file.name
    segy_writer(ds, outfile, il_chunks=il_chunks)
    del ds
    ds = segy_loader(str(outfile), silent=True, **well_known_byte_locs("standard_3d"))
    assert isinstance(ds, xr.Dataset)
Ejemplo n.º 3
0
def test_well_known_byte_locs_fail():
    with pytest.raises(ValueError):
        well_known_byte_locs("gibberish")