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 python2.7 | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import scipy.misc | |
import tifffile | |
DOWNSAMPLE = 20 # determines the smoothing in pixels | |
METERS_PER_FOOT = .3048 # for conversion from feet to meters | |
ELEVATIONS = [-2000., -200., 0., 200., 2000.] # elevations (in feet) that will become layers |
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
//============================================================================= | |
// Copyright © 2009 Point Grey Research, Inc. All Rights Reserved. | |
// | |
// This software is the confidential and proprietary information of Point | |
// Grey Research, Inc. ("Confidential Information"). You shall not | |
// disclose such Confidential Information and shall use it only in | |
// accordance with the terms of the license agreement you entered into | |
// with PGR. | |
// | |
// PGR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE |
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
### MATPLOTLIBRC FORMAT | |
# This is a sample matplotlib configuration file - you can find a copy | |
# of it on your system in | |
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it | |
# there, please note that it will be overwritten in your next install. | |
# If you want to keep a permanent local copy that will not be | |
# overwritten, place it in the following location: | |
# unix/linux: | |
# $HOME/.config/matplotlib/matplotlibrc or |
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 matplotlib.pyplot as plt | |
from figurefirst import FigureLayout | |
layout = FigureLayout('hello_world_layout.svg') | |
layout.make_mplfigures() | |
ax = layout.axes['ax_name']['axis'] | |
x = np.arange(10) | |
y = x**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 pyqtgraph as pg | |
import numpy as np | |
import pyqtgraph.exporters | |
def make_tree(order, theta, sz, basePosition, heading, data): | |
trunk_ratio = 0.55 | |
trunk = sz * trunk_ratio | |
deltaX = trunk * np.cos(heading) | |
deltaY = trunk * np.sin(heading) |
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 libtiff import TIFFfile | |
from libtiff import TIFF | |
def read(fileName): | |
""" | |
Script to import tif file from imageJ, | |
usage: zstack = tiff.read(inFileName) | |
PTW 2015/01/29 |
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 matplotlib.pyplot as plt | |
plt.ion() | |
from pylsm import lsmreader | |
imageFile = lsmreader.Lsmimage(lsmFileName) | |
imageFile.open() | |
xLen = imageFile.header['Image'][0]['CZ LSM info']['Dimension X'] | |
yLen = imageFile.header['Image'][0]['CZ LSM info']['Dimension Y'] |
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 | |
def hstack_uneven(a,b,mxn=max,align='top',fill=0): | |
heighta, widtha = a.shape[0], a.shape[1] | |
heightb, widthb = b.shape[0], b.shape[1] | |
outShape = np.array(a.shape) | |
outShape[0] = mxn(heighta,heightb) | |
outShape[1] = widtha+widthb | |
out = np.zeros(outShape,dtype=a.dtype)+fill |
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 matplotlib.pyplot as plt | |
plt.ion() | |
import scipy.interpolate | |
def interpolate_to_common_samplerate(Y, X=None, t=None): | |
if t is None: | |
if X is None: | |
t = np.arange(len(Y[0]),dtype='float') | |
else: |
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 argparse # need to install argparse: sudo apt-get install python-argparse | |
import os, ast | |
import numpy as np | |
import motmot.FlyMovieFormat.FlyMovieFormat as FMF | |
import pylab | |
pylab.ion() | |
import roslib | |
roslib.load_manifest('rosbag') | |
import rosbag |
NewerOlder