From 928ccef888e3903906960d9989e23464063bce94 Mon Sep 17 00:00:00 2001 From: beorostica-asusFX505GT-win Date: Tue, 19 Dec 2023 11:12:38 -0300 Subject: [PATCH 1/7] Fix multiple docs warnings and update docstring for default_sim_params --- KomaMRICore/src/simulation/SimulatorCore.jl | 35 ++- docs/src/api.md | 5 + docs/src/create-your-own-phantom.md | 2 +- docs/src/docstrings.md | 281 -------------------- docs/src/notebooks.md | 2 +- docs/src/programming-workflow.md | 4 +- 6 files changed, 43 insertions(+), 286 deletions(-) delete mode 100644 docs/src/docstrings.md diff --git a/KomaMRICore/src/simulation/SimulatorCore.jl b/KomaMRICore/src/simulation/SimulatorCore.jl index a5e267c2a..fdf7abfe6 100644 --- a/KomaMRICore/src/simulation/SimulatorCore.jl +++ b/KomaMRICore/src/simulation/SimulatorCore.jl @@ -6,7 +6,40 @@ include("Bloch/BlochSimulationMethod.jl") #Defines Bloch simulation method include("Bloch/BlochDictSimulationMethod.jl") #Defines BlochDict simulation method """ -Returns a dictionary with default simulation parameters. + sim_params = default_sim_params(sim_params=Dict{String,Any}()) + +This function returns a dictionary containing default simulation parameters while also +allowing the user to define some of them. + +# Arguments +- `sim_params`: (`::Dict{String,Any}`, `=Dict{String,Any}()`) user-defined dictionary with + simulation parameters. The following lists its keys along with their possible values: + * "return_type": defines the output of the [`simulate`](@ref) function. Possible values + are `"raw"`, `"mat"`, and `"state"`, corresponding to outputting a MRIReco + `RawAcquisitionData`, the signal values, and the last magnetization state of the + simulation, respectively + * "sim_method": defines the type of simulation. The default value is `Bloch()`, but you + can alternatively use the `BlochDict()` simulation method. Moreover, you have the + flexibility to create your own methods without altering the KomaMRI source code + * "Δt": raster time for gradients + * "Δt_rf": raster time for RFs + * "precision": defines the floating-point simulation precision. You can choose between + `"f32"` and `"f64"` to use `Float32` and `Float64` primitive types, respectively. + It's important to note that, especially for GPU operations, using `"f32"` is + generally much faster + * "Nblocks": divides the simulation into a specified number of time blocks. This parameter + is designed to conserve RAM resources, as **KomaMRI** computes a series of + simulations consecutively, each with the specified number of blocks determined by + the value of `"Nblocks"` + * "Nthreads": divides the **Phantom** into a specified number of threads. Because spins + are modeled independently of each other, **KomaMRI** can solve simulations in + parallel threads, speeding up the execution time + * "gpu": is a boolean that determines whether to use GPU or CPU hardware resources, as + long as they are available on the host computer + * "gpu_device": sets the index ID of the available GPU in the host computer + +# Returns +- `sim_params`: (`::Dict{String,Any}`) dictionary with simulation parameters """ function default_sim_params(sim_params=Dict{String,Any}()) get!(sim_params, "gpu", true); if sim_params["gpu"] check_use_cuda(); sim_params["gpu"] &= use_cuda[] end diff --git a/docs/src/api.md b/docs/src/api.md index 8e36f380b..c4241d749 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -169,6 +169,11 @@ PulseDesigner.EPI_example ## Simulation +### `default_sim_params` +```@docs +default_sim_params +``` + ### `simulate` ```@docs simulate diff --git a/docs/src/create-your-own-phantom.md b/docs/src/create-your-own-phantom.md index 178659d71..c3dc66cc8 100644 --- a/docs/src/create-your-own-phantom.md +++ b/docs/src/create-your-own-phantom.md @@ -115,7 +115,7 @@ T2 = T2*1e-3 T2s = T2s*1e-3 ``` -Finally, we can invoke the [`Phantom`](@Ref) constructor. However, before doing so, we choose not to store spins where the proton density is zero to avoid unnecessary data storage. This is achieved by applying the mask `ρ.!=0` to the arrays. Additionally, please note that we set the z-position array filled with zeros. +Finally, we can invoke the [`Phantom`](@ref) constructor. However, before doing so, we choose not to store spins where the proton density is zero to avoid unnecessary data storage. This is achieved by applying the mask `ρ.!=0` to the arrays. Additionally, please note that we set the z-position array filled with zeros. ```julia # Define the phantom obj = Phantom{Float64}( diff --git a/docs/src/docstrings.md b/docs/src/docstrings.md deleted file mode 100644 index 13da70e59..000000000 --- a/docs/src/docstrings.md +++ /dev/null @@ -1,281 +0,0 @@ -# API Documentation - -## [Dataflow Graph](@id dataflow-graph) - -![](assets/dataflow.svg) - -```@contents -Pages = ["docstrings.md"] -Depth = 3 -``` - -## [DataTypes](@id datatypes) - -### `Mag` -```@docs -Mag -show(::IO, ::Mag) -getproperty(::Vector{Mag}, ::Symbol) -``` - -### `Phantom` - -Refer to [API Documentation](api.md#Phantom): -* [`KomaMRI.Phantom`](@ref) — Type -* [`KomaMRI.brain_phantom2D`](@ref) — Function -* [`KomaMRI.brain_phantom3D`](@ref) — Function - -### `Scanner` - -Refer to [API Documentation](api.md#Scanner): -* [`KomaMRI.Scanner`](@ref) — Type - -### `Sequence` - -Refer to [API Documentation](api.md#Sequence): -* [`KomaMRI.Sequence`](@ref) — Type - -```@docs -show(::IO, ::Sequence) -KomaMRI.is_ADC_on -KomaMRI.is_RF_on -KomaMRI.is_GR_on -KomaMRI.is_Gx_on -KomaMRI.is_Gy_on -KomaMRI.is_Gz_on -KomaMRI.is_Delay -KomaMRI.durs(::Sequence) -dur(::Sequence) -KomaMRI.⏢ -KomaMRI.get_grads -KomaMRI.get_rfs -KomaMRI.get_flip_angles -KomaMRI.get_ADC_on -KomaMRI.get_kspace -KomaMRI.get_RF_types - -KomaMRI.δ2N -``` - -### `Grad` - -Refer to [API Documentation](api.md#Grad): -* [`KomaMRI.Grad`](@ref) — Type -* [`KomaMRI.Grad(::Function, ::Real, ::Int64)`](@ref) — Method - -```@docs -rotx -roty -rotz -show(::IO, ::Grad) -getproperty(::Vector{Grad}, ::Symbol) -dur(::Grad) -``` - -### `RF` - -Refer to [API Documentation](api.md#RF): -* [`KomaMRI.RF`](@ref) — Type - -```@docs -Spinor -show(::IO,::Spinor) -*(::Spinor, ::Spinor) -Rz -Ry -Rx -KomaMRI.Rg -KomaMRI.Rφ -Q -abs(::Spinor) - -show(::IO, ::RF) -getproperty(::Vector{RF}, ::Symbol) -dur(::RF) -KomaMRI.RF_fun -KomaMRI.get_flip_angle -KomaMRI.get_RF_center -``` - -### `ADC` - -Refer to [API Documentation](api.md#ADC): -* [`KomaMRI.ADC`](@ref) — Type - -```@docs -getproperty(::Vector{ADC}, ::Symbol) -KomaMRI.get_adc_sampling_times -KomaMRI.get_adc_phase_compensation -``` - -### `Delay` - -Refer to [API Documentation](api.md#Delay): -* [`KomaMRI.Delay`](@ref) — Type - -```@docs -show(::IO, ::Delay) -+(::Sequence, ::Delay) -``` - -## [Pulseq.jl](@id pulseq) - -Refer to [API Documentation](api.md#read_seq): -* [`KomaMRI.read_seq`](@ref) — Function - -### `read_Grad` -```@docs -KomaMRI.read_Grad -``` - -### `read_RF` -```@docs -KomaMRI.read_RF -``` - -### `read_ADC` -```@docs -KomaMRI.read_ADC -``` - -### `get_block` -```@docs -KomaMRI.get_block -``` - -## [JEMRIS.jl](@id jemris) - -### `read_phantom_jemris` -Refer to [API Documentation](api.md#read_phantom_jemris): -* [`KomaMRI.read_phantom_jemris`](@ref) — Function - -## [ISMRMRD.jl](@id ismrmrd) - -### `signal_to_raw_data` -Refer to [API Documentation](api.md#signal_to_raw_data): -* [`KomaMRI.signal_to_raw_data`](@ref) — Function - -## [PulseDesigner.jl](@id pulse-designer) - -Refer to [API Documentation](api.md#Pulse-Design): -* [`KomaMRI.PulseDesigner`](@ref) — Function -* [`KomaMRI.PulseDesigner.RF_hard`](@ref) — Function -* [`KomaMRI.PulseDesigner.EPI`](@ref) — Function -* [`KomaMRI.PulseDesigner.radial_base`](@ref) — Function - -## [KeyValuesCalculation.jl](@id key-values-calculation) - -### `get_theo_A` -```@docs -KomaMRI.get_theo_A -``` - -### `get_theo_t` -```@docs -KomaMRI.get_theo_t -``` - -### `get_theo_Gi` -```@docs -KomaMRI.get_theo_Gi -``` - -## [TrapezoidalIntegration.jl](@id trapezoidal-integration) - -### `trapz` -```@docs -KomaMRI.trapz -``` - -### `cumtrapz` -```@docs -KomaMRI.cumtrapz -``` - -## [TimeStepCalculation.jl](@id time-step-calculation) - -### `points_from_key_times` -```@docs -KomaMRI.points_from_key_times -``` - -### `get_variable_times` -```@docs -KomaMRI.get_variable_times -``` - -### `get_uniform_times` -```@docs -KomaMRI.get_uniform_times -``` - -### `kfoldperm` -```@docs -KomaMRI.kfoldperm -``` - -### `get_breaks_in_RF_key_points` -```@docs -KomaMRI.get_breaks_in_RF_key_points -``` - -## [SimulationCore.jl](@id simulation-core) - -Refer to [API Documentation](api.md#Simulation): -* [`KomaMRI.simulate`](@ref) — Function -* [`KomaMRI.simulate_slice_profile`](@ref) — Function - -### `print_gpus` -```@docs -KomaMRI.print_gpus -``` - -### `run_spin_precession` -```@docs -KomaMRI.run_spin_precession -``` - -### `run_spin_precession_parallel` -```@docs -KomaMRI.run_spin_precession_parallel -``` - -### `run_spin_excitation` -```@docs -KomaMRI.run_spin_excitation -``` - -### `run_spin_excitation_parallel` -```@docs -KomaMRI.run_spin_excitation_parallel -``` - -### `run_sim_time_iter` -```@docs -KomaMRI.run_sim_time_iter -``` - -## [DisplayFunctions.jl](@id display-functions) - -Refer to [API Documentation](api.md#Plots): -* [`KomaMRI.plot_seq`](@ref) — Function -* [`KomaMRI.plot_image`](@ref) — Function -* [`plot_kspace`](@ref) — Function -* [`plot_M0`](@ref) — Function -* [`plot_phantom_map`](@ref) — Function -* [`plot_signal`](@ref) — Function - -### `theme_chooser` -```@docs -KomaMRI.theme_chooser -``` - -### `interp_map` -```@docs -KomaMRI.interp_map -``` - -### `plot_dict` -```@docs -KomaMRI.plot_dict -``` diff --git a/docs/src/notebooks.md b/docs/src/notebooks.md index 8a17510ed..523e2b5bf 100644 --- a/docs/src/notebooks.md +++ b/docs/src/notebooks.md @@ -29,7 +29,7 @@ Next, create a new notebook by clicking on `+ Create a new notebook`:
``` -Write and run the following code, which is identical to the [Free Induction Decay example](../generated/examples/01-FID#Free-Induction-Decay). **Pluto** automatically installs the required modules if they are not present on your system. Additionally, note that we do not directly use **KomaMRI** since we won't be utilizing the [`KomaUI`](@ref) function. Instead, we rely on the **KomaMRICore** and **KomaMRIPlots** dependencies. To display plots in **Pluto**, ensure that you import the **PlutoPlotly** package, as **KomaMRIPlots** requires its backend to display figures in **Pluto**: +Write and run the following code, which is identical to the [Free Induction Decay example](#Free-Induction-Decay). **Pluto** automatically installs the required modules if they are not present on your system. Additionally, note that we do not directly use **KomaMRI** since we won't be utilizing the [`KomaUI`](@ref) function. Instead, we rely on the **KomaMRICore** and **KomaMRIPlots** dependencies. To display plots in **Pluto**, ensure that you import the **PlutoPlotly** package, as **KomaMRIPlots** requires its backend to display figures in **Pluto**: ```@raw html ``` diff --git a/docs/src/programming-workflow.md b/docs/src/programming-workflow.md index 48a372079..1d1a28910 100644 --- a/docs/src/programming-workflow.md +++ b/docs/src/programming-workflow.md @@ -150,7 +150,7 @@ julia> plot_kspace(seq) ``` -Additionally, there are helpful sequence construction functions within a submodule of **KomaMRI** called **PulseDesigner**. These functions include [`RF_hard`](@ref), [`RF_sinc`](@ref), [`EPI`](@ref), [`radial_base`](@ref) and [`spiral_base`](@ref). For more details on how to use them, refer to the [API documentation](api.md). +Additionally, there are helpful sequence construction functions within a submodule of **KomaMRI** called **PulseDesigner**. These functions include [`PulseDesigner.RF_hard`](@ref), [`PulseDesigner.RF_sinc`](@ref), [`PulseDesigner.EPI`](@ref), [`PulseDesigner.radial_base`](@ref) and [`PulseDesigner.spiral_base`](@ref). For more details on how to use them, refer to the [API documentation](api.md). **KomaMRI** is also compatible with [Pulseq](https://pulseq.github.io/). The package installation includes some `.seq` files in **Pulseq** format, which can be read and used as a **Sequence** struct. Here's how to read a spiral **Pulseq** file stored in the "examples" folder of **KomaMRI**: ```julia-repl @@ -176,7 +176,7 @@ raw = simulate(obj, seq, sys; sim_params) ### Simulation Parameters -To perform simulations, **KomaMRI** requires certain parameters. You can use the default parameters for testing, but you also have the option to customize specific simulation aspects. In the example, we use the [`default_sim_params`](@ref) function to create a dictionary with default simulation parameters. You can view the keys that can be modified by displaying the `sim_params` variable: +To perform simulations, **KomaMRI** requires certain parameters. You can use the default parameters for testing, but you also have the option to customize specific simulation aspects. In the example, we use the [`KomaMRICore.default_sim_params`](@ref) function to create a dictionary with default simulation parameters. You can view the keys that can be modified by displaying the `sim_params` variable: ```julia-repl julia> sim_params Dict{String, Any} with 9 entries: From 5ba9ed16b91b8dbe6b143dc28379d3ea41faccef Mon Sep 17 00:00:00 2001 From: beorostica-asusFX505GT-win Date: Tue, 19 Dec 2023 13:59:56 -0300 Subject: [PATCH 2/7] Check for exports during document generation --- docs/make.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/make.jl b/docs/make.jl index 03d691c14..58f7f1eaa 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -52,6 +52,7 @@ makedocs( modules = [KomaMRI, KomaMRICore, KomaMRIFiles, KomaMRIPlots], sitename = "KomaMRI.jl: General MRI simulation framework", authors = "Boris Orostica Navarrete and Carlos Castillo Passi", + checkdocs = :exports, pages = [ "Home" => "index.md"; "Getting Started" => "getting-started.md"; From a900ca14c84a77024657542323197f9cf43f0e2a Mon Sep 17 00:00:00 2001 From: beorostica-asusFX505GT-win Date: Tue, 19 Dec 2023 17:35:53 -0300 Subject: [PATCH 3/7] Add missing exported functions to API docs --- KomaMRICore/src/simulation/GPUFunctions.jl | 12 +- docs/src/api.md | 141 ++++++++++++++++++++- 2 files changed, 142 insertions(+), 11 deletions(-) diff --git a/KomaMRICore/src/simulation/GPUFunctions.jl b/KomaMRICore/src/simulation/GPUFunctions.jl index dd9750e3f..1fc55a2a2 100644 --- a/KomaMRICore/src/simulation/GPUFunctions.jl +++ b/KomaMRICore/src/simulation/GPUFunctions.jl @@ -12,11 +12,11 @@ function print_gpus() check_use_cuda() if use_cuda[] cuda_devices = [Symbol("($(i-1)$(i == 1 ? "*" : " "))") => name(d) for (i,d) = enumerate(devices())] - @info "$(length(devices())) CUDA capable device(s)." cuda_devices... + @info "$(length(devices())) CUDA capable device(s)." cuda_devices... else @info "0 CUDA capable devices(s)." end - return + return end """ @@ -47,7 +47,7 @@ adapt_storage(to::KomaCUDAAdaptor, x) = CUDA.cu(x) Tries to move `x` to the current GPU device. Inspired by Flux's `gpu` function. -This works for functions, and any struct marked with [`@functor`](@ref). +This works for functions, and any struct marked with `@functor`. # Examples ```julia @@ -70,7 +70,7 @@ adapt_storage(to::KomaCPUAdaptor, x::AbstractRange) = x Tries to move object to CPU. Inspired by Flux's `cpu` function. -This works for functions, and any struct marked with [`@functor`](@ref). +This works for functions, and any struct marked with `@functor`. # Examples ```julia @@ -89,14 +89,14 @@ adapt_storage(T::Type{<:Real}, xs::AbstractArray{<:Bool}) = xs #Type piracy """ f32(m) Converts the `eltype` of model's parameters to `Float32` -Recurses into structs marked with [`@functor`](@ref). +Recurses into structs marked with `@functor`. """ f32(m) = paramtype(Float32, m) """ f64(m) Converts the `eltype` of model's parameters to `Float64` (which is Koma's default).. -Recurses into structs marked with [`@functor`](@ref). +Recurses into structs marked with `@functor`. """ f64(m) = paramtype(Float64, m) diff --git a/docs/src/api.md b/docs/src/api.md index c4241d749..e8178b9d4 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -100,6 +100,64 @@ ADC Delay ``` +## Functions for structs + +### `dur` +```@docs +dur +``` + +### `rotx` +```@docs +rotx +``` + +### `roty` +```@docs +roty +``` + +### `rotz` +```@docs +rotz +``` + +### `get_kspace` +```@docs +get_kspace +``` + +### `get_M1` +```@docs +get_M1 +``` + +### `get_M2` +```@docs +get_M2 +``` + +### `get_flip_angles` +```@docs +get_flip_angles +``` + +### `is_RF_on` +```@docs +is_RF_on +``` + +### `is_GR_on` +```@docs +is_GR_on +``` + +### `is_ADC_on` +```@docs +is_ADC_on +``` + + ## Read Data ```@meta @@ -121,12 +179,8 @@ read_phantom_jemris read_phantom_MRiLab ``` -### `signal_to_raw_data` -```@docs -signal_to_raw_data -``` -## Pulse Design +## Pulse Designer ```@meta CurrentModule = KomaMRICore @@ -167,6 +221,67 @@ PulseDesigner.spiral_base PulseDesigner.EPI_example ``` +## Spin Representation + +### `Mag` +```@docs +Mag +``` + +### `Spinor` +```@docs +Spinor +``` + +### `Rx` +```@docs +Rx +``` + +### `Ry` +```@docs +Ry +``` + +### `Rz` +```@docs +Rz +``` + +### `Q` +```@docs +Q +``` + +### `Un` +```@docs +Un +``` + + +## Low Level Processing + +### `f32` +```@docs +f32 +``` + +### `f64` +```@docs +f64 +``` + +### `cpu` +```@docs +cpu +``` + +### `gpu` +```@docs +gpu +``` + + ## Simulation ### `default_sim_params` @@ -184,6 +299,12 @@ simulate simulate_slice_profile ``` +### `signal_to_raw_data` +```@docs +signal_to_raw_data +``` + + ## Plots ```@meta @@ -240,6 +361,16 @@ plot_signal plot_image ``` +### `plot_dict` +```@docs +plot_dict +``` + +### `plot_seqd` +```@docs +plot_seqd +``` + ## UI From bee6f82f81fa097a23655c3121f44e2c72ad8786 Mon Sep 17 00:00:00 2001 From: beorostica-asusFX505GT-win Date: Wed, 20 Dec 2023 15:41:18 -0300 Subject: [PATCH 4/7] Add see also for docstring of functor functions --- KomaMRICore/src/simulation/GPUFunctions.jl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/KomaMRICore/src/simulation/GPUFunctions.jl b/KomaMRICore/src/simulation/GPUFunctions.jl index 1fc55a2a2..79bb978bb 100644 --- a/KomaMRICore/src/simulation/GPUFunctions.jl +++ b/KomaMRICore/src/simulation/GPUFunctions.jl @@ -49,6 +49,10 @@ Tries to move `x` to the current GPU device. Inspired by Flux's `gpu` function. This works for functions, and any struct marked with `@functor`. +Use [`cpu`](@ref) to copy back to ordinary `Array`s. + +See also [`f32`](@ref) and [`f64`](@ref) to change element type only. + # Examples ```julia x = x |> gpu @@ -72,6 +76,8 @@ Tries to move object to CPU. Inspired by Flux's `cpu` function. This works for functions, and any struct marked with `@functor`. +See also [`gpu`](@ref). + # Examples ```julia x = x |> cpu @@ -88,15 +94,21 @@ adapt_storage(T::Type{<:Real}, xs::AbstractArray{<:Bool}) = xs #Type piracy """ f32(m) + Converts the `eltype` of model's parameters to `Float32` Recurses into structs marked with `@functor`. + +See also [`f64`](@ref). """ f32(m) = paramtype(Float32, m) """ f64(m) + Converts the `eltype` of model's parameters to `Float64` (which is Koma's default).. Recurses into structs marked with `@functor`. + +See also [`f32`](@ref). """ f64(m) = paramtype(Float64, m) From 109eb655328e48204bc025bc331484464822a94a Mon Sep 17 00:00:00 2001 From: beorostica-asusFX505GT-win Date: Wed, 20 Dec 2023 18:36:00 -0300 Subject: [PATCH 5/7] Edit titles in API documentation (there are warnings) --- docs/src/api.md | 67 +++++++++++++------------------------------------ 1 file changed, 18 insertions(+), 49 deletions(-) diff --git a/docs/src/api.md b/docs/src/api.md index e8178b9d4..fee2057fc 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -100,7 +100,8 @@ ADC Delay ``` -## Functions for structs + +## Sequence-related Functions ### `dur` ```@docs @@ -158,29 +159,7 @@ is_ADC_on ``` -## Read Data - -```@meta -CurrentModule = KomaMRIFiles -``` - -### `read_seq` -```@docs -read_seq -``` - -### `read_phantom_jemris` -```@docs -read_phantom_jemris -``` - -### `read_phantom_MRiLab` -```@docs -read_phantom_MRiLab -``` - - -## Pulse Designer +## Prebuilt Sequence Building Blocks ```@meta CurrentModule = KomaMRICore @@ -221,45 +200,30 @@ PulseDesigner.spiral_base PulseDesigner.EPI_example ``` -## Spin Representation - -### `Mag` -```@docs -Mag -``` - -### `Spinor` -```@docs -Spinor -``` -### `Rx` -```@docs -Rx -``` +## Input/Output -### `Ry` -```@docs -Ry +```@meta +CurrentModule = KomaMRIFiles ``` -### `Rz` +### `read_seq` ```@docs -Rz +read_seq ``` -### `Q` +### `read_phantom_jemris` ```@docs -Q +read_phantom_jemris ``` -### `Un` +### `read_phantom_MRiLab` ```@docs -Un +read_phantom_MRiLab ``` -## Low Level Processing +## Functor Functions ### `f32` ```@docs @@ -304,6 +268,11 @@ simulate_slice_profile signal_to_raw_data ``` +### `Mag` +```@docs +Mag +``` + ## Plots From 11fa41ab96ff275ebf6c0d7152359435336dcf32 Mon Sep 17 00:00:00 2001 From: beorostica-asusFX505GT-win Date: Thu, 21 Dec 2023 10:40:48 -0300 Subject: [PATCH 6/7] Do not export Spinor-related functions (no warnings in docs) --- KomaMRICore/src/KomaMRICore.jl | 2 -- KomaMRICore/test/runtests.jl | 2 ++ docs/src/api.md | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/KomaMRICore/src/KomaMRICore.jl b/KomaMRICore/src/KomaMRICore.jl index 27b6bc9c6..a36af9c0a 100644 --- a/KomaMRICore/src/KomaMRICore.jl +++ b/KomaMRICore/src/KomaMRICore.jl @@ -48,8 +48,6 @@ export Grad, RF, ADC, Delay export Mag, dur #Phantom export brain_phantom2D, brain_phantom3D -#Spinors -export Spinor, Rx, Ry, Rz, Q, Un #Secondary export get_kspace, rotx, roty, rotz #ISMRMRD diff --git a/KomaMRICore/test/runtests.jl b/KomaMRICore/test/runtests.jl index 92ac17e3d..6ee2b0307 100644 --- a/KomaMRICore/test/runtests.jl +++ b/KomaMRICore/test/runtests.jl @@ -415,6 +415,8 @@ end end @testitem "Spinors×Mag" tags=[:core] begin + import KomaMRICore: Spinor, Rx, Ry, Rz, Q, Un + # Spinor 2x2 representation should be equivalent to a 3x1 vector rotation x = rand(3); x = x./sum(x) θ = rand() * π diff --git a/docs/src/api.md b/docs/src/api.md index fee2057fc..87a0fd47f 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -225,6 +225,10 @@ read_phantom_MRiLab ## Functor Functions +```@meta +CurrentModule = KomaMRICore +``` + ### `f32` ```@docs f32 From 5427a79a4453a3e5fc1ff9702e2947010ff3b0db Mon Sep 17 00:00:00 2001 From: beorostica-asusFX505GT-win Date: Thu, 21 Dec 2023 13:48:39 -0300 Subject: [PATCH 7/7] Use using instead of import in test --- KomaMRICore/test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KomaMRICore/test/runtests.jl b/KomaMRICore/test/runtests.jl index 6ee2b0307..dcc6519a9 100644 --- a/KomaMRICore/test/runtests.jl +++ b/KomaMRICore/test/runtests.jl @@ -415,7 +415,7 @@ end end @testitem "Spinors×Mag" tags=[:core] begin - import KomaMRICore: Spinor, Rx, Ry, Rz, Q, Un + using KomaMRICore: Spinor, Rx, Ry, Rz, Q, Un # Spinor 2x2 representation should be equivalent to a 3x1 vector rotation x = rand(3); x = x./sum(x)