From ec86c7976c3428fb1e925dfc2cc86184badd329e Mon Sep 17 00:00:00 2001 From: Jeff Fessler Date: Tue, 14 May 2024 09:00:24 -0400 Subject: [PATCH] Update yml, docs/make, LazyGrids v1 (#65) * Add docstring * Synchronize yml * Standardize make * Compat LazyGrids v1 * Add _typos --- .github/workflows/SpellCheck.yml | 13 +++++++++++++ Project.toml | 2 +- _typos.toml | 4 ++++ docs/make.jl | 10 +++++----- src/geom/common.jl | 20 ++++++++++++++++---- 5 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/SpellCheck.yml create mode 100644 _typos.toml diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml new file mode 100644 index 0000000..c344f6d --- /dev/null +++ b/.github/workflows/SpellCheck.yml @@ -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 diff --git a/Project.toml b/Project.toml index 78a7b50..8aafee7 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000..75d25c4 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,4 @@ +[default] +extend-ignore-identifiers-re = [ + "iy", +] diff --git a/docs/make.jl b/docs/make.jl index 905b408..ca3cf25 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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" @@ -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\")" @@ -77,7 +77,7 @@ format = Documenter.HTML(; assets = ["assets/custom.css"], ) -makedocs(; +Documenter.makedocs(; modules = [repo], authors = "Jeff Fessler and contributors", sitename = "$repo.jl", @@ -90,7 +90,7 @@ makedocs(; ) if isci - deploydocs(; + Documenter.deploydocs(; repo = "github.com/$base", devbranch = "main", devurl = "dev", diff --git a/src/geom/common.jl b/src/geom/common.jl index fc60bfe..b279b71 100644 --- a/src/geom/common.jl +++ b/src/geom/common.jl @@ -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 """