res = 1e-7 # size of one pixel in meters # Calculated parameters eps1 = epsilons.epsilon_Au(wl) k0 = 2 * N.pi / wl kSP = k0 * N.sqrt(eps1 * eps2 / (eps1 + eps2)) lambdaSP = 2 * N.pi / kSP.real gs = gridspec.GridSpec(2, 4, width_ratios=[1, 1, 1, 0.05]) fig1 = P.figure() fig2 = P.figure() axis_args = {'aspect': 'equal', 'xticks': [], 'yticks': []} ax = fig1.add_subplot(gs[0, 0], **axis_args) p = calculation_figure(ax, 1, 25e-6, k=kSP, w0=w0, L=L, res=res) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.subfigure_label('(a)', pos='lower right') ax = fig1.add_subplot(gs[0, 1], **axis_args) reuse_plot1 = calculation_figure(ax, -1, 25e-6, k=kSP, w0=w0, L=L, res=res, normalize=True) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.subfigure_label('(b)', pos='lower right') ax = fig1.add_subplot(gs[0, 2], **axis_args) p = calculation_figure(ax, -3, 25e-6, k=kSP, w0=w0, L=L, res=res) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.subfigure_label('(c)', pos='lower right')
# Calculated parameters eps1 = epsilons.epsilon_Au(wl) k0 = 2 * N.pi / wl kSP = k0 * N.sqrt(eps1 * eps2 / (eps1 + eps2)) gs = gridspec.GridSpec(1, 6, width_ratios=[1, 1, 1, 1, 1, 0.05]) fig = P.figure(figsize=(plot_config.pagewidth, 1.21)) calc_args = {'k': kSP, 'w0': w0, 'L': L, 'res': res, 'exact': False, 'normalize': True, 'find_zeroes': True} axis_args = {'aspect': 'equal', 'xticks': [], 'yticks': []} circle_args = {'facecolor': 'none', 'linestyle': 'dashed'} ax = fig.add_subplot(gs[0], **axis_args) p = calculation_figure(ax, 3, 50e-6, **calc_args) # Manually put the circle in since the goddamn contour plot doesn't work ax.add_patch(patches.Circle((0, 0), 4.0, **circle_args)) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.subfigure_label('(a)', pos='lower right') ax = fig.add_subplot(gs[1], **axis_args) p = calculation_figure(ax, 3.25, 50e-6, **calc_args) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.subfigure_label('(b)', pos='lower right') # 3.50 shows a numerical artifact that causes the vortex to split into two # (of the same charge), for some reason - not only is this not physical, it # didn't show up in other calculations. Using 3.51 until I can figure out what
ax = fig.add_subplot(gs[2], **axis_args) p = measurement_figure(ax, '../../data/20100429 l=3.5 plate', 75) ax.set_xlim(0, width * 1e6) ax.set_ylim(33, 33 + width * 1e6) ax.scale_bar(0.1, 0.05, u'10 µm', 0.5) ax.subfigure_label('(c)', pos='lower right') width = 26e-6 ax = fig.add_subplot(gs[3], **axis_args) p = calculation_figure(ax, 3.5, 25e-6, k=kSP, w0=w0, L=L, res=res, exact=False, normalize=True) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.scale_bar(0.1, 0.05, u'10 µm', 10.0 / 26.0) ax.subfigure_label('(d)', pos='lower right') ax = fig.add_subplot(gs[4], **axis_args) p = calculation_figure(ax, 3.5, 75e-6, k=kSP, w0=w0,
ax1 = fig.add_subplot(gs[0], **axis_args) _, _, r, theta = grid(L, res) vortex = N.abs(vortex_beam(r, theta, -3, w0)) ** 2 hw = L * 5e5 # halfwidth of view p = ax1.imshow(vortex, extent=(-hw, hw, -hw, hw)) ax1.set_xlim(-width * 5e5, width * 5e5) ax1.set_ylim(-width * 5e5, width * 5e5) ax1.subfigure_label('(a)', pos='lower right') ax1.axvline(x=data_transform(half), **vline_args) ax1.axvline(x=data_transform(side), **vline_args) ax1.axvline(x=data_transform(ring), **vline_args) ax2 = fig.add_subplot(gs[1], **axis_args) field, p = calculation_figure(ax2, -3, 25e-6, k=kSP, w0=w0, L=L, res=res, normalize=True, return_field=True) ax2.set_xlim(-width * 5e5, width * 5e5) ax2.set_ylim(-width * 5e5, width * 5e5) ax2.subfigure_label('(b)', pos='lower right') ax2.axvline(x=data_transform(half), **vline_args) ax2.plot([data_transform(half)], [data_transform(field[:, half].argmin())], **xmarker_args) ax2.plot([data_transform(half)], [data_transform(field[half:, half].argmax() + half)], **omarker_args) ax2.plot([data_transform(half)], [data_transform(field[:half, half].argmax())], **omarker_args) ax2.axvline(x=data_transform(side), **vline_args) max1 = field[:half, side].argmax() max2 = field[half:, side].argmax() + half
ax.set_xlim(0, width * 1e6) ax.set_ylim(33, 33 + width * 1e6) ax.scale_bar(0.1, 0.05, u'10 µm', 0.5) ax.subfigure_label('(b)', pos='lower right') ax = fig.add_subplot(gs[2], **axis_args) p = measurement_figure(ax, '../../data/20100429 l=3.5 plate', 75) ax.set_xlim(0, width * 1e6) ax.set_ylim(33, 33 + width * 1e6) ax.scale_bar(0.1, 0.05, u'10 µm', 0.5) ax.subfigure_label('(c)', pos='lower right') width = 26e-6 ax = fig.add_subplot(gs[3], **axis_args) p = calculation_figure(ax, 3.5, 25e-6, k=kSP, w0=w0, L=L, res=res, exact=False, normalize=True) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.scale_bar(0.1, 0.05, u'10 µm', 10.0 / 26.0) ax.subfigure_label('(d)', pos='lower right') ax = fig.add_subplot(gs[4], **axis_args) p = calculation_figure(ax, 3.5, 75e-6, k=kSP, w0=w0, L=L, res=res, exact=False, normalize=True) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.scale_bar(0.1, 0.05, u'10 µm', 10.0 / 26.0) ax.subfigure_label('(e)', pos='lower right') cax = fig.add_subplot(gs[5]) cb = fig.colorbar(p, cax=cax) cb.set_label('Intensity (norm.)', labelpad=-10)
fig = P.figure(figsize=(plot_config.pagewidth, 1.21)) calc_args = { 'k': kSP, 'w0': w0, 'L': L, 'res': res, 'exact': False, 'normalize': True, 'find_zeroes': True } axis_args = {'aspect': 'equal', 'xticks': [], 'yticks': []} circle_args = {'facecolor': 'none', 'linestyle': 'dashed'} ax = fig.add_subplot(gs[0], **axis_args) p = calculation_figure(ax, 3, 50e-6, **calc_args) # Manually put the circle in since the goddamn contour plot doesn't work ax.add_patch(patches.Circle((0, 0), 4.0, **circle_args)) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.subfigure_label('(a)', pos='lower right') ax = fig.add_subplot(gs[1], **axis_args) p = calculation_figure(ax, 3.25, 50e-6, **calc_args) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.subfigure_label('(b)', pos='lower right') # 3.50 shows a numerical artifact that causes the vortex to split into two # (of the same charge), for some reason - not only is this not physical, it # didn't show up in other calculations. Using 3.51 until I can figure out what
res = 1e-7 # size of one pixel in meters # Calculated parameters eps1 = epsilons.epsilon_Au(wl) k0 = 2 * N.pi / wl kSP = k0 * N.sqrt(eps1 * eps2 / (eps1 + eps2)) lambdaSP = 2 * N.pi / kSP.real gs = gridspec.GridSpec(2, 4, width_ratios=[1, 1, 1, 0.05]) fig1 = P.figure() fig2 = P.figure() axis_args = {'aspect': 'equal', 'xticks': [], 'yticks': []} ax = fig1.add_subplot(gs[0, 0], **axis_args) p = calculation_figure(ax, 1, 25e-6, k=kSP, w0=w0, L=L, res=res) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5) ax.subfigure_label('(a)', pos='lower right') ax = fig1.add_subplot(gs[0, 1], **axis_args) reuse_plot1 = calculation_figure(ax, -1, 25e-6, k=kSP, w0=w0, L=L, res=res, normalize=True) ax.set_xlim(-width * 5e5, width * 5e5) ax.set_ylim(-width * 5e5, width * 5e5)