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
from Tkinter import Tk | |
from tkFileDialog import askopenfilename, askdirectory | |
import tkMessageBox | |
import os | |
from scipy.io import loadmat, savemat | |
import numpy as np | |
def get_mmap_data(filename, dtype, shape): | |
with open(filename, 'r') as ff: | |
fp = np.memmap(ff, dtype=dtype, mode='r', shape=shape) |
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 matplotlib.pyplot as plt | |
import os | |
import numpy as np | |
from scipy.io import loadmat | |
sonpath = '/home/mydata/sonpath' | |
humfile = '/home/mydata/humfile.DAT' | |
# maximum range in m to shwo | |
maxy = 35 |
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
from scipy.io import loadmat | |
import simplekml | |
import pyproj | |
import numpy as np | |
my_meta_file = '/home/dbuscombe/pyhum_test/testclipmeta.mat' | |
cs2cs_args="epsg:26949" | |
metadat = loadmat(my_meta_file) |
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 cart2pol(x, y): | |
''' | |
cartesian to polar coordinates | |
''' | |
theta = np.arctan2(y, x) | |
rho = np.sqrt(x**2 + y**2) | |
return (theta, rho) |
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.pylab as plt | |
# generate some data | |
x = np.random.rand(1000,1) | |
# get the class | |
import RunningStats | |
# get an instance of the 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 matplotlib.pylab as plt | |
# generate some data | |
x = np.random.rand(1000,1) | |
# get the class | |
import RunningStats | |
# get an instance of the 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 | |
# generate some data | |
x = np.random.rand(1000,1) | |
# get the class | |
import RunningStats | |
# get an instance of the class | |
rs = RunningStats.RunningStats() |
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
swig -c++ -python RunningStats.i |
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
/* File: RunningStats.i */ | |
%module RunningStats | |
%{ | |
#define SWIG_FILE_WITH_INIT | |
#include "RunningStats.h" | |
%} | |
%include "RunningStats.h" |
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
""" | |
setup.py file for RunningStats | |
""" | |
from distutils.core import setup, Extension | |
RunningStats_module = Extension('_RunningStats', | |
sources=['RunningStats_wrap.cxx', 'RunningStats.cpp'], | |
) |
NewerOlder