""" Example for running the CCP Stack exploration tool. """ import numpy as np from pyglimer.ccp.ccp import read_ccp from pyglimer.plot.plot_volume import VolumeExploration # Change filename and folder to adapt to your database filename = 'ccp_IU_HRV.pkl' folder = 'output/ccps' # Load and plot ccpstack = read_ccp(filename=filename, folder=folder, fmt=None) # 3D interpolation without all points has drawbacks! See Documentation ccpstack.explore(maxz=200, minillum=None)
# Given a ``CCPStack`` object there are multiple ways of getting an image of # the subsurface. You could either compute a three-dimensional volume and plot # slices with respect to the volume or you can create cross sections slices. # # Compute a volume and slice # -------------------------- # # To do that we first need to read the created ``CCPStack``. Second, we create # a discretization for the are of interest, and third, we compute the volume and # some slices. import numpy as np from pyglimer.ccp.ccp import read_ccp # Reading the stack ccpstack = read_ccp(filename='ccp_IU_HRV.pkl', fmt=None) # Create discretization lats = np.arange(41, 43.5, 0.05) lons = np.arange(-72.7, -69.5, 0.05) z = np.linspace(-10, 200, 211) # Plotting the volume and slices vplot = ccpstack.plot_volume_sections(lons, lats, zmax=211, lonsl=-71.45, latsl=42.5, zsl=23) # %%
from matplotlib.colors import LogNorm from pyglimer.ccp.ccp import read_ccp from matplotlib.colors import LinearSegmentedColormap from matplotlib.cm import ScalarMappable import cartopy.crs as ccrs # Load Stack ccp = read_ccp("US_P_0.58_minrad_3D_it_f2.pkl") # Conclude and keep water, nicer for the illumination plots ccp.conclude_ccp(keep_water=True) # Peter, figure, 5.18 lat, lon = np.array([42.5, 42.5]), np.array([-127, -63]) # Get Cross section slat, slon, sdists, qlat, qlon, qdists, qz, qillum, qccp, epi_area = \ ccp.get_profile(lat, lon) # Get depth slice (mainly for the illumination) zqlat, zqlon, zqill, zqccp, zextent, z0 = ccp.get_depth_slice(z0=410) zalpha = np.where(zqill == 0, 0, 0.5) # Define norms # Define norms snorm = Normalize(vmin=0, vmax=sdists[-1]) rfnorm = MidpointNormalize(vmin=vmin, vmax=vmax, midpoint=0.0) illumnorm = LogNorm(vmin=1, vmax=zqill.max()) # Set illumination boundaries for section plotting