Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv committed Oct 26, 2023
1 parent 7d28a2f commit 34fe188
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/GeoStatsProcessesImageQuiltingExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ using Meshes
using GeoTables

using GeoStatsBase: initbuff
using ImageQuilting: iqsim, lin2cart
using ImageQuilting: iqsim

using GeoStatsProcesses: IQ, RandSetup

import GeoStatsProcesses: randprep, randsingle
Expand All @@ -19,6 +20,7 @@ function randprep(::AbstractRNG, process::IQ, setup::RandSetup)
# retrieve domain info
sdomain = setup.domain
simsize = size(sdomain)
lin2cart = CartesianIndices(simsize)
Dim = embeddim(sdomain)

# retrieve process paramaters
Expand Down Expand Up @@ -52,7 +54,7 @@ function randprep(::AbstractRNG, process::IQ, setup::RandSetup)

# create hard data object
linds = findall(mask[var])
cinds = [lin2cart(simsize, ind) for ind in linds]
cinds = [lin2cart[ind] for ind in linds]
hvals = view(buff[var], linds)
hard = Dict{CartesianIndex{Dim},Real}()
for (ind, val) in zip(cinds, hvals)
Expand Down

0 comments on commit 34fe188

Please sign in to comment.