Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Missed some occurrences of OpticalSystem which should be changed to AbstractOpticalSystem #142

Merged
merged 2 commits into from
Apr 23, 2021
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
4 changes: 2 additions & 2 deletions docs/src/systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Geometry/Primitives/NonCSG/Ellipse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions src/Geometry/Primitives/NonCSG/Rectangle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Geometry/Primitives/SphericalCap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/Optical/HierarchicalImage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/Vis/Visualization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down