-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from MagneticParticleImaging/nh/solverUpdate
Update RegLS Interface to allow for different solvers than Kaczmarz
- Loading branch information
Showing
15 changed files
with
96 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "MPIReco" | ||
uuid = "e4246700-6248-511e-8146-a1d1f47669d2" | ||
authors = ["Tobias Knopp <[email protected]>"] | ||
version = "0.5.3" | ||
version = "0.5.4" | ||
|
||
[deps] | ||
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2" | ||
|
@@ -34,7 +34,7 @@ IniFile = "0.5" | |
LinearAlgebra = "1" | ||
LinearOperators = "2.3.3" | ||
LinearOperatorCollection = "1.2" | ||
MPIFiles = "0.13, 0.14, 0.15" | ||
MPIFiles = "0.13, 0.14, 0.15, 0.16" | ||
ProgressMeter = "1.2" | ||
Reexport = "1.0" | ||
RegularizedLeastSquares = "0.14" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using MPIReco | ||
|
||
@testset "Different Solver Reconstructions" begin | ||
bSF = MPIFile(joinpath(datadir, "calibrations", "12.mdf")) | ||
b = MPIFile(joinpath(datadir, "measurements", "20211226_203916_MultiPatch", "1.mdf")) | ||
names = (:color, :x, :y, :z, :time) | ||
values = (1:1, | ||
-27.375u"mm":1.25u"mm":11.375u"mm", | ||
-11.375u"mm":1.25u"mm":27.375u"mm", | ||
0.0u"mm":1.0u"mm":0.0u"mm", | ||
0.0u"ms":0.6528u"ms":0.0u"ms") | ||
|
||
# standard reconstruction | ||
plan = getPlan("Single") | ||
plan.parameter.reco.solverParams = RecoPlan(ElaborateSolverParameters) | ||
setAll!(plan, :SNRThresh, 5) | ||
setAll!(plan, :frames, 1:1) | ||
setAll!(plan, :minFreq, 80e3), | ||
setAll!(plan, :recChannels, 1:2) | ||
setAll!(plan, :spectralLeakageCorrection, true) | ||
setAll!(plan, :sf, bSF) | ||
setAll!(plan, :gridding, SystemMatrixGriddingParameter(;gridsize=calibSize(bSF), fov = calibFov(bSF))) | ||
setAll!(plan, :weightingParams, WhiteningWeightingParameters(whiteningMeas = bSF)) | ||
|
||
|
||
setAll!(plan, :reg, [L2Regularization(0.1f0)]) | ||
setAll!(plan, :iterations, 100) | ||
|
||
for solver in [Kaczmarz, CGNR, FISTA, OptISTA, POGM] # , ADMM, SplitBregman] | ||
setAll!(plan, :solver, solver) | ||
setAll!(plan, :rho, 0.3f0) | ||
c = reconstruct(build(plan), b) | ||
@test axisnames(c) == names | ||
@test axisvalues(c) == values | ||
exportImage(joinpath(imgdir, "Solver_$solver.png"), Array(c[1,:,:,1,1])) | ||
@test compareImg("Solver_$solver.png") | ||
end | ||
|
||
end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a5d1138
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
a5d1138
There was a problem hiding this comment.
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/108029
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
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: