Skip to content

Commit

Permalink
fix angle orientation for cube injection
Browse files Browse the repository at this point in the history
  • Loading branch information
mileslucas committed Feb 15, 2022
1 parent 6ac4f24 commit f57929d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "HCIToolbox"
uuid = "b6cd55e5-4d02-4e12-b82c-005f67e784bf"
authors = ["Miles Lucas <mdlucas@hawaii.edu>"]
version = "0.6.1"
version = "0.6.2"

[deps]
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
Expand Down
56 changes: 28 additions & 28 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ version = "1.1.1"

[[ArrayInterface]]
deps = ["Compat", "IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"]
git-tree-sha1 = "1bdcc02836402d104a46f7843b6e6730b1948264"
git-tree-sha1 = "745233d77146ad221629590b6d82fe7f1ddb478f"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "4.0.2"
version = "4.0.3"

[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand Down Expand Up @@ -89,9 +89,9 @@ version = "0.1.2"

[[ColorSchemes]]
deps = ["ColorTypes", "Colors", "FixedPointNumbers", "Random"]
git-tree-sha1 = "6b6f04f93710c71550ec7e16b650c1b9a612d0b6"
git-tree-sha1 = "12fc73e5e0af68ad3137b886e3f7c1eacfca2640"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.16.0"
version = "3.17.1"

[[ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
Expand Down Expand Up @@ -244,15 +244,15 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"

[[FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "8756f9935b7ccc9064c6eef0bff0ad643df733a3"
git-tree-sha1 = "deed294cde3de20ae0b2e0355a6c4e1c6a5ceffc"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.12.7"
version = "0.12.8"

[[FiniteDiff]]
deps = ["ArrayInterface", "LinearAlgebra", "Requires", "SparseArrays", "StaticArrays"]
git-tree-sha1 = "6eae72e9943d8992d14359c32aed5f892bda1569"
git-tree-sha1 = "ec299fdc8f49ae450807b0cb1d161c6b76fd2b60"
uuid = "6a86dc24-6348-571c-b903-95158fe2bd41"
version = "2.10.0"
version = "2.10.1"

[[FixedPointNumbers]]
deps = ["Statistics"]
Expand Down Expand Up @@ -350,10 +350,10 @@ uuid = "1893dc6a-5236-4cb8-aa54-62ea411c10cd"
version = "0.3.0"

[[HCIToolbox]]
deps = ["CoordinateTransformations", "FillArrays", "ImageTransformations", "Interpolations", "LinearAlgebra", "PaddedViews", "Rotations", "SpecialFunctions", "StaticArrays", "Statistics"]
deps = ["CoordinateTransformations", "FillArrays", "ImageTransformations", "Interpolations", "LinearAlgebra", "PaddedViews", "Rotations", "SpecialFunctions", "StaticArrays", "Statistics", "StatsBase"]
path = ".."
uuid = "b6cd55e5-4d02-4e12-b82c-005f67e784bf"
version = "0.6.0"
version = "0.6.2"

[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"]
Expand Down Expand Up @@ -441,15 +441,15 @@ version = "1.4.1"

[[JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "8076680b162ada2a031f707ac7b4953e30667a37"
git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.2"
version = "0.21.3"

[[JpegTurbo_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "d735490ac75c5cb9f1b00d8b5509c11984dc6943"
git-tree-sha1 = "b53380851c6e6664204efb2e62cd24fa5c47e4ba"
uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8"
version = "2.1.0+0"
version = "2.1.2+0"

[[KeywordCalls]]
deps = ["Compat", "Tricks"]
Expand Down Expand Up @@ -711,9 +711,9 @@ version = "0.12.3"

[[Parsers]]
deps = ["Dates"]
git-tree-sha1 = "0b5cfbb704034b5b4c1869e36634438a047df065"
git-tree-sha1 = "13468f237353112a01b2d6b32f3d0f80219944aa"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.2.1"
version = "2.2.2"

[[Pixman_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
Expand All @@ -740,9 +740,9 @@ version = "1.1.3"

[[Plots]]
deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "Unzip"]
git-tree-sha1 = "7e4920a7d4323b8ffc3db184580598450bde8a8e"
git-tree-sha1 = "1d0a11654dbde41dc437d6733b68ce4b28fbe866"
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
version = "1.25.7"
version = "1.25.9"

[[PositiveFactorizations]]
deps = ["LinearAlgebra"]
Expand Down Expand Up @@ -858,9 +858,9 @@ uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[SpecialFunctions]]
deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"]
git-tree-sha1 = "a4116accb1c84f0a8e1b9932d873654942b2364b"
git-tree-sha1 = "8d0c8e3d0ff211d9ff4a0c2307d876c99d10bdf1"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "2.1.1"
version = "2.1.2"

[[StackViews]]
deps = ["OffsetArrays"]
Expand All @@ -870,15 +870,15 @@ version = "0.1.1"

[[Static]]
deps = ["IfElse"]
git-tree-sha1 = "d4da8b728580709d736704764e55d6ef38cb7c87"
git-tree-sha1 = "00b725fffc9a7e9aac8850e4ed75b4c1acbe8cd2"
uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
version = "0.5.3"
version = "0.5.5"

[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "a635a9333989a094bddc9f940c04c549cd66afcf"
git-tree-sha1 = "95c6a5d0e8c69555842fc4a927fc485040ccc31c"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.3.4"
version = "1.3.5"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
Expand All @@ -891,9 +891,9 @@ version = "1.2.0"

[[StatsBase]]
deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
git-tree-sha1 = "51383f2d367eb3b444c961d485c565e4c0cf4ba0"
git-tree-sha1 = "118e8411d506d583fbbcf4f3a0e3c5a9e83370b8"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.33.14"
version = "0.33.15"

[[StructArrays]]
deps = ["Adapt", "DataAPI", "StaticArrays", "Tables"]
Expand Down Expand Up @@ -1129,9 +1129,9 @@ version = "1.2.12+1"

[[Zstd_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "cc4bf3fdde8b7e3e9fa0351bdeedba1cf3b7f6e6"
git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927"
uuid = "3161d3a3-bdf6-5164-811a-617609db77b4"
version = "1.5.0+0"
version = "1.5.2+0"

[[libass_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
Expand Down
6 changes: 3 additions & 3 deletions src/inject.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ function inject!(frame::AbstractMatrix, kernel::AbstractMatrix{T}, args...; degr
return inject!(frame, etp, args...; kwargs...)
end

function inject!(frame::AbstractMatrix{T}, kernel::AbstractExtrapolation, angle=0; x, y, amp=one(T), center=center(frame), inds=CartesianIndices(frame)) where T
function inject!(frame::AbstractMatrix{T}, kernel::AbstractExtrapolation, angle=0; x, y, amp=one(T), center=center(frame), inds=CartesianIndices(frame), kwargs...) where T
if iszero(angle)
idxmap = identity
else
idxmap = recenter(RotMatrix{2}(-deg2rad(angle)), center)
idxmap = recenter(RotMatrix{2}(deg2rad(angle)), center)
end
tform = Translation(ImageTransformations.center(kernel) .- (x, y)) idxmap
@inbounds for idx in inds
Expand All @@ -88,7 +88,7 @@ function inject!(frame::AbstractMatrix{T}, psfmodel, angle=0; center=center(fram
if iszero(angle)
idxmap = identity
else
idxmap = recenter(RotMatrix{2}(-deg2rad(angle)), center)
idxmap = recenter(RotMatrix{2}(deg2rad(angle)), center)
end
@inbounds for idx in inds
point = idxmap(SVector(idx.I))
Expand Down

4 comments on commit f57929d

@mileslucas
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/54660

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.2 -m "<description of version>" f57929d85927a257e512c4268dbc05d5feb2e9c6
git push origin v0.6.2

@mileslucas
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/54660

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.2 -m "<description of version>" f57929d85927a257e512c4268dbc05d5feb2e9c6
git push origin v0.6.2

Please sign in to comment.