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

kunzaatko / TransferFunctions.jl / 17100492288

20 Aug 2025 01:52PM UTC coverage: 0.0% (-74.8%) from 74.77%
17100492288

push

github

kunzaatko
feat: introduce comprehensive transfer function models

This commit significantly expands the available transfer function models and
refactors the documentation structure to support them.

Changes include:
- **New Models:** Added Airy Disc, Gaussian, Born & Wolf, Gibson & Lanni, and
  Circular Pupil transfer function models.
- **Documentation Overhaul:** Restructured the manual pages, separating linear
  and nonlinear transfer functions, and creating dedicated sections for
  individual model types. Updated `InterLinks` for new dependencies and removed
  old API reference sections.
- **Dependency Updates:**
    - Added `ComponentArrays` and `Rotations` for new functionalities.
    - Removed `ImageFiltering` dependency.
    - Updated `InterfaceFunctions` compatibility.

0 of 169 new or added lines in 12 files covered. (0.0%)

364 existing lines in 15 files now uncovered.

0 of 633 relevant lines covered (0.0%)

0.0 hits per line

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

0.0
/src/psf/point-spread-function.jl
1
using InterfaceFunctions
2
using Roots
3
using Base: Fix
4
using TransferFunctions.Apodization
5

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

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

18
"""
19
    PointSpreadFunctionSymmetry
20
A marker type that indicates the symmetries of a `PointSpreadFunction` which may lead to optimized methods.
21

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

27
"""
28
    ZAxisRadialSymmetry <: PointSpreadFunctionSymmetry
29
``z`` axis radial symmetry of a `PointSpreadFunction` indicates that the PSF is symmetric in the radially around the
30
z-axis.
31
"""
32
struct ZAxisRadialSymmetry <: PointSpreadFunctionSymmetry end
33

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

41
"""
42
    symmtery(psf::PointSpreadFunction)
43
Marks the symmetries of a `PointSpreadFunction`.
44
"""
NEW
45
@interface symmetry(::PointSpreadFunction) = NoSymmetry()
×
46

47
"""
48
    intensity(psf::PointSpreadFunction, x::Length, y::Length)
49
The intensity of a `PSF` at a given location.
50
"""
NEW
51
@interface response(psf::PointSpreadFunction, args...) = response(symmetry(psf), psf, args...)
×
NEW
52
@inline response(::ZAxisRadialSymmetry, psf::PointSpreadFunction, x::Length, y::Length) = intensity(psf, hypot(x, y))
×
NEW
53
@inline response(::ZAxisRadialSymmetry, psf::PointSpreadFunction, x::Length, y::Length, z::Length) = intensity(psf, hypot(x, y), z)
×
NEW
54
@inline response(::NoSymmetry, psf::PointSpreadFunction, x::Length, y::Length) = intensity(psf, x, y)
×
NEW
55
@inline response(::NoSymmetry, psf::PointSpreadFunction, x::Length, y::Length, z::Length) = intensity(psf, x, y, z)
×
56

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

64
include("methods.jl")
65

66
# Augmentations
67
include("./rotated-psf.jl")
68
include("./scaled-psf.jl")
69

70
include("./psf-array.jl")
71

72
# Models
73
include("./models/airy-disc.jl")
74
include("./models/gaussian.jl")
75

76
include("./models/gibson-lanni.jl")
77
include("./models/born-wolf.jl")
78

79

80
include("./estimation.jl")
81

82
export response, psf
83
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