-
Notifications
You must be signed in to change notification settings - Fork 30
Scanner object considering multiple coils #548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Stockless
wants to merge
204
commits into
master
Choose a base branch
from
scanner-develop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 6 commits
Commits
Show all changes
204 commits
Select commit
Hold shift + click to select a range
e7490cf
Coil-sens on Scanner
cncastillo 8470a70
Delete unintended and unnecesary elements
Stockless be1d62b
coil_sens removal from Phantom structure
Stockless 4dbf3d1
remove unnecesary example file, remove unnecesary packages call and …
Stockless 821f765
add a get_n_coils function, re-add KomaMRI subpackages to KomaMRI [co…
Stockless 71c20e3
remove sphere_fields.mat
Stockless 766cb48
redefined get_n_coils function: 1 for abstract type and size of coil …
Stockless 1e6a65d
Merge branch 'master' into scanner-develop
cncastillo ddb81c8
Correction of Scanner argument at run_spin_precession functions
Stockless bbee076
adding specific dispatch for CPU
Stockless 033fef8
Using intended acquire_signal for BlochCPU (not working on multiple c…
Stockless 627d81d
Fixed BlochCPU with multiple coils
Stockless 9fa397a
add setpropery to directly define hardware limitations on the scanner…
Stockless bbbb559
remove type conversion and using HardwareLimitations as Float
Stockless dbe6175
Fix sys.Smax to be Float in KomaMRICore/runtest
Stockless 6c92be7
admission of ArbitraryRFCoils simulation without interpolation (only …
Stockless 47bc15c
Moved coils_sens interpolation to SimulatorCore
Stockless 63750c4
Fix sys::Scanner -> sys::Scanner{T}
Stockless add1344
Interpolation Incorporation
Stockless 36313f2
add coil_sens view
Stockless 2b35082
initialize interpolated_coil_sens with similar()
Stockless fab91dd
simulate with interpolation (reconstruction missing)
Stockless 7e61fba
re-organize coils definition example
Stockless 5bec3cf
change coil_sens_recon
Stockless b84c69a
Modified `center-images.css` to avoid centering badges.
cncastillo a0ca145
restrict PlutoPlotly to version 0.5
Stockless afeed97
trivial change to test documentation
Stockless f3594b9
bump KomaMRIPlots to version 0.9.2
Stockless 0a5dcd3
Notebook Update
Stockless fea5f52
hide reproducibility raw md text
Stockless 15ab1fc
update Bloch_RF_accuracy test to use DiffEq instead of pre-calculated…
Stockless 4c1adb0
delete debugging test
Stockless f40e515
Bloch_RF_accuracy NRMSE improve to be > 0.1
Stockless 0ba68b7
rm println
Stockless ce1b266
Bump julia-actions/julia-format from 3 to 4
dependabot[bot] 953bfdd
Initial commit
rkierulf 0579294
add -g2 to AMD and CUDA tests to see error
rkierulf da4926e
synchronize immediately after kernels finish
rkierulf 31ced37
change synchronization back
rkierulf a5e3037
remove -g2
rkierulf bec150d
fix sequence indexing issue
rkierulf 7c43608
Adapt to KernelAbstractions 0.9.34 + clean up code
rkierulf 38f1e5b
Use shuffle_down intrinsic for faster reduction
rkierulf 004eb5e
Fix typo
rkierulf 965126c
fix warp reduction
rkierulf 8fd6a8c
change default precession groupsize to 256
rkierulf be83906
Is warp reduction actually faster?
rkierulf 0ff4f04
Continue using warp reduction
rkierulf 50a8310
Update docs
rkierulf 99942be
Debug AMDGPU error
rkierulf 2a64124
Undo debug statements skip benchmarks skip ci
rkierulf 6e45beb
Temporarily add HIP_LAUNCH_BLOCKING
rkierulf d6efa82
Print matrix values skip benchmarks
rkierulf 3dc5f22
Remove suppress
rkierulf b5e9ed0
Remove debug statements skip benchmarks skip ci
rkierulf c4fe53e
Update Phantom use on examples
Stockless b71bc79
Update Phantom use on tests
Stockless e6d561f
Update Phantom use on definitions (UI,Base,Core)
Stockless 7287de3
add tags to PR
Stockless a6dfc99
Remove Kaleido_jll compat entry
cncastillo a99b2b5
Add "How to test contributions" in "How to contribute to Koma" docume…
Stockless 003cd3e
Instructions less verbose
Stockless 97bdcf0
How to add a new test
Stockless fa4245c
Redaction corrections
Stockless f878028
julia code block correction
Stockless 4dfb553
Generate preview
Stockless 9a2e781
Corrected redaction according to review
Stockless 9e397f4
Improve test-komamricore image resolution
Stockless e57f73d
Improved redaction based on review
Stockless 93cb77d
add space after images
Stockless 1268ec2
Remove unnecesary itemization
Stockless 52f35ec
Remove CSS specification to generate space after image
Stockless deb36b2
First commit
pvillacorta 513ab04
Commit of the following:
pvillacorta fb7375b
Commit of the following:
pvillacorta 17fc909
Solve bugs:
pvillacorta 4377a7f
Commit of the following:
pvillacorta d858cf1
Commit with the following:
pvillacorta 395d441
Correct docstring
pvillacorta 04054b9
Fix formatting of the '.phantom' file extension in documentation
pvillacorta 5b9628f
Merge branch `master` into `docs-phantom`
pvillacorta 217d94f
Adapt current docs to the new v0.9.1 `Phantom`
pvillacorta ef5c414
Update image source in Phantom format documentation
pvillacorta a6b402f
Write the motion section and minor changes in other related sections
pvillacorta c9fb091
Fix typos in lit-2-motion.jl
pvillacorta b7556ac
Hide lines in lit-2-motion.jl and plot entire phantom
pvillacorta 774486d
Fix relative paths in lit-2-motion.jl for correct navigation
pvillacorta a346711
Definitely fix relative paths in lit-2-motion.jl
pvillacorta 450554d
Update references and adjust plot heights in lit-2-motion.jl and 2-ko…
pvillacorta 85c7707
Fix erroneous semicolons in lit-2-motion.jl
pvillacorta a8858c6
Fix cross-reference links to `KomaMRIBase.TimeCurve`
pvillacorta 585d7a6
Fix comment line
pvillacorta bb060a5
Add section on Phantom File I/O and clarify .phantom format description
pvillacorta b1dac4a
Extend "Create your own Phantom" section
pvillacorta bfac231
Reduce plots height and improve introductive paragraph.
pvillacorta 7366e08
Remove unnecessary example output
pvillacorta 047deef
Add sequence scripts folder and new `lit-07-RRVariability.jl` tutorial
pvillacorta fe73645
Remove CUDA import from `examples/3.tutorials/lit-07-RRVariability.jl`
pvillacorta 1f55f1b
Rename bSSFP_cine.jl and fix include functions
pvillacorta 69595ec
Update docs/Project.toml to include Plots and Printf
pvillacorta 220fb12
Utils file redistribution and correct bugs that difficulted docs build
pvillacorta 59f9cb1
Make struct definitions mutable for TimeCurve, AllSpins, SpinRange, F…
pvillacorta d2b7676
Finish lit-07 tutorial and redistribute /utils files
pvillacorta 2671dd1
Fix commands tagged with `#nb` and `#jl`
pvillacorta 6fecc2a
Apply suggested changes, add phantom plot, resize figures
pvillacorta 16432c2
Refactor displacement functions to center coordinates before rotation…
pvillacorta fffe233
Update rotation tests for KomaMRIBase
pvillacorta ca07a7a
Remove `mutable` from all the motion-related structs
pvillacorta 9344b5f
Correct lit-07-RRVariability.jl to modify non-mutable structs
pvillacorta 6dca86d
Commit of the following:
pvillacorta 757ece3
News 16.Jun.2025
Stockless 54e53c2
Update README.md
cncastillo 3fbe173
Add files via upload
cncastillo 916834d
Delete assets/OSI2Logo.svg
cncastillo 76fd028
Add files via upload
cncastillo aaa61b4
Rename DIN SPEC 3105_ OSI² CAB_ 1.svg to DIN_SPEC_3105_OSI2_CAB_1.svg
cncastillo 3949fb6
Added OSI2 badge
cncastillo da6efa9
Added OSI2 badge properly
cncastillo 0e99bd0
Delete assets/DIN_SPEC_3105_OSI2_CAB_1.svg
cncastillo 0a9d32e
fix tabulation errors
Stockless ff752b7
Fixed inconsistencies in header capitalization, found and fixed vario…
KookiesNKareem fe53e61
Fixed more capitalization inconsistencies and typos. Clarified the sy…
KookiesNKareem bdef96c
Unsafe_blink macro implementation
Stockless 3d9f46f
test new function instead of macro
Stockless b61bcbd
using blink outside linux condition
Stockless 8fd9d15
"static if" and rm innecesary export
Stockless 95e2e40
include macos in temporary fix
Stockless fa5d934
add sleep after window generation
Stockless daf3a46
temporary change
Stockless 6cbd002
Always return window.
cncastillo eb72bbe
Just import Blink.
cncastillo d004e2f
Always return window.
cncastillo c52a2e3
test using Blink.Window directly
Stockless 2658ff0
window without arguments
Stockless d188299
replace setup-julia@v2 with latest
Stockless 1dabb2f
Add lynx for debugging electron
Stockless 16cf2a0
test sleep on ExportUIFunctions.jl
Stockless bf1d97a
add actions to test
Stockless 47ec522
sleep closer to window generation
Stockless 7eee81e
skip macos ui tests
Stockless 93f8bb2
fix if statement
Stockless f614459
using Blink outside condition
Stockless b578ee6
restablish commented sections of tests
Stockless 37255e7
comment unnecesary "include"s
Stockless 3d9b7c8
final changes to temporary fix
Stockless fe5e5f6
Update lit-01-FID.jl
cncastillo 88e9e55
modified duration = dur(seq)
Stockless 5b3ce79
Reformat test
cncastillo 1ab4951
Coil-sens on Scanner
cncastillo fcee2e2
Delete unintended and unnecesary elements
Stockless 1b17302
remove unnecesary example file, remove unnecesary packages call and …
Stockless eac6dbc
add a get_n_coils function, re-add KomaMRI subpackages to KomaMRI [co…
Stockless 776f4cf
Correction of Scanner argument at run_spin_precession functions
Stockless 46314f2
Moved coils_sens interpolation to SimulatorCore
Stockless ae03455
Fix sys::Scanner -> sys::Scanner{T}
Stockless ce83f1c
Interpolation Incorporation
Stockless 686647e
rebase remaining fixes
Stockless f123855
Merge branch 'master' into scanner-develop
Stockless fcebd64
complete rebase
Stockless 386e141
3D interpolation
Stockless 02708b8
CompatHelper: bump compat for oneAPI in [weakdeps] to 2 for package K…
7753c94
Update README.md [skip CI]
cncastillo 7a3c672
Update README.md [skip CI]
cncastillo 15aaa40
CompatHelper: bump compat for AcceleratedKernels to 0.4 for package K…
d097b8a
Update runbenchmarks.jl
Stockless 8bcee51
update enviroments for buildkite test
Stockless 345823c
Fix environment in which tests are run
cncastillo 4b05b76
Test environment change
cncastillo dbd0635
Update test environment setup (again)
cncastillo bfb78b0
Last update to test environment setup
cncastillo 69431b9
Add GPU backend to test environment
cncastillo 840fbfa
Fix GPU tests re-resolving test environment
cncastillo 3828d14
KomaMRIBase dev'ed in project environment
cncastillo 27fc2a3
Dev packages to test environment
cncastillo f377494
Only use tests environment for GPU tests
cncastillo 73609df
Test environment setup different for 1.10
cncastillo ff96ccf
Fix oneAPI bool indexing issues
cncastillo d1c2359
CompatHelper: bump compat for PlutoPlotly in [weakdeps] to 0.6 for pa…
7a54b51
Update runbenchmarks.jl
Stockless af5bea3
update enviroments for buildkite test
Stockless 4274f79
Fix environment in which tests are run
cncastillo b3f685a
Test environment change
cncastillo e66c2e8
Update test environment setup (again)
cncastillo 2e4df52
Last update to test environment setup
cncastillo 8dc1168
Add GPU backend to test environment
cncastillo 89a8f69
Fix GPU tests re-resolving test environment
cncastillo 35f00a6
KomaMRIBase dev'ed in project environment
cncastillo 9c92cc3
Dev packages to test environment
cncastillo 5f961f5
Only use tests environment for GPU tests
cncastillo 93828c6
Test environment setup different for 1.10
cncastillo 225b9b7
Fixes oneAPI indexing issues.
cncastillo 3274207
Add tags to Buildkite codecov process
cncastillo bc64dc3
CompatHelper: bump compat for Interpolations to 0.16 for package Koma…
99b6965
CompatHelper: bump compat for Interpolations to 0.16 for package Koma…
83d7631
Update README.md [skip CI]
cncastillo 8f75a06
Flags added to official julia-coverage
cncastillo 168ca57
Update README.md [skip CI]
cncastillo 7b038c5
interpolate 2D/3D cases
Stockless 2435ca2
Replace coil_tange example definition
Stockless 9e666d1
`sig[1]` fill correction
Stockless 06e81fe
Merge branch 'master' into scanner-develop
Stockless ebd047a
aquire_signal on GPU
Stockless ea26352
phantom with complex rho
Stockless dddd87c
Merge branch 'master' into scanner-develop
Stockless File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,57 @@ | ||
| # # Experimental: Simulating with realistic coils | ||
|
|
||
| using KomaMRI # hide | ||
| obj = brain_phantom2D() | ||
| coil_sens1 = exp.(-π * (((obj.x) .+ 0.1) .^ 2 / 0.02) .+ ((obj.y) .^ 2 / 0.02)) | ||
| coil_sens2 = exp.(-π * (((obj.x) .- 0.1) .^ 2 / 0.02) .+ ((obj.y) .^ 2 / 0.02)) | ||
| coil_sens3 = exp.(-π * ((obj.x) .^ 2 / 0.02) .+ (((obj.y) .+ 0.1) .^ 2 / 0.02)) | ||
| coil_sens4 = exp.(-π * ((obj.x) .^ 2 / 0.02) .+ (((obj.y) .- 0.1) .^ 2 / 0.02)) | ||
| coil_sens = hcat(coil_sens1, coil_sens2, coil_sens3, coil_sens4) | ||
| sys = Scanner() | ||
| sys.rf_coils = RFCoilsSensDefinedAtPhantomPositions(complex.(coil_sens)) | ||
| #sys.rf_coils = ArbitraryRFCoils(obj.x, obj.y, obj.z, complex.(coil_sens), complex.(coil_sens)) | ||
| seq_file = joinpath( | ||
| dirname(pathof(KomaMRI)), | ||
| "../examples/5.koma_paper/comparison_accuracy/sequences/EPI/epi_100x100_TE100_FOV230.seq", | ||
| ) | ||
| seq = read_seq(seq_file) | ||
| # And simulate: | ||
|
|
||
| sim_params = KomaMRICore.default_sim_params() | ||
| sim_params["sim_method"] = Bloch() | ||
| raw = simulate(obj, seq, sys; sim_params) | ||
|
|
||
| acq = AcquisitionData(raw) # hide | ||
| acq.traj[1].circular = false # hide | ||
| Nx, Ny = raw.params["reconSize"][1:2] # hide | ||
| # reco parameters | ||
| params = Dict{Symbol,Any}() | ||
| params[:reco] = "multiCoil" | ||
| params[:reconSize] = (Nx, Ny) | ||
| params[:iterations] = 40 | ||
|
|
||
| # Coil sensitivities interpolated to reconstruction points | ||
| FOV = 230e-3 | ||
| xq = range(-FOV / 2, FOV / 2, Nx) | ||
| yq = range(-FOV / 2, FOV / 2, Ny) | ||
| coil_sens1 = exp.(-π * (((xq) .+ 0.1) .^ 2 / 0.02) .+ ((yq') .^ 2 / 0.02)) | ||
| coil_sens2 = exp.(-π * (((xq) .- 0.1) .^ 2 / 0.02) .+ ((yq') .^ 2 / 0.02)) | ||
| coil_sens3 = exp.(-π * ((xq) .^ 2 / 0.1) .+ (((yq') .+ 0.1) .^ 2 / 0.02)) | ||
| coil_sens4 = exp.(-π * ((xq) .^ 2 / 0.1) .+ (((yq') .- 0.1) .^ 2 / 0.02)) | ||
| coil_sens_recon = Float32.([coil_sens1[:] coil_sens2[:] coil_sens3[:] coil_sens4[:]]) | ||
| params[:senseMaps] = reshape(complex.(coil_sens_recon), Nx, Ny, 1, size(coil_sens_recon, 2)) | ||
|
|
||
| # do reconstruction | ||
| Ireco = reconstruction(acq, params) | ||
| recon_image = plot_image(abs.(Ireco.data[:, :])) | ||
| reconParams = Dict{Symbol,Any}(:reco => "direct", :reconSize => (Nx, Ny)) # hide | ||
| image = reconstruction(acq, reconParams) # hide | ||
| slice_abs1 = abs.(image[:, :, 1, 1, 1, 1]) # hide | ||
| slice_abs2 = abs.(image[:, :, 1, 1, 2, 1]) # hide | ||
| slice_abs3 = abs.(image[:, :, 1, 1, 3, 1]) # hide | ||
| slice_abs4 = abs.(image[:, :, 1, 1, 4, 1]) # hide | ||
| p3 = plot_image(slice_abs1; height=400) | ||
| p4 = plot_image(slice_abs2; height=400) # hide | ||
| p5 = plot_image(slice_abs3; height=400) | ||
| p6 = plot_image(slice_abs4; height=400) # hide | ||
| [recon_image; p3 p4 p5 p6] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.