def test_get_polygons_one_well(testpath, tmp_path): """Import a well and get the polygon segments.""" wlist = [Well((testpath / WFILES1), zonelogname="Zonelog")] mypoly = Polygons() mypoly.from_wells(wlist, 2) mypoly.to_file(tmp_path / "poly_w1.irapasc")
def test_get_polygons_many_wells(testpath, tmp_path): """Import some wells and get the polygon segments.""" wlist = [ Well(wpath, zonelogname="Zonelog") for wpath in glob.glob(str(testpath / WFILES2)) ] mypoly = Polygons() mypoly.from_wells(wlist, 2, resample=10) mypoly.to_file(tmp_path / "poly_w1_many.irapasc")
def test_get_polygons_many_wells(): """Import some wells and get the polygon segments.""" wlist = [] for w in glob.glob(str(WFILES2)): wlist.append(Well(w, zonelogname="Zonelog")) print("Imported well {}".format(w)) mypoly = Polygons() nwell = mypoly.from_wells(wlist, 2, resample=10) print(mypoly.dataframe) print("Number of well made to tops: {}".format(nwell)) mypoly.to_file("TMP/poly_w1_many.irapasc")
def test_get_polygons_one_well(): """Import a well and get the polygon segments.""" wlist = [] for w in glob.glob(str(WFILES1)): wlist.append(Well(w, zonelogname="Zonelog")) logger.info("Imported well {}".format(w)) mypoly = Polygons() nwell = mypoly.from_wells(wlist, 2) print(mypoly.dataframe) logger.info("Number of well made to tops: {}".format(nwell)) mypoly.to_file("TMP/poly_w1.irapasc")
def test_get_polygons_many_wells(): """Import some wells and get the polygon segments""" wlist = [] for w in glob.glob(wfiles2): wlist.append(Well(w, zonelogname='Zonelog')) print('Imported well {}'.format(w)) mypoly = Polygons() nwell = mypoly.from_wells(wlist, 2, resample=10) print(mypoly.dataframe) print('Number of well made to tops: {}'.format(nwell)) mypoly.to_file('TMP/poly_w1_many.irapasc')
def test_get_polygons_one_well(): """Import a well and get the polygon segments""" wlist = [] for w in glob.glob(wfiles1): wlist.append(Well(w, zonelogname='Zonelog')) logger.info('Imported well {}'.format(w)) mypoly = Polygons() nwell = mypoly.from_wells(wlist, 2) print(mypoly.dataframe) logger.info('Number of well made to tops: {}'.format(nwell)) mypoly.to_file('TMP/poly_w1.irapasc')
def test_import_export_polygons(): """Import XYZ polygons from file. Modify, and export.""" mypoly = Polygons() mypoly.from_file(PFILE, fformat="xyz") z0 = mypoly.dataframe["Z_TVDSS"].values[0] tsetup.assert_almostequal(z0, 2266.996338, 0.001) mypoly.dataframe["Z_TVDSS"] += 100 mypoly.to_file(TMPD + "/polygon_export.xyz", fformat="xyz") # reimport and check mypoly2 = Polygons(TMPD + "/polygon_export.xyz") tsetup.assert_almostequal(z0 + 100, mypoly2.dataframe["Z_TVDSS"].values[0], 0.001)