• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kunzaatko / TransferFunctions.jl / 17112291933

20 Aug 2025 10:56PM UTC coverage: 80.061%. Remained the same
17112291933

push

github

kunzaatko
fix(docs): Markdown format for bulletpoints

522 of 652 relevant lines covered (80.06%)

84949.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.0
/src/psf/point-spread-function.jl
1
using InterfaceFunctions
2

3
"""
4
    PointSpreadFunction{N} <: LinearShiftInvariantTransferFunction{N}
5
A point spread function is a description of a transfer functions specifying the intensity transfer of a single point
6
source in the object plane into a region of the image plane.
7

8
# Implementation
9
To create a new Point spread function (PSF) `A <: PointSpreadFunction`, you must define the __intensity__ at a given
10
[length](@extref Unitful `Length`) coordinate `intensity(psf::A, x::Length, y::Length)`.
11
"""
12
abstract type PointSpreadFunction{N} <: LinearShiftInvariantTransferFunction{N} end
13
Broadcast.broadcastable(tf::PointSpreadFunction) = Ref(tf)
40✔
14

15
"""
16
    PointSpreadFunctionSymmetry
17
A marker type that indicates the symmetries of a `PointSpreadFunction` which may lead to optimized methods.
18

19
Subtypes thus far include [`ZAxisRadialSymmetry`](@ref) and [`NoSymmetry`](@ref).
20
"""
21
abstract type PointSpreadFunctionSymmetry end
22
Broadcast.broadcastable(s::PointSpreadFunctionSymmetry) = Ref(s)
×
23

24
"""
25
    ZAxisRadialSymmetry <: PointSpreadFunctionSymmetry
26
``z`` axis radial symmetry of a `PointSpreadFunction` indicates that the PSF is symmetric in the radially around the
27
z-axis.
28
"""
29
struct ZAxisRadialSymmetry <: PointSpreadFunctionSymmetry end
178,708✔
30

31
"""
32
    NoSymmetry <: PointSpreadFunctionSymmetry
33
`NoSymmetry` marks a `PointSpreadFunction` that is not symmetric in any way. You need to compute every ``x``, ``y``,
34
``z`` coordinate separately. 
35
"""
36
struct NoSymmetry <: PointSpreadFunctionSymmetry end
4✔
37

38
"""
39
    symmtery(psf::PointSpreadFunction)
40
Marks the symmetries of a `PointSpreadFunction`.
41
"""
42
@interface symmetry(::PointSpreadFunction) = NoSymmetry()
×
43

44
"""
45
    intensity(psf::PointSpreadFunction, x::Length, y::Length)
46
The intensity of a `PSF` at a given location.
47
"""
48
@interface response(psf::PointSpreadFunction, args...) = response(symmetry(psf), psf, args...)
×
49
@inline response(::ZAxisRadialSymmetry, psf::PointSpreadFunction, x::Length, y::Length) = intensity(psf, hypot(x, y))
2,940✔
50
@inline response(::ZAxisRadialSymmetry, psf::PointSpreadFunction{3}, x::Length, y::Length, z::Length) = intensity(psf, hypot(x, y), z)
175,760✔
51
@inline response(::NoSymmetry, psf::PointSpreadFunction, x::Length, y::Length) = intensity(psf, x, y)
4✔
52
@inline response(::NoSymmetry, psf::PointSpreadFunction{3}, x::Length, y::Length, z::Length) = intensity(psf, x, y, z)
×
53

54
"""
55
    PSFModel <: PointSpreadFunction 
56
`PointSpreadFunction` subtype for PSF models. A `PSF` model is a `PointSpreadFunction` that has parameters accessible
57
through [`params`](@ref) and can be fitted to data.
58
"""
59
abstract type PSFModel{N} <: PointSpreadFunction{N} end
60

61
include("methods.jl")
62

63
# Augmentations
64
include("./types/rotated-psf.jl")
65
include("./types/scaled-psf.jl")
66

67
# Models
68
include("./types/airy-disc.jl")
69
include("./types/gaussian.jl")
70

71
# TODO: Fix these models <20-08-25> 
72
include("./types/gibson-lanni.jl")
73
include("./types/born-wolf.jl")
74

75
include("./types/psf-array.jl")
76

77
include("./estimation.jl")
78

79
export response, psf
80
export BornWolf, GibsonLanni, PSFArray
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc