예제 #1
0
            print "x =", x
            print "m =", m

            import matplotlib.pyplot as plt
            plt.rcParams.update({'font.size': 16})
            fig, axs = plt.subplots(1, 1)  #, sharey=True, sharex=True)
            fig.tight_layout()
            fieldplot(
                fig,
                axs,
                x,
                m,
                wl,
                comment,
                WL_units,
                crossplane,
                field_to_plot,
                npts,
                factor,
                flow_total,
                subplot_label=' ',
                is_flow_extend=False,
                outline_width=1.5,
                pl=0  #PEC layer starts the design
            )
            # fieldplot(fig, axs, x[0],m[0], wl, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total,
            #           subplot_label=' ' ,is_flow_extend=False
            #           , outline_width=1.5
            #           , pl=0 #PEC layer starts the design
            #           )
            fig.subplots_adjust(hspace=0.3, wspace=-0.1)
            plt.savefig(comment + "-R" +
예제 #2
0

crossplane='XZ'
#crossplane='YZ'
#crossplane='XY'

# Options to plot: Eabs, Habs, Pabs, angleEx, angleHy
field_to_plot='Eabs'
#field_to_plot='angleEx'
comment='SiAgSi-absorber-flow'
WL_units='nm'

import matplotlib.pyplot as plt
fig, axs = plt.subplots(1,1)#, sharey=True, sharex=True)
fig.tight_layout()
fieldplot(fig, axs, x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total,
          subplot_label=' ',is_flow_extend=False, outline_width=1.5)

#fieldplot(x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total, is_flow_extend=False)

# for ax in axs:
#     ax.locator_params(axis='x',nbins=5)
#     ax.locator_params(axis='y',nbins=5)

fig.subplots_adjust(hspace=0.3, wspace=-0.1)

plt.savefig(comment+"-R"+str(int(round(x[-1]*WL/2.0/np.pi)))+"-"+crossplane+"-"
                    +field_to_plot+".pdf",pad_inches=0.02, bbox_inches='tight')

plt.draw()

#    plt.show()
예제 #3
0
field_to_plot = 'Pabs'
# field_to_plot='angleEx'

import matplotlib.pyplot as plt

fig, axs = plt.subplots(1, 1)  # , sharey=True, sharex=True)
fig.tight_layout()
fieldplot(fig,
          axs,
          x,
          m,
          WL,
          comment,
          WL_units,
          crossplane,
          field_to_plot,
          npts,
          factor,
          flow_total,
          density=50.0,
          maxlength=40.0,
          arrowstyle='-',
          subplot_label=' ',
          draw_shell=True)

# fieldplot(x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total, is_flow_extend=False)

# for ax in axs:
#     ax.locator_params(axis='x',nbins=5)
#     ax.locator_params(axis='y',nbins=5)
예제 #4
0
# Options to plot: Eabs, Habs, Pabs, angleEx, angleHy
field_to_plot = 'Eabs'
#field_to_plot='angleEx'
#field_to_plot='Pabs'

import matplotlib.pyplot as plt
fig, axs = plt.subplots(1, 1)  #, sharey=True, sharex=True)
fig.tight_layout()
fieldplot(fig,
          axs,
          x,
          m,
          WL,
          comment,
          WL_units,
          crossplane,
          field_to_plot,
          npts,
          factor,
          flow_total,
          subplot_label=' ',
          is_flow_extend=False)

fig.subplots_adjust(hspace=0.3, wspace=-0.1)

plt.savefig(comment + "-R" + str(int(round(x[-1] * WL / 2.0 / np.pi))) + "-" +
            crossplane + "-" + field_to_plot + ".pdf",
            pad_inches=0.02,
            bbox_inches='tight')

plt.draw()
예제 #5
0
#crossplane='XY'

# Options to plot: Eabs, Habs, Pabs, angleEx, angleHy
field_to_plot='Eabs'
#field_to_plot='angleHy'
import matplotlib.pyplot as plt
fig, axs = plt.subplots(2,2)#, sharey=True, sharex=True)
fig.tight_layout()


crossplane='XZ'
design = 1 #AgSi
x, m, WL = SetXM(design)
print "x =", x
print "m =", m
fieldplot(fig, axs[0,0], x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor*63.0/36.0, flow_total,
          subplot_label='(a)')#,is_flow_extend=False)

design = 2 #AgSi
x, m, WL = SetXM(design)
print "x =", x
print "m =", m
fieldplot(fig, axs[0,1], x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total,
          subplot_label='(b)')#,is_flow_extend=False)

crossplane='YZ'

design = 1 #AgSi
x, m, WL = SetXM(design)
print "x =", x
print "m =", m
fieldplot(fig, axs[1,0], x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor*63.0/36.0, flow_total,
예제 #6
0
fig, axs = plt.subplots(2, 2)  #, sharey=True, sharex=True)
fig.tight_layout()

crossplane = 'XZ'
design = 3  #AgSi
WL = 504
x, m, WL = SetXM(design, WL)
print "x =", x
print "m =", m
fieldplot(fig,
          axs[0, 0],
          x,
          m,
          WL,
          comment,
          WL_units,
          crossplane,
          field_to_plot,
          npts,
          factor,
          flow_total,
          subplot_label='(a) E-k WL=504nm')  #,is_flow_extend=False)

design = 3  #AgSi
WL = 487
x, m, WL = SetXM(design, WL)
print "x =", x
print "m =", m
fieldplot(fig,
          axs[0, 1],
          x,
예제 #7
0
            # Options to plot: Eabs, Habs, Pabs, angleEx, angleHy
            #field_to_plot='Pabs'
            #field_to_plot='Eabs'
            
            field_to_plot='angleEx'
            #field_to_plot='angleHy'
            print "x =", x
            print "m =", m

            import matplotlib.pyplot as plt
            plt.rcParams.update({'font.size': 16})
            fig, axs = plt.subplots(1,1)#, sharey=True, sharex=True)
            fig.tight_layout()
            fieldplot(fig, axs, x,m, wl, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total,
                      subplot_label=' ',is_flow_extend=False
                      , outline_width=1.5
                      , pl=0 #PEC layer starts the design
                      )
            # fieldplot(fig, axs, x[0],m[0], wl, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total,
            #           subplot_label=' ' ,is_flow_extend=False
            #           , outline_width=1.5
            #           , pl=0 #PEC layer starts the design
            #           )
            fig.subplots_adjust(hspace=0.3, wspace=-0.1)
            plt.savefig(comment+"-R"+str(int(round(x[-1]*wl/2.0/np.pi)))+"-"+crossplane+"-"
                        +field_to_plot+".pdf",pad_inches=0.02, bbox_inches='tight')
            plt.draw()
            plt.clf()
            plt.close()

예제 #8
0
#crossplane='XY'

# Options to plot: Eabs, Habs, Pabs, angleEx, angleHy
field_to_plot='Habs'
#field_to_plot='angleHy'
import matplotlib.pyplot as plt
fig, axs = plt.subplots(2,2)#, sharey=True, sharex=True)
fig.tight_layout()


crossplane='XZ'
design = 1 #AgSi
x, m, WL = SetXM(design)
print "x =", x
print "m =", m
fieldplot(fig, axs[0,0], x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor*63.0/36.0, flow_total,
          subplot_label='(a)')#,is_flow_extend=False)

#design = 2 #AgSi
design = 6 #Bulk Si
x, m, WL = SetXM(design)
print "x =", x
print "m =", m
fieldplot(fig, axs[0,1], x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total,
          subplot_label='(b)')#,is_flow_extend=False)

crossplane='YZ'

design = 1 #AgSi
x, m, WL = SetXM(design)
print "x =", x
print "m =", m
예제 #9
0
# Options to plot: Eabs, Habs, Pabs, angleEx, angleHy
field_to_plot='Eabs'
#field_to_plot='angleHy'
import matplotlib.pyplot as plt
fig, axs = plt.subplots(2,2)#, sharey=True, sharex=True)
fig.tight_layout()


crossplane='XZ'
design = 3 #AgSi
WL = 504
x, m, WL = SetXM(design, WL)
print "x =", x
print "m =", m
fieldplot(fig, axs[0,0], x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total,
          subplot_label='(a) E-k WL=504nm')#,is_flow_extend=False)

design = 3 #AgSi
WL = 487
x, m, WL = SetXM(design, WL)
print "x =", x
print "m =", m
fieldplot(fig, axs[0,1], x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total,
          subplot_label='(b) E-k WL=487nm')#,is_flow_extend=False)

crossplane='YZ'

design = 3 #AgSi
WL = 504
x, m, WL = SetXM(design, WL)
print "x =", x
예제 #10
0
field_to_plot = 'Eabs'
#field_to_plot='angleEx'
comment = 'SiAgSi-absorber-flow'
WL_units = 'nm'

import matplotlib.pyplot as plt
fig, axs = plt.subplots(1, 1)  #, sharey=True, sharex=True)
fig.tight_layout()
fieldplot(fig,
          axs,
          x,
          m,
          WL,
          comment,
          WL_units,
          crossplane,
          field_to_plot,
          npts,
          factor,
          flow_total,
          subplot_label=' ',
          outline_width=1.5,
          draw_shell=True)

#fieldplot(x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total)

# for ax in axs:
#     ax.locator_params(axis='x',nbins=5)
#     ax.locator_params(axis='y',nbins=5)

fig.subplots_adjust(hspace=0.3, wspace=-0.1)
예제 #11
0
###############################################################################
#design = 1 #AgSi
#design = 2
#design = 3
design = 4   # WL=800
comment='SiAgSi-flow'
#design = 5   # Bulk Ag
# comment='bulk-Ag-flow'
x, m, WL = SetXM(design)

WL_units='nm'
print "x =", x
print "m =", m
npts = 101
factor=2.1
flow_total = 39
#flow_total = 21
#flow_total = 0
crossplane='XZ'
#crossplane='YZ'
#crossplane='XY'

# Options to plot: Eabs, Habs, Pabs, angleEx, angleHy
field_to_plot='Pabs'
#field_to_plot='angleEx'

fieldplot(x,m, WL, comment, WL_units, crossplane, field_to_plot, npts, factor, flow_total)