Skip to content

Releases

v0.14.0

Choose a tag to compare

@github-actions github-actions released this 05 Nov 23:13
34c0370

BeamletOptics v0.14.0

Diff since v0.13.13

Breaking changes

  • Refractive indices are AbstractRefractiveIndex values. Every constructor that takes a refractive index (lenses, prisms, plate and cube beamsplitters, compensator plates, polarizers) throws a MethodError for a number or a function such as λ -> 1.5. Write ConstantRefractiveIndex(1.5), or use SellmeierEquation or DiscreteRefractiveIndex. For your own dispersion formula, define struct MyGlass <: BeamletOptics.AbstractRefractiveIndex end and (::MyGlass)(λ) = ....
  • BeamletOptics.RefractiveIndex is removed. Use BeamletOptics.AbstractRefractiveIndex as the type bound of a refractive index.
  • Detector readouts take a sampling instead of keywords. intensity(pd; n = 200, crop_factor = 5, x_min = a, x_max = b) becomes intensity(pd, RegularGrid(num_points = 200, crop_factor = 5, x_min = a, x_max = b)), and the same holds for electric_field and optical_power. Use RectilinearGrid(xs, zs) for your own axes. The keyword num_spots is gone, and a single bound such as x_min now applies on its own.
  • intensity(pd, Z) no longer takes a wave impedance. Write intensity(pd), which uses the refractive index of the hits.
  • electric_field(pd) of AstigmaticGaussianBeamlet hits returns 3D field vectors, as for PolarizedRay hits. Write sum.(abs2, E) instead of abs2.(E), or use intensity(pd).
  • solve_system! has no keyword retrace, and BeamletOptics.retrace_system! is removed. Every solve traces the beam from its start, so empty!(beam) before solving again is no longer needed. Child beams are new objects after each solve: read them again after every solve.
  • set_num_rays! is renamed num_rays!.
  • properties and default_properties are no longer exported and only accept objects, beams and groups. Write BeamletOptics.properties(x).
  • MeshDummy(path) is removed: write NonInteractableObject(path). The deprecated ConcaveSphericalMirror is removed: write SphericalMirror.
  • get_sdf_inside_step and the preference sdf_inside_step are removed without a replacement, since rays inside a shape now leave at its first exit. Delete the call.
  • BeamletOptics.hit_count(detector) is removed. Write length(detector).
  • BeamletOptics.beamlet_hit_field(hit, p) is removed. Write electric_field(hit, p), which returns a 3D vector for an AstigmaticGaussianBeamletHit.
  • BeamletOptics.AbstractSampling is renamed BeamletOptics.AbstractSourceSampling.
  • BeamletOptics.is_static(x) is removed. Write BeamletOptics.kinematic_trait_of(x) isa BeamletOptics.Static.
  • BeamletOptics.render_children(h) is removed. Write BeamletOptics.children(h), and define BeamletOptics.children for your own system render handles.
  • GaussianBeamletHit and AstigmaticGaussianBeamletHit store values and no longer refer to their beamlet: hit.gauss, hit.agb, hit.id and position(hit) are gone. Keep the beamlet yourself, and read a hit with direction(hit) and BeamletOptics.wavelength(hit).
  • WavefrontBeamletDecomposition and GaussianModeDecomposition take the position of the grid before dir, e.g. WavefrontBeamletDecomposition(x, y, amplitude, phase, pos, dir, λ). The keyword origin is gone. Pass zeros(3) for the previous placement.
  • GaussianBeamletDecomposition throws an ArgumentError if its beamlets are not narrower than the beam, i.e. for n_grid ≤ 4 with the default overlap. Use a larger n_grid.
  • GaussianBeamlet throws an ArgumentError for a support vector that is not orthogonal to the direction. Before, it built a wrong waist. Pass a vector normal to dir.
  • ObjectGroup is no longer an AbstractObject. A Vector{AbstractObject} cannot hold a group, methods typed ::AbstractObject do not receive groups, and BeamletOptics.shape(group) is gone. Write [lens, group] and BeamletOptics.objects(group). The type has one parameter: ObjectGroup{T}.
  • Moving a group or composite object whose parts share a shape, e.g. a DoubletLens together with its own front lens, throws an ArgumentError before anything moves. Before, the shared shape moved twice. Add each part to a group only once.
  • The field orientation of CollimatedSource, PointSource and AstigmaticBeamGroup is renamed dir. Read orientation(source). Your own AbstractBeamGroup types rename the field or define orientation and orientation!.
  • The OpticsBase extension loads with using OpticsBase. Remove the include(... "BeamletOpticsOpticsBaseExt.jl") line from the previous docs.
  • BeamletOptics.kinematic_trait_of throws for a type without a method instead of returning Static(). Declare it for your own types that use the kinematic verbs.
  • Your own AbstractSystem types must define BeamletOptics.objects(system), which every solve calls.
  • Your own AbstractObjectGroup types are no longer AbstractObjects. They are mutable structs with the fields objects, center::Point3{T} and dir::SMatrix{3,3,T,9}.
  • BeamletOptics.children! throws for a beam that already has children. Use BeamletOptics.relaunch! to replace them.
  • Your own AbstractDetector types are emptied by every move and by initialize!. Define Base.empty! for them.
  • BeamletOptics.thickness of a UnionSDF or DifferenceSDF counts every operand and throws for an operand without a thickness method. Define BeamletOptics.thickness for your own SDFs.
  • z0 of AstigmaticGaussianBeamlet is the offset of the waist from position, as for GaussianBeamlet. Before, the whole beamlet started at position + z0 * direction. For the previous beam, start at position + z0 * direction and pass z0_x - z0 and z0_y - z0.
  • A GaussianBeamlet stops tracing with a warning where its Lagrange invariant leaves get_lagrange_tolerance() (default 50 %) of its start value, e.g. behind a strong ball lens. Pass check_invariant = false to solve_system! to trace on as before.
  • The Lagrange check of AstigmaticGaussianBeamlet is relative to its start value within get_lagrange_tolerance(), so beamlets with M2 > 4 are no longer stopped, and threshold limits only the complex invariant. Change the limit with set_lagrange_tolerance! and restart Julia.
  • Moving a detector, also as part of a group, empties it. Read it out before moving it, or move it and solve again.
  • A detector without hits reads as zero field, intensity and power and as an empty spot diagram instead of throwing. Test length(pd) == 0 instead of catching the error.
  • intensity and optical_power of a detector are the flux through it, and electric_field is no longer projected. On a tilted detector, the intensity of rays scales with cos θ instead of cos² θ, that of polarized rays with cos θ instead of 1, and the field of beamlets is larger by 1/√cos θ. optical_power is the beam power at any angle of incidence.
  • The default window of GaussianBeamlet hits spans 3 beam radii instead of 1.5, and beamlet windows widen with 1/cos θ on a tilted detector, so default maps are wider and coarser. Pass RegularGrid(crop_factor = 1.5) for the previous window.
  • gauss_parameters(::GaussianBeamlet, z) returns as ψ the Gouy phase collected from the start of the beam, continuous at every surface. Before, it was relative to the local waist. gauss_parameters(gauss, z, 0) gives the previous value.
  • Beamlet sources carry P0 as their total power. CollimatedGaussianBeamletSource has a new keyword P0 (1 mW for the whole source; before, 1 mW per beamlet). SphericalGaussianBeamletSource, EllipticalGaussianBeamletSource and GaussianBeamletDecomposition no longer emit about 30 P0 and 0.95 P0 respectively. Their E0 sets only the polarization and phase.
  • num_rings of EllipticalGaussianBeamletSource counts the center as a ring, like the other sources. Pass num_rings + 1 for the previous rings.
  • Ring sources give each ring a number of rays in proportion to its area, so the edge ring of CollimatedSource, PointSource and the beamlet cone sources gets fewer rays. The first ray of UniformDiscSource and UniformPointSource is the center ray on the axis.
  • Invalid arguments of sources and num_rays! throw an ArgumentError instead of an ErrorException.
  • Beamsplitter coatings and polarizer films are drawn in saturated colors in both looks. Pass color and alpha to render! to change them.
  • Live beam plots hold one color per vertex. Set the color with BeamletOptics.render_settings!(h; color = ...) instead of on the plot. BeamletOptics.render_settings(h) includes color.

