im = ax.pcolormesh(x_plot / 1000,
                   y_plot / 1000,
                   plot_map,
                   cmap="CMRmap",
                   vmin=0.6,
                   vmax=0.95)
ax.set_xlabel("Easting (m)")
ax.set_ylabel("Northing (m)")

ax.scatter(
    d_obj.station_locations.rel_east / 1000,
    d_obj.station_locations.rel_north / 1000,
    marker="v",
    s=12,
    c="k",
)

ax.set_xlim((-8, 8))
ax.set_ylim((-8, 8))

plt.colorbar(im, ax=ax)

plt.show()
array2raster.array2raster(
    r"c:\Users\jpeacock\OneDrive - DOI\Geysers\steam_map.tif",
    (-122.96702 + 0.026, 38.732042 + 0.023),
    200,
    200,
    np.log10(c_map),
)
### make equally spaced points on regular grid
x_new = np.linspace(east.min(), east.max(), num=(east.max() - east.min()) / d)
y_new = np.linspace(north.min(),
                    north.max(),
                    num=(north.max() - north.min()) / d)

xg, yg = np.meshgrid(x_new, y_new)

### interpolate the data onto a regular grid
basement = interpolate.griddata((east, north),
                                -1 * a[2], (xg, yg),
                                method='cubic')

### make raster
b = array2raster.array2raster(fn[:-4] + '.tif', (lower_left[1], lower_left[0]),
                              d, d, basement)

### make a point cloud
x0, y0, z0 = gis_tools.project_point_ll2utm(model_center[0],
                                            model_center[1],
                                            epsg=data_epsg)
x = (north.copy() - y0) / 1000.
y = (east.copy() - x0) / 1000.
z = -1 * a[2].copy()
pointsToVTK(fn[0:-4], x, y, z, {'depth': z})

fig = plt.figure(2)
fig.clf()

ax = fig.add_subplot(1, 1, 1, aspect='equal')
im = ax.pcolormesh(xg, yg, basement, cmap='viridis', vmin=0, vmax=3.00)
예제 #3
0
    ax = fig.add_subplot(1, 3, 1 + ii, aspect="equal")
    im = ax.pcolormesh(
        gx,
        gy,
        conductance,
        cmap="gnuplot2",
    )
    # vmin=conductance[pad:-pad, pad:-pad].min(),
    # vmax=conductance[pad:-pad, pad:-pad].max())

    ax.scatter(d.station_locations.rel_east,
               d.station_locations.rel_north,
               marker="v",
               s=20)
    ax.set_xlim((m.grid_east[pad], m.grid_east[-pad]))
    ax.set_ylim((m.grid_north[pad], m.grid_north[-pad]))

    cb = plt.colorbar(im, ax=ax, shrink=0.35)

    array2raster.array2raster(
        Path(m.save_path).joinpath(
            f"canv_conductance_impedance_{key}.tiff").as_posix(),
        (lower_left[0], lower_left[1]),
        8000.0,
        8000.0,
        conductance[pad:-pad, pad:-pad],
    )

plt.show()
예제 #4
0
    ii = np.where(north == line[1])[0][0]
    jj = np.where(east == line[0])[0][0]
    kk = np.where(depth == line[4])[0][0]

    vp_arr['vp'][ii, jj, kk] = line[5]
    vp_arr['per_vp'][ii, jj, kk] = line[6]
    vp_arr['dvp'][ii, jj, kk] = line[7]

ll_corner = (lon.min(), lat.min())

for ii, dd in enumerate(depth):
    if ii % 2 == 1:
        continue
    a2r.array2raster(
        os.path.join(sv_path,
                     'waite_vp_{0:0.0f}km_wgs84.tif'.format(dd - depth.min())),
        ll_corner, 500., 500, vp_arr['vp'][:, :, ii])

#vtk_east = np.append(east, east[-1]*1)
#vtk_north = np.append(north, north[-1]*1)
#vtk_depth = np.append(depth, depth[-1]*1)
##vtk_east = east
##vtk_north = north
##vtk_depth = depth
#
#vtk_vp = vp_arr['vp'].T
#vtk_per_vp = vp_arr['per_vp'].T
#vtk_dvp = vp_arr['dvp'].T
#
#a2vtk.gridToVTK(r"c:\Users\jpeacock\Documents\iMush\waite_vp",
#                vtk_north, vtk_east, vtk_depth,
예제 #5
0
                    num=(a['easting'].max() - a['easting'].min()) / d)
