Created
February 19, 2021 07:00
-
-
Save bpmnnit/0ba1dfbf109a176b775a1bca26473df5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy as np | |
import matplotlib.pyplot as plt | |
sx = [] | |
sy = [] | |
rx = [] | |
ry = [] | |
mx = [] | |
my = [] | |
with open('offsets-1.txt') as f: | |
for line in f: | |
sx += [float(line.split()[5])] # Shots points X | |
sy += [float(line.split()[6])] # Shots points Y | |
rx += [float(line.split()[7])] # Receiver points X | |
ry += [float(line.split()[8])] # Receiver points Y | |
mx += [float(line.split()[9])] # Midpoints points X | |
my += [float(line.split()[10])] # Midpoints points Y | |
f.close() | |
x_bins = np.arange(start=np.min(rx), stop=np.max(rx), step=20) # X Bins seperated by 20m | |
y_bins = np.arange(start=np.min(ry), stop=np.max(ry), step=20) # Y Bins seperated by 20m | |
fig, ax = plt.subplots(figsize=(10, 7)) | |
plt.hist2d(mx, my, bins=[x_bins, y_bins], cmap=plt.cm.get_cmap('Spectral')) # Counting the Midpoints, in the designated bins | |
plt.title('Fold Map') | |
plt.colorbar() | |
ax.set_xlabel('Easting') | |
ax.set_ylabel('Northing') | |
plt.tight_layout() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment