• 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/transfer-function-interface.jl
1
using InterfaceFunctions
2

3
"""
4
    TransferFunction
5
Super type for all transfer functions
6

7
A transfer function in microscopy is an object specifying the response in the image plane to the light coming from the
8
object plane.
9
There are several characteristics of a transfer functions which can influence the character of the response. Most
10
commonly we are concerned with its spatial variance/invariance, i.e. whether the response is dependent of the objects
11
position in the object plane, and linearity (which is almost always satisfied).
12

13
See also [`LinearShiftInvariantTransferFunction`](@ref), [`ImpulseResponseMapping`](@ref)
14
"""
15
abstract type TransferFunction{N} end
16

17
"""
18
    transfer(t::TransferFunction, A::SpatialMatrix)
19
The forward pass of the transfer function operator `t` on the image `A`.
20

21
See also [`restore`](@ref)
22
"""
23
@interface transfer(t::TransferFunction, ::SpatialMatrix{<:Real})
24

25
"""
26
    restore(t::TransferFunction, A::SpatialMatrix)
27
The reverse pass of the transfer function operator `t` on the image `A`.
28

29
It is always inherently an estimation because `A` is always noisy and `t` is often not well conditioned (especially in
30
the non-linear case).
31

32
See also [`transfer`](@ref)
33
"""
34
@interface restore(t::TransferFunction, ::SpatialMatrix{<:Real})
35

36
# NOTE: Taken from Distributions.jl <kunzaatko> 
37
for func in (:(==), :isequal, :isapprox)
UNCOV
38
    @eval function Base.$func(tf1::A, tf2::B; kwargs...) where {A<:TransferFunction,B<:TransferFunction}
×
UNCOV
39
        nameof(A) === nameof(B) || return false
×
UNCOV
40
        fields = fieldnames(A)
×
UNCOV
41
        fields === fieldnames(B) || return false
×
42

UNCOV
43
        for f in fields
×
UNCOV
44
            isdefined(tf1, f) && isdefined(tf2, f) || return false
×
45
            # perform equivalence check to support types that have no defined equality, such
46
            # as `missing`
UNCOV
47
            getfield(tf1, f) === getfield(tf2, f) || $func(getfield(tf1, f), getfield(tf2, f); kwargs...) || return false
×
UNCOV
48
        end
×
49

UNCOV
50
        return true
×
51
    end
52
end
53

54
# NOTE: Taken from Distributions.jl <kunzaatko> 
UNCOV
55
function Base.hash(tf::TransferFunction, h::UInt)
×
UNCOV
56
    hashed = hash(TransferFunction, h)
×
UNCOV
57
    hashed = hash(nameof(typeof(tf)), hashed)
×
58

UNCOV
59
    for f in fieldnames(typeof(tf))
×
UNCOV
60
        hashed = hash(getfield(tf, f), hashed)
×
UNCOV
61
    end
×
62

UNCOV
63
    return hashed
×
64
end
65

66
export transfer, restore
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