This file contains 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 h5py | |
import numpy as np | |
def main(): | |
data = read_segment_h5_files() | |
np.save("osc_data", data) | |
def read_segment_h5_files(input_basename="ch", n_channel=4): |
This file contains 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
def ellipse_fit(x, y): | |
def ellipse_err(p, x, y): | |
return (x-p[0])**2/p[2]**2 + (y-p[1])**2/p[3]**2 - 1 | |
p = [0]*4 | |
p[0] = np.mean(x) | |
p[1] = np.mean(y) | |
p[2] = np.max(np.max(x)-p[0], p[0]-np.min(x)) | |
p[3] = np.max(np.max(y)-p[1], p[1]-np.min(y)) |
This file contains 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
#!/bin/sh | |
for file in "$@"; do | |
if test "${file##*.}" = "svg" -a \( ! -e "${file%.svg}.eps" -o "$file" -nt "${file%.svg}.eps" \) | |
then | |
inkscape "$file" -E "${file%.svg}.eps" | |
fi | |
done |