Features

  • Detector readouts on RegularGrid, RectilinearGrid or your own samplings (BeamletOptics.AbstractDetectorSampling); ray_hits gives the directions of the rays on a detector
  • UniformLineSource and UniformFanSource; path_segments lists a traced beam tree as flat segments
  • Prism(vertices, height, n) for convex polygons, EquilateralPrism, DovePrism, surface-based DoubletLens and TripletLens, NonInteractableObject(path) for mesh files
  • push!, delete!, pop! and popat! for ObjectGroup; your own assembly types via BeamletOptics.AbstractObjectGroup; initialize! and solve_system!(...; initialize = true) empty the detectors
  • The OpticsBase extension is declared and loads with using OpticsBase; PlaneField of beamlet hits
  • Rendering: color = :wavelength, wavelength_color(λ), show_bounding_sphere = true
  • Faster solves: bounding sphere pretest, aspheres about twice as fast, balanced threads for beam groups

Bugfixes

  • GaussianBeamlet: waist radius at tilted waists and for large M2, Gouy phase behind lenses, phase and field in media
  • AstigmaticGaussianBeamlet: field follows polarizers and Fresnel losses, children continue their parent, no Gouy phase jump at mirrors, powe...
Read more

v0.13.13

Choose a tag to compare

@github-actions github-actions released this 05 Oct 11:10
c453a2e

