Example #1
0
                                               "cc": -1.,
                                               "coefficients": [0.0, 0.0, 0.0]
                                           }, {
                                               "decz": 20.0
                                           }, None, "back", {}),
                                           ({
                                               "shape": "Conic"
                                           }, {
                                               "decz": 100.0
                                           }, None, "image", {})], )

osa = OpticalSystemAnalysis(s, sysseq, name="Analysis")

(o, k, E0) = osa.collimated_bundle(121, {
    "startz": -5.,
    "radius": 11.43
},
                                   wave=wavelength)
initialbundle = RayBundle(x0=o, k0=k, Efield0=E0, wave=wavelength)

# initialbundle = generatebundle(openangle=10.*math.pi/180, numrays=121)


def meritfunctionrms(my_s):
    """
    Standard rms spot radius merit function without removing centroid.
    """
    initialbundle_local = RayBundle(x0=o, k0=k, Efield0=E0, wave=wavelength)
    rpaths = my_s.seqtrace(initialbundle_local, sysseq)
    # other constructions lead to fill up of initial bundle with intersection
    # values
Example #2
0
(s, seq) = build_rotationally_symmetric_optical_system(
    [(0, 0, 0., None, "object", {}),
     (100., 0, 5, 1.5, "lens1front", {
         "is_stop": True
     }), (0., 0, 5, None, "lens1rear", {}),
     (0, 0, 196.228, None, "image", {})],
    name="os")

imsurf = s.elements["stdelem"].surfaces["image"]
imsurf.rootcoordinatesystem.tiltx.set_value(alpha)
imsurf.rootcoordinatesystem.update()
objsurf = s.elements["stdelem"].surfaces["object"]
osa = OpticalSystemAnalysis(s, seq, name="Analysis")
(x01, k01, E01) = osa.collimated_bundle(11, {
    "radius": epd,
    "raster": MeridionalFan()
})
(x02, k02, E02) = osa.collimated_bundle(11, {
    "radius": epd,
    "raster": MeridionalFan(),
    "anglex": 1. * degree
})
(x03, k03, E03) = osa.collimated_bundle(11, {
    "radius": epd,
    "raster": MeridionalFan(),
    "anglex": -1. * degree
})

mybundle1 = RayBundle(x01, k01, E01)
mybundle2 = RayBundle(x02, k02, E02)
mybundle3 = RayBundle(x03, k03, E03)
Example #3
0
print(s.rootcoordinatesystem.pprint())

sysseq = [("HUD", [("object", {
    "is_stop": True
}), ("d1", {}), ("s1", {}), ("d1p", {}), ("d2", {}), ("s2", {
    "is_mirror": True
}), ("d2p", {}), ("d3", {}), ("s3", {
    "is_mirror": True
}), ("d3p", {}), ("d4", {}), ("s4", {}), ("d4p", {}), ("image", {})])]

osa = OpticalSystemAnalysis(s, sysseq, name="Analysis")

print("collimated bundles")
(o, k1, E1) = osa.collimated_bundle(3, {
    "radius": 2,
    "raster": raster.MeridionalFan()
},
                                    wave=standard_wavelength)
(o, k2, E2) = osa.collimated_bundle(3, {
    "radius": 2,
    "raster": raster.MeridionalFan(),
    "anglex": 15 * degree
},
                                    wave=standard_wavelength)
(o, k3, E3) = osa.collimated_bundle(3, {
    "radius": 2,
    "raster": raster.MeridionalFan(),
    "anglex": -15 * degree
},
                                    wave=standard_wavelength)