EcoJulia / NeutralLandscapes.jl

Generation of neutral landscapes in Julia.
https://ecojulia.github.io/NeutralLandscapes.jl/dev/
MIT License
16 stars 2 forks source link

:sparkles: SimpleSDMLayers integration for masking #63

Closed gottacatchenall closed 2 years ago

gottacatchenall commented 2 years ago

What the pull request does
Lets users mask NeutralLandscapes by passing an SDMLayer to the mask keyword argument to rand.

e.g.

using SimpleSDMLayers
using NeutralLandscapes
bbox = (left=-83.0, bottom=46.4, right=-55.2, top=63.7)
temp = convert(Float32, SimpleSDMPredictor(WorldClim, BioClim, 7; bbox...))

mpd = rand(MidpointDisplacement(), size(temp), mask=temp)

Type of change
Please indicate the relevant option(s)

Checklist

codecov[bot] commented 2 years ago

Codecov Report

Base: 86.74% // Head: 86.44% // Decreases project coverage by -0.29% :warning:

Coverage data is based on head (dc8ce30) compared to base (349e682). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #63 +/- ## ========================================== - Coverage 86.74% 86.44% -0.30% ========================================== Files 18 19 +1 Lines 362 391 +29 ========================================== + Hits 314 338 +24 - Misses 48 53 +5 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `86.44% <100.00%> (-0.30%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia) | Coverage Δ | | |---|---|---| | [src/landscape.jl](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#diff-c3JjL2xhbmRzY2FwZS5qbA==) | `100.00% <ø> (ø)` | | | [src/NeutralLandscapes.jl](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#diff-c3JjL05ldXRyYWxMYW5kc2NhcGVzLmps) | `100.00% <100.00%> (ø)` | | | [src/integrations/simplesdmlayers.jl](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#diff-c3JjL2ludGVncmF0aW9ucy9zaW1wbGVzZG1sYXllcnMuamw=) | `100.00% <100.00%> (ø)` | | | [src/makers/nnelement.jl](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#diff-c3JjL21ha2Vycy9ubmVsZW1lbnQuamw=) | `80.76% <0.00%> (-2.57%)` | :arrow_down: | | [src/updaters/update.jl](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#diff-c3JjL3VwZGF0ZXJzL3VwZGF0ZS5qbA==) | `100.00% <0.00%> (ø)` | | | [src/makers/nncluster.jl](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#diff-c3JjL21ha2Vycy9ubmNsdXN0ZXIuamw=) | `100.00% <0.00%> (ø)` | | | [src/makers/diamondsquare.jl](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#diff-c3JjL21ha2Vycy9kaWFtb25kc3F1YXJlLmps) | `100.00% <0.00%> (ø)` | | | [src/makers/distancegradient.jl](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#diff-c3JjL21ha2Vycy9kaXN0YW5jZWdyYWRpZW50Lmps) | `100.00% <0.00%> (ø)` | | | [src/makers/rectangularcluster.jl](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#diff-c3JjL21ha2Vycy9yZWN0YW5ndWxhcmNsdXN0ZXIuamw=) | `100.00% <0.00%> (ø)` | | | [src/makers/perlinnoise.jl](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia#diff-c3JjL21ha2Vycy9wZXJsaW5ub2lzZS5qbA==) | `92.06% <0.00%> (+0.39%)` | :arrow_up: | | ... and [1 more](https://codecov.io/gh/EcoJulia/NeutralLandscapes.jl/pull/63/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=EcoJulia)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.