Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuakiyama committed Oct 16, 2024
1 parent 4be7d61 commit 3a243ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/src/tutorials/diffractive.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ f
```

## A quick shortcut
The above tutorial is intentionally written in a low level. There is [emsembleaverage](@ref) method to do a quick shortcut by bypassing the kernel generation.
The above tutorial is intentionally written in a low level. There is [ensembleaaverage](@ref) method to do a quick shortcut by bypassing the kernel generation.

```@example 1
# scatter the image
im_ea_2 = emsembleaverage(sm, im)
im_ea_2 = ensembleaaverage(sm, im)
# Plot source image
imageviz(im_ea_2, size=(600, 500), colormap=:afmhot)
```

Although this is handy, it may have an extra overhead to initialize `skm` which may slow down highly iterative processes.
[emsembleaverage](@ref) method also supports more general skymodels in `ComradeBase.AbstractModel` as an input instead of the image model.
[ensembleaaverage](@ref) method also supports more general skymodels in `ComradeBase.AbstractModel` as an input instead of the image model.
10 changes: 5 additions & 5 deletions src/scatteringmodels/abstractscatteringmodel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export AbstractScatteringModel
#export Dϕ_exact
export visibility_point_approx
export visibility_point_exact
export emsembleaverage
export ensembleaverage


"""
Expand Down Expand Up @@ -156,16 +156,16 @@ using the exact formula of the phase structure function.
end

"""
emsembleaverage(sm::AbstractScatteringModel, skymodel::AbstractModel, νmodel)
ensembleaverage(sm::AbstractScatteringModel, skymodel::AbstractModel, νmodel)
"""
@inline function emsembleaverage(sm::AbstractScatteringModel, skymodel::AbstractModel, νmodel=c_cgs)
@inline function ensembleaverage(sm::AbstractScatteringModel, skymodel::AbstractModel, νmodel=c_cgs)
return convolved(skymodel, kernelmodel(sm, νref=νmodel))
end

"""
emsembleaverage(sm::AbstractScatteringModel, imap::IntensityMap; νref=c_cgs)
ensembleaverage(sm::AbstractScatteringModel, imap::IntensityMap; νref=c_cgs)
"""
@inline function emsembleaverage(sm::AbstractScatteringModel, imap::IntensityMap; νref=c_cgs)
@inline function ensembleaverage(sm::AbstractScatteringModel, imap::IntensityMap; νref=c_cgs)
# check if imap has a frequncy or time dimension
if ndims(imap) > 2
throw("The funciton doesn't support multi-dimensional images")
Expand Down

0 comments on commit 3a243ec

Please sign in to comment.