예제 #1
0
rays_dict = fi1.get_rays_dict()

#rays_dict = {"startz":[0], "starty": [0], "radius": [16],
#             "anglex": [0., 0.1832595],
#             "rasterobj":raster.RectGrid()}

#wavelength = [0.5875618e-3, 0.4861327e-3, 0.6562725e-3]
#numrays = 50
sample_param = 'bundle'

(initialbundle, meritfunctionrms) = get_bundle_merit(osa,
                                                     s,
                                                     sysseq,
                                                     rays_dict,
                                                     fi1.numrays,
                                                     fi1.wavelengths,
                                                     whichmeritfunc='sgd2',
                                                     error='error2',
                                                     sample_param=sample_param,
                                                     penalty=True,
                                                     penaltyVerz=True)

# ----- plot the original system
# --- set the plot setting

pn = np.array([1, 0, 0])
up = np.array([0, 1, 0])

fig = plt.figure(1)
ax1 = fig.add_subplot(211)
ax2 = fig.add_subplot(212)
예제 #2
0
# II---------------------- optical system analysis
# --- 1. elem

sysseq=fi1.get_sysseq(elem1);

# ----------- define optical system analysis object
osa = OpticalSystemAnalysis(s, sysseq)




# III ----------- defining raybundles for optimization and plotting 
rays_dict=fi1.get_rays_dict()

(initialbundle, meritfunctionrms) = get_bundle_merit(osa, s, sysseq, rays_dict,
                                    fi1.numrays, fi1.wavelengths, 
                                    whichmeritfunc='standard', 
                                    error='error2')


# ----- plot the original system
# --- set the plot setting
pn = np.array([1, 0, 0])
up = np.array([0, 1, 0])

fig = plt.figure(1)
ax1 = fig.add_subplot(211)
ax2 = fig.add_subplot(212)
ax1.axis('equal')
ax2.axis('equal')

# --- plot the bundles and draw the original system
예제 #3
0
    rays_dict = fi1.get_rays_dict()

    #rays_dict = {"startz":[0], "starty": [0], "radius": [16],
    #             "anglex": [0., 0.1832595],
    #             "rasterobj":raster.RectGrid()}

    #wavelength = [0.5875618e-3, 0.4861327e-3, 0.6562725e-3]
    #numrays = 50
    sample_param = 'wave'

    (initialbundle,
     meritfunctionrms) = get_bundle_merit(osa,
                                          s,
                                          sysseq,
                                          rays_dict,
                                          fi1.numrays,
                                          fi1.wavelengths,
                                          whichmeritfunc='sgd',
                                          error='error2',
                                          sample_param=sample_param,
                                          penalty=False)

    # ----- plot the original system
    # --- set the plot setting

    pn = np.array([1, 0, 0])
    up = np.array([0, 1, 0])

    fig = plt.figure(1)
    ax1 = fig.add_subplot(211)
    ax2 = fig.add_subplot(212)
    ax1.axis('equal')
예제 #4
0
# ----------- define optical system analysis object
osa = OpticalSystemAnalysis(s, sysseq)

# III ----------- defining raybundles for optimization and plotting
rays_dict = fi1.get_rays_dict()
#TODO In Landos code noch wavelength and numrays einpflegen
wavelength = [0.58749e-3]  #, 0.6562725e-3]
numrays = 10

(initialbundle,
 meritfunctionrms) = get_bundle_merit(osa,
                                      s,
                                      sysseq,
                                      rays_dict,
                                      fi1.numrays,
                                      fi1.wavelengths,
                                      whichmeritfunc='standard2',
                                      error='error2',
                                      penaltyVerz=True)

# ----- plot the original system
# --- set the plot setting
pn = np.array([1, 0, 0])
up = np.array([0, 1, 0])

fig = plt.figure(1)
#ax1 = fig.add_subplot(211)
ax2 = fig.add_subplot(111)
#ax1.axis('equal')
ax2.axis('equal')
예제 #5
0
    "startz": [-7],
    "starty": [0],
    "radius": [5],
    "anglex": [0.03, -0.05],
    "raster": raster.RectGrid()
}
# rastertype = raster.RectGrid()
# define wavelengths
wavelength = [0.5875618e-3, 0.4861327e-3]  #, 0.6562725e-3]
numrays = 10

(initialbundle,
 meritfunctionrms) = get_bundle_merit(osa,
                                      s,
                                      sysseq,
                                      rays_dict,
                                      numrays,
                                      wavelength,
                                      whichmeritfunc='standard_error2')

# ----- plot the original system
# --- set the plot setting
pn = np.array([1, 0, 0])
up = np.array([0, 1, 0])

fig = plt.figure(1)
ax1 = fig.add_subplot(211)
ax2 = fig.add_subplot(212)
ax1.axis('equal')
ax2.axis('equal')