Skip to content

Instantly share code, notes, and snippets.

@tboggs
tboggs / memmap_speedups.py
Created May 22, 2014 01:54
A timing script for SPy SpyFile read methods with and without memmaps
# Timing tests for SpyFile read_ methods
from spectral import *
def create_files(src='av920612_NS_line.lan'):
img = open_image(src)
envi.save_image('bilfile.hdr', img, interleave='bil')
envi.save_image('bipfile.hdr', img, interleave='bip')
envi.save_image('bsqfile.hdr', img, interleave='bsq')
@tboggs
tboggs / dirichlet_plots.png
Last active July 10, 2024 13:49
A script to generate contour plots of Dirichlet distributions
dirichlet_plots.png