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 | |
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") |
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 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 |
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
#!/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.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
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) |
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
#!/usr/bin/gawk -f | |
# | |
# This file makes 8-bit RGB images from 3 logs | |
# The output is PLAIN (not RAW) PPM | |
# You need an LAS file containing only these logs | |
# Then run this script on that LAS file | |
# The Height should be set to the number of samples in the logs | |
# | |
# Set up the PGM Plain File format header | |
BEGIN { |