Skip to content

Commit

Permalink
Merge pull request #419 from pvillacorta/optimize-arbitrary-view
Browse files Browse the repository at this point in the history
Fix typos in docstrings
  • Loading branch information
cncastillo authored Jun 28, 2024
2 parents 3128e9f + e88ca02 commit e179f98
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions KomaMRIBase/src/datatypes/phantom/motion/ArbitraryMotion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,33 @@ const Interpolator2D = Interpolations.GriddedInterpolation{
}

"""
motion = ArbitraryMotion(period_durations, dx, dy, dz)
motion = ArbitraryMotion(t_start, t_end, dx, dy, dz)
ArbitraryMotion model. For this motion model, it is necessary to define
motion for each spin independently, in x (`dx`), y (`dy`) and z (`dz`).
`dx`, `dy` and `dz` are three matrixes, of (``N_{spins}`` x ``N_{discrete\\,times}``) each.
This means that each row corresponds to a spin trajectory over a set of discrete time instants.
`period_durations` is a vector that contains the period for periodic (one element) or
pseudo-periodic (two or more elements) motion.
The discrete time instants are calculated diving `period_durations` by ``N_{discrete\\,times}``.
The motion duration is determined by `t_start` and `t_end`.
The discrete time instants are evenly spaced, (``dt = \frac{t_{end} - t_{start}}{N_{discrete\\,times}}``).
This motion model is useful for defining arbitrarly complex motion, specially
for importing the spin trajectories from another source, like XCAT or a CFD.
# Arguments
- `period_durations`: (`Vector{T}`)
- `dx`: (`::Array{T,2}`) matrix for displacements in x
- `dy`: (`::Array{T,2}`) matrix for displacements in y
- `dz`: (`::Array{T,2}`) matrix for displacements in z
- `t_start`: (`::T`, `[s]`)
- `t_end`: (`::T`, `[s]`)
- `dx`: (`::Array{T,2}`, `[m]`) matrix for displacements in x
- `dy`: (`::Array{T,2}`, `[m]`) matrix for displacements in y
- `dz`: (`::Array{T,2}`, `[m]`) matrix for displacements in z
# Returns
- `motion`: (`::ArbitraryMotion`) ArbitraryMotion struct
# Examples
```julia-repl
julia> motion = ArbitraryMotion(
[1.0],
0.0,
1.0,
0.01.*rand(1000, 10),
0.01.*rand(1000, 10),
0.01.*rand(1000, 10)
Expand Down
2 changes: 1 addition & 1 deletion KomaMRIBase/src/datatypes/phantom/motion/SimpleMotion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ which is a tuple of simple motion types. This tuple will contain as many element
as simple motions we want to combine.
# Arguments
- `types`: (`::Tuple{Vararg{<:SimpleMotionType{T}}}`) vector of simple motion types
- `types`: (`::Tuple{Vararg{<:SimpleMotionType{T}}}`) tuple of simple motion types
# Returns
- `motion`: (`::SimpleMotion`) SimpleMotion struct
Expand Down

0 comments on commit e179f98

Please sign in to comment.