From 06393e921289351a01e71c8f2894dd380456ec59 Mon Sep 17 00:00:00 2001 From: BrianGun Date: Thu, 22 Apr 2021 13:40:12 -0700 Subject: [PATCH] Missed some occurrences of OpticalSystem which should be changed to AbstractOpticalSystem Fixes #138 --- docs/src/systems.md | 4 ++-- src/Geometry/Primitives/NonCSG/Ellipse.jl | 2 +- src/Geometry/Primitives/NonCSG/Rectangle.jl | 4 ++-- src/Geometry/Primitives/SphericalCap.jl | 2 +- src/Optical/HierarchicalImage.jl | 2 +- src/Vis/Visualization.jl | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/src/systems.md b/docs/src/systems.md index 1a42339d8..ea918a12a 100644 --- a/docs/src/systems.md +++ b/docs/src/systems.md @@ -20,10 +20,10 @@ OpticSim.sum! ## Systems -There are two types of `OpticalSystem` which can be used depending on the requirements. +There are two types of `AbstractOpticalSystem` which can be used depending on the requirements. ```@docs -OpticalSystem +AbstractOpticalSystem CSGOpticalSystem AxisymmetricOpticalSystem temperature diff --git a/src/Geometry/Primitives/NonCSG/Ellipse.jl b/src/Geometry/Primitives/NonCSG/Ellipse.jl index c47cab299..e86db6d4a 100644 --- a/src/Geometry/Primitives/NonCSG/Ellipse.jl +++ b/src/Geometry/Primitives/NonCSG/Ellipse.jl @@ -9,7 +9,7 @@ Elliptical surface, not a valid CSG object. The rotation of the rectangle around its normal is defined by `rotationvec`. `rotationvec×surfacenormal` is taken as the vector along the u axis. -**Can be used as a detector in [`OpticalSystem`](@ref)s.** +**Can be used as a detector in [`AbstractOpticalSystem`](@ref)s.** ```julia Ellipse(halfsizeu::T, halfsizev::T, [surfacenormal::SVector{3,T}, centrepoint::SVector{3,T}]; interface::NullOrFresnel{T} = nullinterface(T)) diff --git a/src/Geometry/Primitives/NonCSG/Rectangle.jl b/src/Geometry/Primitives/NonCSG/Rectangle.jl index 2de3c522b..881dba56f 100644 --- a/src/Geometry/Primitives/NonCSG/Rectangle.jl +++ b/src/Geometry/Primitives/NonCSG/Rectangle.jl @@ -9,7 +9,7 @@ Rectangular surface, not a valid CSG object. The rotation of the rectangle around its normal is defined by `rotationvec`. `rotationvec×surfacenormal` is taken as the vector along the u axis. -**Can be used as a detector in [`OpticalSystem`](@ref)s.** +**Can be used as a detector in [`AbstractOpticalSystem`](@ref)s.** ```julia Rectangle(halfsizeu::T, halfsizev::T, [surfacenormal::SVector{3,T}, centrepoint::SVector{3,T}]; rotationvec::SVector{3,T} = [0.0, 1.0, 0.0], interface::NullOrFresnel{T} = nullinterface(T)) @@ -73,7 +73,7 @@ onsurface(a::Rectangle{T}, point::SVector{3,T}) where {T<:Real} = onsurface(a.pl Converts a uvcoordinate on `surf` to an integer index to a pixel in an image of size `imsize`. Not implemented on all `Surface` objects. -Used to determine where in the detector image a ray has hit when in intersects the detector surface of an [`OpticalSystem`](@ref). +Used to determine where in the detector image a ray has hit when in intersects the detector surface of an [`AbstractOpticalSystem`](@ref). """ function uvtopix(::Rectangle{T}, uv::SVector{2,T}, imsize::Tuple{Int,Int}) where {T<:Real} u, v = uv diff --git a/src/Geometry/Primitives/SphericalCap.jl b/src/Geometry/Primitives/SphericalCap.jl index 19c48715d..dde0d95c8 100644 --- a/src/Geometry/Primitives/SphericalCap.jl +++ b/src/Geometry/Primitives/SphericalCap.jl @@ -9,7 +9,7 @@ Spherical cap surface, creates a half-space which is essentially the subtraction Only the spherical cap itself is visualized, not the plane. The positive normal side is outside the surface. -**Can be used as a detector in [`OpticalSystem`](@ref)s.** +**Can be used as a detector in [`AbstractOpticalSystem`](@ref)s.** ```julia SphericalCap(radius::T, ϕmax::T, [surfacenormal::SVector{3,T}, centrepoint::SVector{3,T}]; interface::NullOrFresnel{T} = nullinterface(T)) diff --git a/src/Optical/HierarchicalImage.jl b/src/Optical/HierarchicalImage.jl index 6777e63c4..7ed331f5c 100644 --- a/src/Optical/HierarchicalImage.jl +++ b/src/Optical/HierarchicalImage.jl @@ -9,7 +9,7 @@ import Base: setindex!, getindex Image type which dynamically allocated memory for pixels when their value is set, the value of unset pixels is assumed to be zero. -This is used for the detector image of [`OpticalSystem`](@ref)s which can typically be very high resolution, but often have a large proportion of the image blank. +This is used for the detector image of [`AbstractOpticalSystem`](@ref)s which can typically be very high resolution, but often have a large proportion of the image blank. """ struct HierarchicalImage{T<:Number} <: AbstractArray{T,2} #allow for complex values. May want to expand this even further to allow more complicated detector image types toplevel::Array{Array{T,2},2} diff --git a/src/Vis/Visualization.jl b/src/Vis/Visualization.jl index 485c012bd..01de86f3a 100644 --- a/src/Vis/Visualization.jl +++ b/src/Vis/Visualization.jl @@ -421,7 +421,7 @@ end """ draw!(scene::MakieLayout.LScene, sys::AbstractOpticalSystem; kwargs...) -Draw each element in the lens assembly of an [`OpticalSystem`](@ref), with each element automatically colored differently, as well as the detector of the system. +Draw each element in the lens assembly of an [`AbstractOpticalSystem`](@ref), with each element automatically colored differently, as well as the detector of the system. """ function draw!(scene::MakieLayout.LScene, sys::CSGOpticalSystem{T}; kwargs...) where {T<:Real} draw!(scene, sys.assembly; kwargs...)