BeamletOptics v0.13.13

Diff since v0.13.12

Merged pull requests:

  • Add OpticsBase extension: PlaneField from detectors and back to beamlets (#98) (@TacHawkes)
  • Bugfix: registration failed on unregistered OpticsBase (#110) (@StackEnjoyer)

v0.13.12

Choose a tag to compare

@github-actions github-actions released this 02 Oct 14:35
bee9790

BeamletOptics v0.13.12

Diff since v0.13.11

Merged pull requests:

Closed issues:

  • Add push!/pop! capability to System (#97)

v0.13.11

Choose a tag to compare

@github-actions github-actions released this 29 Sep 22:17
68055d3

BeamletOptics v0.13.11

Diff since v0.13.10

Merged pull requests:

  • Draft: Live rendering and interactive live_view (#78) (@TacHawkes)

v0.13.10

Choose a tag to compare

@github-actions github-actions released this 28 Sep 07:54
0135efe

BeamletOptics v0.13.10

Diff since v0.13.9

Merged pull requests:

  • REPL progress bars for beam groups and field calculations (#90) (@StackEnjoyer)

v0.13.9

Choose a tag to compare

@github-actions github-actions released this 27 Sep 16:28
05129f2

BeamletOptics v0.13.9

Diff since v0.13.8

Merged pull requests:

v0.13.8

Choose a tag to compare

@github-actions github-actions released this 26 Sep 11:34
462cbc8

BeamletOptics v0.13.8

Diff since v0.13.7

Merged pull requests:

v0.13.7

Choose a tag to compare

@github-actions github-actions released this 26 Sep 10:38
49b3be1

BeamletOptics v0.13.7

Diff since v0.13.6

Merged pull requests:

Closed issues:

  • Concave asphere SDF on-axis normal vector inaccuracy (#80)
  • On-axis ray leaving a concave lens vertex gets a spurious second hit (#82)
  • PolarizedRay and PBS bugs (#87)

v0.13.6

Choose a tag to compare

@github-actions github-actions released this 24 Sep 12:02
561c6d4

BeamletOptics v0.13.6

Diff since v0.13.5

Merged pull requests:

v0.13.5

Choose a tag to compare

@github-actions github-actions released this 22 Sep 17:34
e65d996

BeamletOptics v0.13.5

Diff since v0.13.4

Merged pull requests:

  • BMO Workspaces (#67) (@StackEnjoyer)
  • SDF - operator and conic mirrors (#68) (@StackEnjoyer)
  • CompatHelper: add new compat entry for GeometryBasics at version 0.5 for package test, (keep existing compat) (#69) (@github-actions[bot])
  • CompatHelper: add new compat entry for AbstractTrees at version 0.4 for package test, (keep existing compat) (#70) (@github-actions[bot])
  • CompatHelper: add new compat entry for Makie at version 0.24 for package test, (keep existing compat) (#71) (@github-actions[bot])
  • CompatHelper: add new compat entry for BeamletOptics at version 0.13 for package test, (keep existing compat) (#72) (@github-actions[bot])
  • CompatHelper: add new compat entry for GLMakie at version 0.13 for package docs, (keep existing compat) (#73) (@github-actions[bot])
  • CompatHelper: add new compat entry for BeamletOptics at version 0.13 for package docs, (keep existing compat) (#74) (@github-actions[bot])
  • CompatHelper: add new compat entry for CairoMakie at version 0.15 for package docs, (keep existing compat) (#75) (@github-actions[bot])