Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Uwe Hernandez Acosta <szabo137@users.noreply.github.com>
  • Loading branch information
AntonReinhard and szabo137 authored Jun 21, 2024
1 parent 6f35b7e commit 4a30308
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ using QEDbase

#DocMeta.setdocmeta!(QEDbase, :DocTestSetup, :(using QEDbase); recursive=true)

# TODO: remove before release
Pkg.add(; url="https://github.com/QEDjl-project/QEDcore.jl", rev="dev")

using DocumenterCitations
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/process.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ to enable the calculation of total probabilities and cross sections.
"""
abstract type AbstractProcessDefinition end

# broadcast every model as a scalar
# broadcast every process as a scalar
Broadcast.broadcastable(proc::AbstractProcessDefinition) = Ref(proc)

"""
Expand Down
24 changes: 12 additions & 12 deletions src/particles/spin_pol.jl
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
"""
Abstract base type for the spin or polarization of [`is_fermion`](@ref) or [`is_boson`](@ref) particles, respectively.
Abstract base type for the spin or polarization of particles with [`is_fermion`](@ref) or [`is_boson`](@ref), respectively.
"""
abstract type AbstractSpinOrPolarization end
Base.broadcastable(spin_or_pol::AbstractSpinOrPolarization) = Ref(spin_or_pol)

"""
Abstract base type for the spin of [`is_fermion`](@ref) particles.
Abstract base type for the spin of particles with [`is_fermion`](@ref).
"""
abstract type AbstractSpin <: AbstractSpinOrPolarization end

"""
Abstract base type for definite spins of [`is_fermion`](@ref) particles.
Abstract base type for definite spins of particles with [`is_fermion`](@ref).
Concrete types are [`SpinUp`](@ref) and [`SpinDown`](@ref).
"""
abstract type AbstractDefiniteSpin <: AbstractSpin end

"""
Abstract base type for indefinite spins of [`is_fermion`](@ref) particles.
Abstract base type for indefinite spins of particles with [`is_fermion`](@ref).
One concrete type is [`AllSpin`](@ref).
"""
abstract type AbstractIndefiniteSpin <: AbstractSpin end

"""
Concrete type indicating that an [`is_fermion`](@ref) particle has spin-up.
Concrete type indicating that a particle with [`is_fermion`](@ref) has spin-up.
```jldoctest
julia> using QEDbase
Expand All @@ -37,7 +37,7 @@ struct SpinUp <: AbstractDefiniteSpin end
Base.show(io::IO, ::SpinUp) = print(io, "spin up")

"""
Concrete type indicating that an [`is_fermion`](@ref) particle has spin-down.
Concrete type indicating that a particle with [`is_fermion`](@ref) has spin-down.
```jldoctest
julia> using QEDbase
Expand Down Expand Up @@ -77,19 +77,19 @@ _spin_index(::SpinUp) = 1
_spin_index(::SpinDown) = 2

"""
Abstract base type for the polarization of [`is_boson`](@ref) particles.
Abstract base type for the polarization of particles with [`is_boson`](@ref).
"""
abstract type AbstractPolarization <: AbstractSpinOrPolarization end

"""
Abstract base type for definite polarizations of [`is_boson`](@ref) particles.
Abstract base type for definite polarization of particles with [`is_boson`](@ref).
Concrete types are [`PolarizationX`](@ref) and [`PolarizationY`](@ref).
"""
abstract type AbstractDefinitePolarization <: AbstractPolarization end

"""
Abstract base type for indefinite polarizations of [`is_boson`](@ref) particles.
Abstract base type for indefinite polarization of particles with [`is_boson`](@ref).
One concrete type is [`AllPolarization`](@ref).
"""
Expand Down Expand Up @@ -133,7 +133,7 @@ x-polarized
!!! note "Coordinate axes"
The notion of axes, e.g. ``x``- and ``y``-direction is just to distinguish two orthogonal polarization directions.
However, if the three-momentum of the [`is_boson`](@ref) particle is aligned to the ``z``-axis of a coordinate system, the polarization axes define the ``x``- or ``y``-axis, respectively.
However, if the three-momentum of the particle with [`is_boson`](@ref) is aligned to the ``z``-axis of a coordinate system, the polarization axes define the ``x``- or ``y``-axis, respectively.
!!! info "Alias"
Expand All @@ -150,7 +150,7 @@ const PolX = PolarizationX
Base.show(io::IO, ::PolX) = print(io, "x-polarized")

"""
Concrete type which indicates, that an [`is_boson`](@ref) particle has polarization in ``y``-direction.
Concrete type which indicates, that a particle with [`is_boson`](@ref) has polarization in ``y``-direction.
```jldoctest
julia> using QEDbase
Expand All @@ -162,7 +162,7 @@ y-polarized
!!! note "Coordinate axes"
The notion of axes, e.g. ``x``- and ``y``-direction is just to distinguish two orthogonal polarization directions.
However, if the three-momentum of the [`is_boson`](@ref) particle is aligned to the ``z``-axis of a coordinate system, the polarization axes define the ``x``- or ``y``-axis, respectively.
However, if the three-momentum of the particle with [`is_boson`](@ref) is aligned to the ``z``-axis of a coordinate system, the polarization axes define the ``x``- or ``y``-axis, respectively.
!!! info "Alias"
Expand Down

0 comments on commit 4a30308

Please sign in to comment.