Skip to content

Instantly share code, notes, and snippets.

@tboggs
tboggs / dirichlet_plots.png
Last active February 13, 2024 03:25
A script to generate contour plots of Dirichlet distributions
dirichlet_plots.png
@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')