Skip to content

Commit

Permalink
Update yml, docs/make, LazyGrids v1 (#65)
Browse files Browse the repository at this point in the history
* Add docstring

* Synchronize yml

* Standardize make

* Compat LazyGrids v1

* Add _typos
  • Loading branch information
JeffFessler authored May 14, 2024
1 parent b242370 commit ec86c79
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 10 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Spell Check

on: [pull_request]

jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@master
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
FFTW = "1.4.5, 1.5"
ImageGeoms = "0.9, 0.10"
Interpolations = "0.14, 0.15"
LazyGrids = "0.4, 0.5"
LazyGrids = "0.4, 0.5, 1"
Requires = "1.3"
julia = "1.10"
4 changes: 4 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[default]
extend-ignore-identifiers-re = [
"iy",
]
10 changes: 5 additions & 5 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ execute = isempty(ARGS) || ARGS[1] == "run"

org, reps = :JuliaImageRecon, :Sinograms
eval(:(using $reps))
using Documenter
using Literate
import Documenter
import Literate

# https://juliadocs.github.io/Documenter.jl/stable/man/syntax/#@example-block
ENV["GKSwstype"] = "100"
Expand All @@ -23,7 +23,7 @@ binder_root_url =


repo = eval(:($reps))
DocMeta.setdocmeta!(repo, :DocTestSetup, :(using $reps; import $reps); recursive=true)
Documenter.DocMeta.setdocmeta!(repo, :DocTestSetup, :(using $reps); recursive=true)

# preprocessing
inc1 = "include(\"../../../inc/reproduce.jl\")"
Expand Down Expand Up @@ -77,7 +77,7 @@ format = Documenter.HTML(;
assets = ["assets/custom.css"],
)

makedocs(;
Documenter.makedocs(;
modules = [repo],
authors = "Jeff Fessler and contributors",
sitename = "$repo.jl",
Expand All @@ -90,7 +90,7 @@ makedocs(;
)

if isci
deploydocs(;
Documenter.deploydocs(;
repo = "github.com/$base",
devbranch = "main",
devurl = "dev",
Expand Down
20 changes: 16 additions & 4 deletions src/geom/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,29 @@ typically degrees.
angles(rg::RayGeom) =
range(rg.orbit_start, length = rg.na, step = rg.orbit / rg.na)

# angles in radians
"""
_ar(rg::RayGeom)
Angles in radians.
"""
_ar(rg::RayGeom) = to_radians(angles(rg))

# minimum orbit for a fan-beam short scan
"""
_orbit_short(rg::RayGeom)
Minimum orbit for a fan-beam short scan.
"""
_orbit_short(rg::RayGeom) = 180 + 2 * rad2deg(_gamma_max(rg)) # (degrees)

# distance from detector arc focal spot to source for fan-beam
"""
_dfs(::Union{SinoFan,CtFan})
Distance from detector arc focal spot to source for fan-beam.
"""
_dfs(::Union{SinoFanArc{Td},CtFanArc{Td}}) where Td = zero(Td)
_dfs(::Union{SinoFanFlat{Td},CtFanFlat{Td}}) where Td = Inf * oneunit(Td)

# distance from source to origin for fan-beam
"""
_dso(rg::Union{SinoFan,CtFan}) = rg.dsd - rg.dod
Distance from source to origin for fan-beam.
"""
_dso(rg::Union{SinoFan,CtFan}) = rg.dsd - rg.dod

"""
Expand Down

0 comments on commit ec86c79

Please sign in to comment.