Skip to content

Commit

Permalink
Merge pull request #42 from kunzaatko/main
Browse files Browse the repository at this point in the history
fix(docs): Typos and signature
  • Loading branch information
roflmaostc authored Dec 23, 2023
2 parents 4a0b19d + 96b7b7c commit 986724c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/fourier_resizing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function select_region_rft(mat, old_size, new_size)
end

"""
select_region(mat,new_size)
select_region(mat; new_size)
performs the necessary Fourier-space operations of resampling
in the space of ft (meaning the already circshifted version of fft).
Expand Down
10 changes: 5 additions & 5 deletions src/resampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -322,19 +322,19 @@ resamples an ND-array to a set of new positions `new_pos` measured in either in
or relative (Fourier-) image coordinates (`pixel_coords=false`).
`new_pos` can be
+ an array of `Tuples` specifying the zoom along each direction
+ an `N+1` dimensional array (for `N`-dimensional imput data `img`) of destination postions, the last dimension
enumerating the respective destination corrdinate dimension.
+ an `N+1` dimensional array (for `N`-dimensional input data `img`) of destination positions, the last dimension
enumerating the respective destination coordinate dimension.
+ a function accepting a coordinate `Tuple` and yielding a destination position `Tuple`.
`resample_nfft` can perform a large range of possible resamplings. Note that the default setting is `is_src_coords=true`
which means that the source coordinates of each destination position have to be specified. This has the advantage that
the result has usually less artefacts, but the positions may be more less convenient to specify.
# Arguements
# Arguments
+ `img`: the image to apply resampling to
+ `new_pos``: specifies the resampling. See description above.
+ `dst_size`: this argument optionally defines the output size. If you require a different result size
for `new_pos` being a function or with `is_src_coords=true`, state it here. By defaul (`dst_size=nothing`) the
for `new_pos` being a function or with `is_src_coords=true`, state it here. By default (`dst_size=nothing`) the
destination size will be inferred form the argument `new_pos` or assumed to be `size(img)`.
+ `is_local_shift`: specifies, whether the resampling coordinates refer to a relative shift or absoluter coordinates
+ `is_in_pixels`: specifies whether the coordinates (or relative distances) are given in pixel pitch units (`is_in_pixels=true`) or in units relative to the array sizes (Fourier convention)
Expand Down Expand Up @@ -368,7 +368,7 @@ julia> @ve a b c c2 # visualize distortion and x-shrinks.
# define a rotation operation
julia> rot_alpha(a, t) = (cosd(a)*t[1] + sind(a)*t[2], -sind(a)*t[1]+cosd(a)*t[2])
# postions as an array of tuples
# positions as an array of tuples
julia> new_pos = rot_alpha.(10.0, idx(a, scale=ScaFT))
# lets do the resampling, this time by specifying the destination coordinates:
Expand Down

0 comments on commit 986724c

Please sign in to comment.