1
# -*- coding: utf-8 -*-
3
Created on Wed Feb 24 18:32:40 2016
8
import subprocess as proc
10
import os.path as path
13
import numpy as np # NumPy (multidimensional arrays, linear algebra, ...)
14
import matplotlib as mpl
15
import matplotlib.cm as cm
16
import matplotlib.collections as mcollections
17
import matplotlib.patches as mpatches
18
import matplotlib.pyplot as plt # Matplotlib's pyplot: MATLAB-like syntax
19
import scipy.signal as sig
20
import scipy.special as special
23
import pgl.comsol as comsol
24
import pgl.curve as curve
25
import pgl.labview as labview
26
import pgl.plot as plot
27
import pgl.signal as psig
28
import pgl.tektronix as tektronix
30
import pgl.progress as prog
31
import pgl.cluster as clust
34
def reset_plot_params():
35
mpl.rcParams['ytick.labelsize'] = 22
36
mpl.rcParams['xtick.labelsize'] = 22
37
mpl.rcParams['axes.labelsize'] = 26
38
mpl.rcParams['font.size'] = 26
39
mpl.rcParams['mathtext.default'] = 'regular'
40
mpl.rcParams['figure.subplot.left'] = 0.02
41
mpl.rcParams['figure.subplot.right'] = 0.98
42
mpl.rcParams['figure.subplot.top'] = 0.9
43
mpl.rcParams['figure.subplot.bottom'] = 0.1
44
mpl.rcParams['figure.subplot.wspace'] = 0.2
45
mpl.rcParams['figure.subplot.hspace'] = 0.2
48
def plot_mic_locations(mic_xs, mic_ys):
54
for coordinate in zip(mic_xs, mic_ys):
55
patches.append(mpatches.Circle(coordinate, mic_radius))
56
collection = mcollections.PatchCollection(patches, cmap=cm.brg,
57
norm=mpl.colors.Normalize(0.,1.),
59
collection.set_array(np.array([0.25, 0.5, 0.75]))
60
ax.add_collection(collection)
65
for coordinate in zip(source_xs_120,source_ys_120):
66
patches.append(mpatches.Circle(coordinate, error_radius))
67
collection = mcollections.PatchCollection(patches, cmap=cm.brg, norm=mpl.colors.Normalize(0.,1.), alpha=0.2)
68
collection.set_array(np.repeat(1.0, len(source_xs_120)))
69
ax.add_collection(collection)
73
origin_x = np.zeros(1)
74
origin_y = np.zeros(1)
76
#plt.scatter([0, 0], [0, 0], s=[90000, 0], c=[3,1], cmap=cm.Set1, alpha=0.1)
77
cavity=plt.Circle((0,0),15.24,color='k',alpha=0.1)
83
fig = plt.figure(figsize=(21.0, 7.0))
84
fig.text(0.51, 0.04, 'x (cm)', ha='center', va='center', fontsize=26)
85
fig.text(0.02, 0.52, 'y (cm)', ha='center', va='center', rotation='vertical', fontsize=26)
86
plt.gcf().subplots_adjust(bottom=0.15, left=0.06)
89
plot_mic_locations([-10.91, 4.210, 6.696], [1.436, -10.16, 8.727])
91
plot_mic_locations([4.210, 6.696, -10.91], [-10.16, 8.727, 1.436])
93
plot_mic_locations([-1.436, 10.16, -8.727], [-10.91, 4.210, 6.696])
b'\\ No newline at end of file'