# Install, import packages, and clone repository import numpy as np import matplotlib.pyplot as plt !pip -q install segyio !pip -q install azure-cli import segyio import sys !git clone https://github.com/yohanesnuwara/computational-geophysics sys.path.append('/content/computational-geophysics/seismic') # from seis_attribute import display_attribute from seistool import openSegy3D, sliceCube, sliceFluidFactor, plot2D def get_file_azure(sastoken, filepath, to_filename): """ Download Files from Microsoft Azure Storage INPUT: sastoken: SAS token (from 'sv' to 'sp=rl') filepath: Directory of file in Azure to_filename: The wanted name for file OUTPUT: File will be downloaded in the system """ import sys import os if not os.path.exists(to_filename): !{sys.executable} -m azure.cli storage blob download \ --account-name datavillagesa \ --container-name volve \ --name "{filepath}" \ --file "{to_filename}" \ --sas-token "{sastoken}" # Get Near stack data sastoken = "your token here ..." filepath = "Seismic/ST0202/Stacks/ST0202R08_PZ_PSDM_NEAR_OFFSET_PP_TIME.MIG_FIN.POST_STACK.3D.JS-017534.segy" to_filename = "VolveNear.sgy" get_file_azure(sastoken, filepath, to_filename) # Get Far stack data sastoken = "your token here ..." filepath = "Seismic/ST0202/Stacks/ST0202R08_PZ_PSDM_FAR_OFFSET_PP_TIME.MIG_FIN.POST_STACK.3D.JS-017534.segy" to_filename = "VolveFar.sgy" get_file_azure(sastoken, filepath, to_filename) near, far = openSegy3D("/content/VolveNear.sgy"), openSegy3D("/content/VolveFar.sgy") # Make slices inline 10191 near_sl = sliceCube(near, 'il', inline_loc=10191) far_sl = sliceCube(far, 'il', inline_loc=10191) # Plot stacks plt.figure(figsize=(10,8)) plt.subplot(2,1,1) plot2D(near_sl.T, near, 'il', cmap='PuOr', vmin=-0.2, vmax=0.2) plt.title("Near Stack", size=20, pad=10) plt.xlabel("Crossline"); plt.ylabel("TWT [ms]") plt.ylim(2750,2300) plt.subplot(2,1,2) plot2D(far_sl.T, near, 'il', cmap='PuOr', vmin=-0.2, vmax=0.2) plt.title("Far Stack", size=20, pad=10) plt.xlabel("Crossline"); plt.ylabel("TWT [ms]") plt.ylim(2750,2300) plt.tight_layout(1.05) plt.show() sliceFluidFactor(near, far, 'il', inline_loc=10191, crossplot=True) FF = sliceFluidFactor(near, far, 'il', inline_loc=10191) # Plot calculated fluid factor plt.figure(figsize=(10,5)) plot2D(FF.T, near, 'il', cmap='cubehelix', vmin=-.1, vmax=.1) plt.title('Fluid Factor', size=20, pad=10) plt.ylim(2750,2300) plt.show() # Make slices inline 10191 near_sl = sliceCube(near, 'il', inline_loc=10191) far_sl = sliceCube(far, 'il', inline_loc=10191) # Plot stacks plt.figure(figsize=(10,12)) plt.subplot(3,1,1) plot2D(near_sl.T, near, 'il', cmap='PuOr', vmin=-0.2, vmax=0.2) plt.title("Near Stack", size=20, pad=10) plt.xlabel("Crossline"); plt.ylabel("TWT [ms]") plt.ylim(2750,2300) plt.subplot(3,1,2) plot2D(far_sl.T, near, 'il', cmap='PuOr', vmin=-0.2, vmax=0.2) plt.title("Far Stack", size=20, pad=10) plt.xlabel("Crossline"); plt.ylabel("TWT [ms]") plt.ylim(2750,2300) plt.subplot(3,1,3) plot2D(FF.T, near, 'il', cmap='cubehelix', vmin=-0.1, vmax=0.1) plt.title("Fluid Factor", size=20, pad=10) plt.xlabel("Crossline"); plt.ylabel("TWT [ms]") plt.ylim(2750,2300) plt.tight_layout(1.05) plt.show()