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

Fix typos in docstrings #419

Merged
merged 3 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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