Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Preferences = "21216c6a-2e73-6563-6e65-726566657250"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Trapz = "592b5752-818d-11e9-1e9a-2b8ca4a44cd1"

[weakdeps]
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
Expand All @@ -43,7 +42,6 @@ Preferences = "1.5.2"
ProgressMeter = "1.11"
Random = "1"
StaticArrays = "1"
Trapz = "2"
julia = "1.12"

[workspace]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Depth = 2

## Public API for dependent packages

Besides the exported names, a few names are declared `public` in `src/Exports.jl` without being exported, e.g. `BeamletOptics.is_static`, `BeamletOptics.hit_count`, the progress interface `BeamletOptics.ProgressSink`, the sampling of the sources `BeamletOptics.AbstractSampling`, the optional `BeamletOptics.bounding_sphere_of` of a shape (see [Bounding sphere pretest](@ref)), `BeamletOptics.AbstractObjectGroup` for own assembly types of separate parts (see [Assemblies: group or multi-shape object](@ref)), or `BeamletOptics.relaunch!` and the beamlet hit records (`BeamletOptics.AstigmaticGaussianBeamletHit(agb, id)`, `BeamletOptics.beamlet_hit_field`) for components that re-emit light, e.g. solvers coupled through a field (see [Re-emitting components](@ref)). Packages built on BMO, such as [BeamletOpticsGUI](https://github.com/StackEnjoyer/BeamletOpticsGUI.jl), may rely on them like on the exported API; other unexported names are internal and may change in any release. Whether a name is public can be checked with `Base.ispublic(BeamletOptics, name)`. Their docstrings are listed in the [Reference](@ref), the render handle protocol is described on the [Live rendering](@ref "Render handle protocol") page. A new `AbstractObject` subtype can add a method of [`properties`](@ref) to list its own parameters, see [Inspecting components](@ref).
Besides the exported names, a few names are declared `public` in `src/Exports.jl` without being exported, e.g. `BeamletOptics.is_static`, `BeamletOptics.hit_count`, the progress interface `BeamletOptics.ProgressSink`, the sampling of the sources `BeamletOptics.AbstractSourceSampling` and the samplings of a detector `BeamletOptics.AbstractDetectorSampling` with `BeamletOptics.sample_points` (see [Sampling](@ref)), the optional `BeamletOptics.bounding_sphere_of` of a shape (see [Bounding sphere pretest](@ref)), `BeamletOptics.AbstractObjectGroup` for own assembly types of separate parts (see [Assemblies: group or multi-shape object](@ref)), or `BeamletOptics.relaunch!` and the beamlet hit records (`BeamletOptics.AstigmaticGaussianBeamletHit(agb, id)`, `BeamletOptics.beamlet_hit_field`) for components that re-emit light, e.g. solvers coupled through a field (see [Re-emitting components](@ref)). Packages built on BMO, such as [BeamletOpticsGUI](https://github.com/StackEnjoyer/BeamletOpticsGUI.jl), may rely on them like on the exported API; other unexported names are internal and may change in any release. Whether a name is public can be checked with `Base.ispublic(BeamletOptics, name)`. Their docstrings are listed in the [Reference](@ref), the render handle protocol is described on the [Live rendering](@ref "Render handle protocol") page. A new `AbstractObject` subtype can add a method of [`properties`](@ref) to list its own parameters, see [Inspecting components](@ref).
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ g2 = GaussianBeamlet([0,-20e-3,0], [0,1,0], 532e-9, 5e-4)
solve_system!(system, g1)
solve_system!(system, g2)

x, y, I = intensity(pd, n=1000)
x, y, I = intensity(pd, RegularGrid(n=1000))
spots = spot_diagram(pd)

## render fringes
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/detector_assets/spotdetector_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ b2_spots = spot_diagram(pd)
empty!(pd)

solve_system!(system, b3)
x, z, I = intensity(pd; n=300, crop_factor=1)
x, z, I = intensity(pd, RegularGrid(n=300, crop_factor=1))
empty!(pd)

##
Expand Down
4 changes: 2 additions & 2 deletions docs/src/assets/examples/double_slit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ solve_system!(system, beams)
@info "Calculating Intensity Pattern..."
n_eval = 500
# Evaluate over a 30mm window to see many fringes
xs_eval, zs_eval, I = intensity(target_pd; n = n_eval,
x_min = -15e-3, x_max = 15e-3, z_min = -15e-3, z_max = 15e-3)
xs_eval, zs_eval, I = intensity(target_pd,
RegularGrid(n = n_eval, x_min = -15e-3, x_max = 15e-3, z_min = -15e-3, z_max = 15e-3))

##
# Visualization
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/examples/polarized_psf_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ solve_system!(system, beam)
##
NA = sin(2 * atan(D / (4f)))
R = 1.5λ / NA
xs, zs, E = electric_field(pd; n = 201, x_min = -R, x_max = R, z_min = -R, z_max = R)
xs, zs, E = electric_field(pd, RegularGrid(n = 201, x_min = -R, x_max = R, z_min = -R, z_max = R))

I = intensity.(E)
I0 = maximum(I)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/assets/examples/psfdetector_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sys = System([lens, psfd])

solve_system!(sys, cs)

x, z, I_num = intensity(psfd; n=500, crop_factor=10)
x, z, I_num = intensity(psfd, RegularGrid(n=500, crop_factor=10))

fringes_fig = Figure()
srf = Axis3(fringes_fig[1, 1], xlabel="x [µm]", ylabel="z [µm]", elevation=0.9, azimuth=2.372)
Expand Down Expand Up @@ -57,7 +57,7 @@ solve_system!(system, ps)

asph_fig = Figure(size=(800, 500))

xs, ys, _intensity = intensity(pd, n=801, x_min=-25e-6, x_max=25e-6, z_min=-25e-6, z_max=25e-6, z0_shift=-50e-6)
xs, ys, _intensity = intensity(pd, RegularGrid(n=801, x_min=-25e-6, x_max=25e-6, z_min=-25e-6, z_max=25e-6, z0_shift=-50e-6))

ax = Axis(asph_fig[1,1], xlabel="x [µm]", ylabel="z [µm]", aspect=1)

Expand Down
12 changes: 2 additions & 10 deletions docs/src/assets/mi_assets/michelson_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,7 @@ save("mi_pd.png", fig; px_per_unit=8, update = false)
## fringe plot
x, y, I = intensity(
pd,
n=200,
x_min=-pd_size/2,
x_max= pd_size/2,
z_min=-pd_size/2,
z_max= pd_size/2,
RegularGrid(n=200, x_min=-pd_size/2, x_max=pd_size/2, z_min=-pd_size/2, z_max=pd_size/2),
)
spots = spot_diagram(pd)

Expand All @@ -240,11 +236,7 @@ solve_system!(system, beam)

x, y, I = intensity(
pd,
n=200,
x_min=-pd_size/2,
x_max= pd_size/2,
z_min=-pd_size/2,
z_max= pd_size/2,
RegularGrid(n=200, x_min=-pd_size/2, x_max=pd_size/2, z_min=-pd_size/2, z_max=pd_size/2),
)
spots = spot_diagram(pd)

Expand Down
26 changes: 21 additions & 5 deletions docs/src/basics/components/detectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,28 @@ The following image shows the spot diagram of a Sonnar lens. Two [`CollimatedSou
Alternatively, the detector data can also be used to reconstruct electric field distributions of incoming beams on its surface using coherent addition. Three readouts build on each other: [`electric_field`](@ref) is the coherent sum of the fields of all hits, [`intensity`](@ref) the flux of the Poynting vector of that field through the detector, and [`optical_power`](@ref) the integral of the intensity. Their definitions follow.

```@docs; canonical=false
electric_field(::Detector)
electric_field(::Detector, ::AbstractVector, ::AbstractVector)
electric_field(::Detector, ::BeamletOptics.AbstractDetectorSampling)
electric_field(::BeamletOptics.AbstractDetectorHit, ::AbstractVector)
intensity(::Detector)
intensity(::Detector, ::AbstractVector, ::AbstractVector)
optical_power(::Detector)
intensity(::Detector, ::BeamletOptics.AbstractDetectorSampling)
optical_power(::Detector, ::BeamletOptics.AbstractDetectorSampling)
```

### Sampling

Where on the detector the readouts are evaluated is set by a sampling, the second argument of each readout. It chooses its window, the points in local detector coordinates and the weights with which [`optical_power`](@ref) integrates the intensity. The default is a [`RegularGrid`](@ref) around the hits; a [`RectilinearGrid`](@ref) is a grid of one's own with any spacing.

```julia
x, z, I = intensity(pd, RegularGrid(n = 200, crop_factor = 5))
P = optical_power(pd, RectilinearGrid(xs, zs))
```

```@docs; canonical=false
RegularGrid
RectilinearGrid
BeamletOptics.AbstractDetectorSampling
BeamletOptics.sample_points
electric_field(::Detector, ::AbstractArray{<:AbstractVector})
intensity(::Detector, ::AbstractArray{<:AbstractVector})
```

### Gaussian beamlet interference
Expand Down
4 changes: 2 additions & 2 deletions docs/src/examples/psf.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sys = System([lens, detector])
solve_system!(sys, cs)

# retrieve intensity
x, z, I_num = intensity(detector; n=500, crop_factor=10)
x, z, I_num = intensity(detector, RegularGrid(n=500, crop_factor=10))
```

Visualizing the result yields the expected Airy-disk pattern.
Expand Down Expand Up @@ -123,7 +123,7 @@ solve_system!(System([mirror, pd]), pol_src)

NA = sin(2 * atan(D / (4f)))
R = 1.5λ / NA
xs, zs, E = electric_field(pd; n = 201, x_min = -R, x_max = R, z_min = -R, z_max = R)
xs, zs, E = electric_field(pd, RegularGrid(n = 201, x_min = -R, x_max = R, z_min = -R, z_max = R))

I = intensity.(E) # |E|²/(2Z₀) per point, not projected onto the detector
Ey = map(e -> abs2(e[2]), E) # longitudinal component
Expand Down
12 changes: 2 additions & 10 deletions docs/src/tutorials/michelson.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,7 @@ You can recreate this figure by running the following code:
# evaluate intensity, overwrite autlims
x, y, I = intensity(
pd,
n=200,
x_min=-pd_size/2,
x_max= pd_size/2,
z_min=-pd_size/2,
z_max= pd_size/2,
RegularGrid(n=200, x_min=-pd_size/2, x_max=pd_size/2, z_min=-pd_size/2, z_max=pd_size/2),
)
spots = spot_diagram(pd)

Expand All @@ -244,11 +240,7 @@ solve_system!(system, beam)
# reevaluate intensity, overwrite autlims
x, y, I = intensity(
pd,
n=200,
x_min=-pd_size/2,
x_max= pd_size/2,
z_min=-pd_size/2,
z_max= pd_size/2,
RegularGrid(n=200, x_min=-pd_size/2, x_max=pd_size/2, z_min=-pd_size/2, z_max=pd_size/2),
)
spots = spot_diagram(pd)

Expand Down
19 changes: 11 additions & 8 deletions skills/beamletoptics/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Use `scripts/api_lookup.jl NAME` to print the docstring and signatures of any na
| Splitters | `ThinBeamsplitter`, `RoundThinBeamsplitter`, `RectangularPlateBeamsplitter`, `RoundPlateBeamsplitter`, `CubeBeamsplitter`, `RectangularCompensatorPlate` |
| Prisms | `Prism`, `RightAnglePrism`, `EquilateralPrism`, `DovePrism` |
| Polarizers | `PolarizationFilter`, `RoundPolarizationFilter`, `LinearPolarizer`, `RoundLinearPolarizer`, `transmission_axis` |
| Detectors | `Detector`, `spot_diagram`, `intensity`, `electric_field`, `optical_power`, `gauss_parameters`, `waist_parameters`, `Centroid`, `MinMax` |
| Detectors | `Detector`, `RegularGrid`, `RectilinearGrid`, `spot_diagram`, `intensity`, `electric_field`, `optical_power`, `gauss_parameters`, `waist_parameters`, `Centroid`, `MinMax` |
| Dummies | `NonInteractableObject`, `IntersectableObject` |
| Config | `get_default_wavelength`, `get_default_waist`, `get_default_power`, `get_default_r_max`, `get_default_depth_max`, `get_invariant_threshold`, `set_invariant_threshold!`, `get_internal_reflection_threshold`, `get_line_plane_intersection_threshold`, `get_orthogonality_threshold`, `get_sdf_surface_threshold`, `get_sdf_raymarch_eps`, `get_sdf_inside_step`, `get_progress_threshold`, `set_progress_threshold!` |
| Render (Makie)| `wavelength_color`, `render!`, `get_view`, `set_view`, `hide_axis`, `set_orthographic`, `look_at!`, `arrow!`, `render_lcs!`, `render_bounding_sphere!`, `set_render_look`, `studio_lighting!` |
Expand Down Expand Up @@ -119,16 +119,19 @@ initialize!(system) # empties all detectors of the system (nested groups inclu
```julia
solve_system!(system, source; initialize = true) # empties the detectors first (or initialize!(system), empty!(det))
pts = spot_diagram(det) # Vector{Point2}: local (x, z) in m
x, z, E = electric_field(det; n = 200) # complex field on an n×n grid (3-vectors for polarized rays and astigmatic beamlets)
x, z, I = intensity(det; n = 200) # W/m², power per detector area (Poynting flux)
x, z, E = electric_field(det) # complex field on a 100×100 RegularGrid (3-vectors for polarized rays and astigmatic beamlets)
x, z, I = intensity(det, RegularGrid(n = 200)) # W/m², power per detector area (Poynting flux)
P = optical_power(det) # W, beam power for any angle of incidence
E = electric_field(det, xs, zs) # on a grid of one's own: local x, z vectors in m
I = intensity(det, xs, zs)
s = RectilinearGrid(xs, zs) # a grid of one's own: local x, z vectors in m, any spacing
x, z, E = electric_field(det, s)
x, z, I = intensity(det, s)
P = optical_power(det, s) # trapezoidal rule on xs × zs
```

Grid keywords for `electric_field`/`intensity`/`optical_power`: `n`, `crop_factor`, `x_min`, `x_max`,
`z_min`, `z_max`, `x0_shift`, `z0_shift`, `center = Centroid() | MinMax()` (rays).
They also take `progress = true` (see Solving). See `components/detectors.md`.
The second argument of `electric_field`/`intensity`/`optical_power` is a sampling (default
`RegularGrid()`). Keywords of `RegularGrid`: `n`, `crop_factor`, `x_min`, `x_max`, `z_min`, `z_max`,
`x0_shift`, `z0_shift`, `center = Centroid() | MinMax()` (rays). The readouts take `progress = true`
(see Solving). See `components/detectors.md`.

## Coupling to other solvers (OpticsBase)

Expand Down
2 changes: 1 addition & 1 deletion skills/beamletoptics/VISUALIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ not part of BeamletOptics. It is the package BeamletOpticsGUI
## Detector data plots

```julia
x, z, I = intensity(det; n = 301, crop_factor = 5)
x, z, I = intensity(det, RegularGrid(n = 301, crop_factor = 5))
fig = Figure()
ax = Axis(fig[1, 1], aspect = 1, xlabel = "x [µm]", ylabel = "z [µm]")
heatmap!(ax, x * 1e6, z * 1e6, I)
Expand Down
2 changes: 1 addition & 1 deletion skills/beamletoptics/WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ end
## PSFs from rays

- Use `UniformDiscSource` (equal-area sampling) with thousands of rays and a `Detector` near focus;
read `intensity(det; n, crop_factor)` or give explicit `x_min/x_max/z_min/z_max` windows.
read `intensity(det, RegularGrid(n = ..., crop_factor = ...))` or give explicit `x_min/x_max/z_min/z_max` windows in the `RegularGrid`.
- For unpolarized PSFs, trace two orthogonal polarizations (polarized beams wrapped in a
`CollimatedSource(beams, diameter, pos, dir)`) and add the intensities incoherently.

Expand Down
22 changes: 14 additions & 8 deletions skills/beamletoptics/components/detectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,31 @@ Detector(edge_length, stop = true)
| Call | Returns |
|------|---------|
| `spot_diagram(det)` | `Vector{Point2}` of local `(x, z)` hit points (beamlets: projected 1/e² contour, kwargs `num_spots`, `crop_factor`) |
| `electric_field(det; kwargs...)` | `(xs, zs, E)`: complex field on an `n×n` grid (hits of `PolarizedRay`s and `AstigmaticGaussianBeamlet`s: a matrix of complex 3-vectors, use `sum(abs2, e)` per element) |
| `intensity(det; kwargs...)` | `(xs, zs, I)`: power per detector area in W/m², the Poynting flux through the detector; a single hit gives `n\|E\|² cos θ / (2Z₀)` |
| `optical_power(det; kwargs...)` | integrated power in W, the beam power for any angle of incidence |
| `electric_field(det, xs, zs)`, `intensity(det, xs, zs)` | the same on a grid of one's own (local `x`, `z` vectors in m) |
| `electric_field(det, s = RegularGrid())` | `(xs, zs, E)`: complex field on the sampling `s`, by default an `n×n` grid (hits of `PolarizedRay`s and `AstigmaticGaussianBeamlet`s: a matrix of complex 3-vectors, use `sum(abs2, e)` per element) |
| `intensity(det, s = RegularGrid())` | `(xs, zs, I)`: power per detector area in W/m², the Poynting flux through the detector; a single hit gives `n\|E\|² cos θ / (2Z₀)` |
| `optical_power(det, s = RegularGrid())` | power in W, `Σ wᵢ Iᵢ` with the quadrature weights of the sampling, the beam power for any angle of incidence |

Grid keywords:
The sampling `s` decides where the readouts are evaluated, its window and the weights of `optical_power`:

- `RegularGrid(; kwargs...)`: `n×n` equidistant points in a window around the hits (keywords below), trapezoidal rule
- `RectilinearGrid(xs, zs)`: a grid of one's own (local `x`, `z` vectors in m, any spacing), the window is `xs × zs` as given, trapezoidal rule; use `optical_power(det, RectilinearGrid(xs, zs))` for the power on it
- `electric_field(det, points)`, `intensity(det, points)`: the values only, at an array of local `(x, z)` points (e.g. `Point2`) in m, in the shape of `points`

Keywords of `RegularGrid` (not of the readouts):

- `n = 100`: grid points per axis
- `crop_factor`: scales the automatic window around the hits; default `1` for rays (box around the hit points) and `3` for beamlets (three beam radii around each hit)
- `center = Centroid()` or `MinMax()`: how the automatic window is centered
- `x_min, x_max, z_min, z_max`: explicit window in local coordinates (m)
- `x0_shift, z0_shift`: shift the window
- `num_spots`: beamlet contour resolution used for the automatic limits

`progress = true` shows a progress bar in the terminal once the readout has run for
A given bound replaces only its own side of the automatic window.

`progress = true` (keyword of the readout) shows a progress bar in the terminal once the readout has run for
`get_progress_threshold()` s (default 5 s).

Local `(x, z)` form a left-handed frame with the normal, as seen by the incoming beam.
`intensity.(E)` turns a field matrix into `|E|²/(2Z₀)` per point (vacuum, not projected onto the detector); the irradiance on the detector, with `n` and `cos θ` of each hit, is `intensity(det)` or `intensity(det, xs, zs)`.
`intensity.(E)` turns a field matrix into `|E|²/(2Z₀)` per point (vacuum, not projected onto the detector); the irradiance on the detector, with `n` and `cos θ` of each hit, is `intensity(det)` or `intensity(det, RectilinearGrid(xs, zs))`.
Ray-based PSFs are not normalized: compare shapes and positions, not absolute Strehl values.

If nothing reaches the detector, readout throws "No hits available on detector."
2 changes: 1 addition & 1 deletion skills/beamletoptics/templates/03_psf_airy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ system = System([lens, det])
source = UniformDiscSource([0, -10mm, 0], [0, 1, 0], 15mm, λ; num_rays = 5000)
solve_system!(system, source)

x, z, I = intensity(det; n = 201, crop_factor = 10) # grid around the spot, I in W/m²
x, z, I = intensity(det, RegularGrid(n = 201, crop_factor = 10)) # grid around the spot, I in W/m²
imax = argmax(I)
println("peak at x = ", round(x[imax[1]] / µm; digits = 2), " µm, z = ",
round(z[imax[2]] / µm; digits = 2), " µm")
Expand Down
2 changes: 1 addition & 1 deletion src/BeamGroups/BeamGroups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ end
The fewest rays with which [`set_num_rays!`](@ref) regenerates the source `src`: `20 num_rings`
for ring sources, `1` for sunflower, line and fan sources, and `nothing` if the rays of `src` can
not be regenerated, e.g. a source built from given beams or any other beam or beam group. Also
defined for the [`BeamletOptics.AbstractSampling`](@ref) of a source.
defined for the [`BeamletOptics.AbstractSourceSampling`](@ref) of a source.
"""
min_num_rays(src) = nothing
min_num_rays(src::Union{CollimatedSource, PointSource}) = min_num_rays(src.sampling)
Expand Down
4 changes: 2 additions & 2 deletions src/BeamGroups/CollimatedSource.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mutable struct CollimatedSource{T, R <: AbstractRay{T}} <: AbstractBeamGroup{T,
diameter::T
center::Point3{T}
orientation::SMatrix{3, 3, T, 9}
sampling::AbstractSampling
sampling::AbstractSourceSampling
end

"""
Expand All @@ -45,7 +45,7 @@ CollimatedSource(beams::Vector{<:Beam}, diameter, pos, orientation::AbstractMatr
CollimatedSource(beams, diameter, pos, orientation, NoSampling())

function CollimatedSource(beams::Vector{Beam{T, R}}, diameter, pos, orientation::AbstractMatrix,
sampling::AbstractSampling) where {T, R <: AbstractRay{T}}
sampling::AbstractSourceSampling) where {T, R <: AbstractRay{T}}
_check_kinematic_members(beams)
return CollimatedSource{T, R}(beams, T(diameter), Point3{T}(pos), _check_orientation(orientation, T), sampling)
end
Expand Down
4 changes: 2 additions & 2 deletions src/BeamGroups/PointSource.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mutable struct PointSource{T, R <: AbstractRay{T}} <: AbstractBeamGroup{T, R}
NA::T
center::Point3{T}
orientation::SMatrix{3, 3, T, 9}
sampling::AbstractSampling
sampling::AbstractSourceSampling
end

"""
Expand All @@ -45,7 +45,7 @@ PointSource(beams::Vector{<:Beam}, NA, pos, orientation::AbstractMatrix) =
PointSource(beams, NA, pos, orientation, NoSampling())

function PointSource(beams::Vector{Beam{T, R}}, NA, pos, orientation::AbstractMatrix,
sampling::AbstractSampling) where {T, R <: AbstractRay{T}}
sampling::AbstractSourceSampling) where {T, R <: AbstractRay{T}}
_check_kinematic_members(beams)
return PointSource{T, R}(beams, T(NA), Point3{T}(pos), _check_orientation(orientation, T), sampling)
end
Expand Down
Loading
Loading