Rev 0 | Rev 1 | Rev 2 | segyio r |
segyio w |
||
---|---|---|---|---|---|---|
Byte order | ||||||
Big endian | 1 | 1 | 1 | |||
Little endian | 0 | 0 | 1 | |||
Pairwise byte-swapped | 0 | 0 | 1 | |||
Number formats | ||||||
8-bit int | 0 | 1 | 1 |
This file contains hidden or 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
import pandas as pd | |
import mplstereonet as mpl | |
# Load the data. | |
df = pd.read_csv("https://raw.githubusercontent.com/ICWallis/fractoolbox/master/testdata-fractures.csv") | |
# Create a stereonet with grid lines. | |
fig, ax = mpl.subplots(figsize=(9, 6)) | |
ax.grid(color='k', alpha=0.2) |
This file contains hidden or 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
import numpy as np | |
from scipy.interpolate import interp1d | |
import matplotlib.pyplot as plt | |
def wiggle_2d(data, | |
time, | |
ax=None, | |
skip=1, | |
perc=99.0, |
This file contains hidden or 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 | |
#-*- coding: utf-8 -*- | |
""" | |
Author: Matt Hall, Agile Scientific | |
Licence: Apache 2.0, please re-use this code! | |
To use the CLI type this on the command line: | |
python polarity_cartoon.py --help | |
There is a web app running at agile.geosci.ai/polarity |
This file contains hidden or 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
import numpy as np | |
from scipy.ndimage import generic_filter | |
def rms_1d(trace_segment): | |
""" | |
This function runs on every piece of `size` defined in the | |
generic_filter, below. It returns a single value. | |
""" | |
return np.sqrt(np.sum(trace_segment**2)/trace_segment.size) |
This file contains hidden or 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
import numpy as np | |
# Make some fake data | |
# Make array with 100 rows, 100 columns, and 6 'features' (different maps) | |
shape = (100, 100, 3) | |
data = np.random.random(shape) | |
# Pretend it has NaNs around edge. | |
data[:10] = np.nan | |
data[-10:] = np.nan |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
import pandas as pd | |
from datetime import timedelta | |
from urllib.parse import urlencode | |
def birthquakes(birthday:str) -> pd.DataFrame: | |
""" | |
Make a DataFrame of earthquakes on a given day. | |
Example: birthquake("1971-05-26") |
This file contains hidden or 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
import io | |
import requests | |
import numpy as np | |
from PIL import Image | |
import matplotlib.pyplot as plt | |
from matplotlib.colors import LinearSegmentedColormap as LSC | |
from scipy.interpolate import Rbf | |
class HolidayCard(): | |
"""A holiday card class.""" |
This file contains hidden or 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
import numpy as np | |
import scipy.signal as ss | |
def to_volume(points, max_mb=10): | |
""" | |
Convert N x 3 array of points in a point cloud to a 3D image | |
or 'volume'. The degree of upscaling is controlled by ``max_mb`` | |
which is the target size of the 3D image in memory. | |