Skip to content
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

Set up a demopage #1

Open
johnnychen94 opened this issue Jul 9, 2020 · 7 comments
Open

Set up a demopage #1

johnnychen94 opened this issue Jul 9, 2020 · 7 comments

Comments

@johnnychen94
Copy link

johnnychen94 commented Jul 9, 2020

Similar to https://juliaimages.org/latest/democards/examples/, I could help set up a demo page here using DemoCards if you like it.

Advantages:

  • demos are just Julia scripts with Literate syntax
  • notebooks, cover images are generated on the fly
  • demo layout is managed automatically

Check and see how demos are organized https://github.com/JuliaImages/juliaimages.github.io/tree/source/docs/examples

Of course, if you want, you could also host demos in the JuliaImages docs repo, people there could help manage and maintain the demos.

@JeffFessler
Copy link
Owner

Wow, those look really useful.
I think it would be preferable to host the demos either at MIRT.jl site itself, or at JuliaImages, rather than in this little repo here that I threw together quickly for a tutorial I was giving.
I really appreciate your offer to help so I'll defer to you which location you think makes more sense.
I am currently doing an overhaul of MIRT.jl to isolate the test code from the src so that hopefully it should precompile faster.

@johnnychen94
Copy link
Author

johnnychen94 commented Jul 10, 2020

I am currently doing an overhaul of MIRT.jl to isolate the test code from the src so that hopefully it should precompile faster.

yes, moving test-only codes to test/ definitely helps thining the codebase and improves the precompilation.

Moving plots and IO related codes out can also improve the precompilation.

I think it would be preferable to host the demos either at MIRT.jl site itself, or at JuliaImages,

I just noticed that there's no docs page for MIRT. In that case, I can help set these up in MIRT.jl. But after that, it would still be your work to filling the docs as I know very little about the MIRT internal.

@JeffFessler
Copy link
Owner

That would be wonderful. It has been on my "todo" list for a while but I keep working on the code instead of the docs... Having a doc & demo setup would let me move some (perhaps all) of the plots out of the package and into the docs/demos so that the package itself is lighter. Thanks!

@johnnychen94
Copy link
Author

johnnychen94 commented Jul 12, 2020

Would you mind checking and updating the demo scripts to make sure it runs without GUI? I'm unfamiliar with the tools you're using and it's a bit challenging for me to adjust the syntax in a way you like.

I tried one script but it seems not working now.

(smap,_) = ir_mri_sensemap_sim(dims=N, ncoil=ncoil, orbit_start=90)

julia> ir_mri_sensemap_sim(dims=N, ncoil=ncoil, orbit_start=90)
ERROR: TypeError: in keyword argument orbit_start, expected AbstractArray{var"#s141",1} where var"#s141"<:Real, got a value of type Int64
Stacktrace:
 [1] ir_mri_sensemap_sim(; kwargs::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:dims, :ncoil, :orbit_start),Tuple{Tuple{Int64,Int64},Int64,Int64}}}) at /Users/jc/Documents/Julia/MIRT.jl/src/mri/sensemap-sim.jl:56
 [2] top-level scope at REPL[29]:1

@JeffFessler
Copy link
Owner

Oops, this demo needs an update due to some of the breaking changes I've made to MIRT.
I'll get to this soon.

@JeffFessler
Copy link
Owner

@johnnychen94,
I have tagged a new version of MIRT with our many changes and now I have updated the code in mirt-demo.
The .jl demo files run fine for me now with the latest version.
(The binder files take very long to start so I am unsure if they are running.)

@johnnychen94
Copy link
Author

I'll take a try in the next few days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants