Skip to content

Commit fe7d99b

Browse files
committed
Use Type not DataType
1 parent ae19e2b commit fe7d99b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/mri-sense.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ leading to better boundary behavior than the DFT frequencies `k/N`.
2929
* `kmax::Int = 5` default frequency index -kmax:kmax in all dimensions
3030
* `kfun::Function = (k,N) -> k / (2N)` # DCT-II frequency
3131
* `deltas::NTuple{D,<:Number} = ones(D)` pixel sizes
32-
(For additional options `kmaxs`, `kt`, `ki`, see code.)
32+
(For additional options `kmaxs`, `kt`, `ki`, `T`, see code.)
3333
3434
# Output
3535
* `(; B, ν)` where `B` is basis matrix of size `count(mask) × nk`
@@ -47,7 +47,7 @@ function mri_smap_basis(
4747
kfun::Function = (k,N) -> k / (2N), # DCT-II frequency
4848
nfun::Function = (N) -> -(N÷2):(N÷2)-1,
4949
basis::Function = (k,N) -> cispi.(2 * nfun(N) * kfun(k,N)), # 1D basis
50-
T::DataType = ComplexF32,
50+
T::Type{<:Complex{<:AbstractFloat}} = ComplexF32,
5151
) where D
5252
B = zeros(T, count(mask), length(ki))
5353
for (i, k) in enumerate(ki)

src/object2.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function phantom(
8686
y::AbstractVector,
8787
oa::Array{<:Object2d},
8888
oversample::Int ;
89-
T::DataType = typeof(1f0 * oneunit(promote_type(eltype.(oa)...))),
89+
T::Type{<:Number} = typeof(1f0 * oneunit(promote_type(eltype.(oa)...))),
9090
)
9191

9292
oversample < 1 && throw(ArgumentError("oversample $oversample"))

src/object3.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function phantom(
9090
z::AbstractVector,
9191
oa::Array{<:Object3d{S,V}},
9292
oversample::Int;
93-
T::DataType = typeof(oneunit(V) * 1f0), # at least Float32
93+
T::Type{<:Number} = typeof(oneunit(V) * 1f0), # at least Float32
9494
) where {S, V <: Number}
9595

9696
oversample < 1 && throw(ArgumentError("oversample $oversample"))

src/shepplogan.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Convenience method for generating `M×N` samples of Shepp-Logan phantoms.
9393
# Options
9494
* `oversample::Int = 3` (usually)
9595
* `yflip::Bool = true` (reverse `y` samples for convenience.)
96-
* `T::DataType` default `Float32` (except `Int` for `BrainWeb` version)
96+
* `T::Type{<:Number}` default `Float32` (except `Int` for `BrainWeb` version)
9797
* `kwargs...` remaining options passed to `ellipse_parameters` for parameters.
9898
9999
# Out
@@ -107,7 +107,7 @@ function shepp_logan(
107107
case::EllipsePhantomVersion ;
108108
oversample::Int = 3,
109109
yflip::Bool = true,
110-
T::DataType = Float32,
110+
T::Type{<:Number} = Float32,
111111
kwargs...
112112
)
113113
ob = shepp_logan(case ; kwargs...)

0 commit comments

Comments
 (0)