y_new = np.linspace(a['northing'].min(),
                    a['northing'].max(),
                    num=(a['northing'].max() - a['northing'].min()) / d)

xg, yg = np.meshgrid(x_new, y_new)

### interpolate the data onto a regular grid
basement = interpolate.griddata((a['easting'], a['northing']),
                                a['mag'], (xg, yg),
                                method='linear')

### make raster
b = array2raster.array2raster(fn[:-4] + '.tif',
                              lower_left,
                              d,
                              d,
                              basement,
                              projection='NAD83')

### make a point cloud
x0, y0, z0 = gis_tools.project_point_ll2utm(model_center[0],
                                            model_center[1],
                                            epsg=data_epsg)
x = (a['northing'].copy() - y0) / 1000.
y = (a['easting'].copy() - x0) / 1000.
z = a['mag'].copy() / np.abs(a['mag']).max()
pointsToVTK(fn[0:-4], x, y, z, {'mag': z})

fig = plt.figure(1)
fig.clf()
예제 #6
0
        vmax=conductance[pad:-pad, pad:-pad].max(),
    )

    ax.scatter(d.station_locations.rel_east,
               d.station_locations.rel_north,
               marker="v",
               s=20)
    print(conductance[pad:-pad, pad:-pad].min(), conductance[pad:-pad,
                                                             pad:-pad].max())
    ax.set_xlim((m.grid_east[pad], m.grid_east[-pad]))
    ax.set_ylim((m.grid_north[pad], m.grid_north[-pad]))

    cb = plt.colorbar(im, ax=ax, shrink=0.35)

    array2raster.array2raster(
        r"c:\Users\jpeacock\OneDrive - DOI\Geothermal\GraniteSprings\modem_inv\inv_03\1d_conductance_{0}.tif"
        .format(key),
        (-119.052319, 40.179765000000003),
        300.0,
        300.0,
        conductance[pad:-pad, pad:-pad],
    )

    # array2raster.array2raster(r"c:\Users\jpeacock\OneDrive - DOI\Geothermal\Umatilla\modem_inv\inv_09\conductance_{0}_crust.tiff".format(key),
    #                           model_center,
    #                           166.,
    #                           110.,
    #                           conductance[pad:-pad, pad:-pad])

plt.show()
예제 #7
0
    kk = np.where(depth == line[4])[0][0]

    vp_arr["vp"][ii, jj, kk] = line[5]
    vp_arr["per_vp"][ii, jj, kk] = line[6]
    vp_arr["dvp"][ii, jj, kk] = line[7]


ll_corner = (lon.min(), lat.min())

for ii, dd in enumerate(depth):
    if ii % 2 == 1:
        continue
    a2r.array2raster(
        os.path.join(sv_path, "waite_vp_{0:0.0f}km_wgs84.tif".format(dd - depth.min())),
        ll_corner,
        500.0,
        500,
        vp_arr["vp"][:, :, ii],
    )


# vtk_east = np.append(east, east[-1]*1)
# vtk_north = np.append(north, north[-1]*1)
# vtk_depth = np.append(depth, depth[-1]*1)
##vtk_east = east
##vtk_north = north
##vtk_depth = depth
#
# vtk_vp = vp_arr['vp'].T
# vtk_per_vp = vp_arr['per_vp'].T
# vtk_dvp = vp_arr['dvp'].T
예제 #8
0
    a["northing"].min(),
    a["northing"].max(),
    num=(a["northing"].max() - a["northing"].min()) / d,
)

xg, yg = np.meshgrid(x_new, y_new)

### interpolate the data onto a regular grid
basement = interpolate.griddata((a["easting"], a["northing"]),
                                a["mag"], (xg, yg),
                                method="linear")

### make raster
b = array2raster.array2raster(fn[:-4] + ".tif",
                              lower_left,
                              d,
                              d,
                              basement,
                              projection="NAD83")

### make a point cloud
x0, y0, z0 = gis_tools.project_point_ll2utm(model_center[0],
                                            model_center[1],
                                            epsg=data_epsg)
x = (a["northing"].copy() - y0) / 1000.0
y = (a["easting"].copy() - x0) / 1000.0
z = a["mag"].copy() / np.abs(a["mag"]).max()
pointsToVTK(fn[0:-4], x, y, z, {"mag": z})

fig = plt.figure(1)
fig.clf()