FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

spatial/variograms errata: Wrapping, Gauss instead of Matérn, formatting by falkmielke · Pull Request #374 · inbo/tutorials · GitHub

/ tutorials Public

spatial/variograms errata: Wrapping, Gauss instead of Matérn, formatting - #374

Merged
falkmielke merged 2 commits into
masterfrom
variograms_errata
May 27, 2026
Merged

spatial/variograms errata: Wrapping, Gauss instead of Matérn, formatting#374
falkmielke merged 2 commits into
masterfrom
variograms_errata

Conversation

Copy link
Copy Markdown
Contributor

This PR corrects minor errors in the tutorial on spatial analysis / variograms.

  • There was a putative error in the interval wrapping function; I have double checked the new one in a separate article (linked as footnote; but the link is optional -> feel free to remove).
  • formatting: space missing before a quote
  • reference to a wrong distribution function

This has very minor implications for the actual (randomly generated) data.
Therefore, I suggest to not re-calculate and re-commit the figure binaries.
(Instead, I have simply corrected the respective code lines.)

falkmielke added the bug label Apr 1, 2026
falkmielke changed the title variograms_errata: (wip) Gauss instead of Matérn spatial/variograms errata: Wrapping, Gauss instead of Matérn, formatting Apr 1, 2026

Copy link
Copy Markdown
Contributor Author

(The commit message says "wip", but no more progress is required: this is ready for review and merge. Thank you in advance!)

bserrien left a comment
edited
Loading

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Hello Falk, the .qmd and the index.md file now contain different code for the wrap_difference() function. I believe the index.md file is correct (%% extent). Should the two not be the same? Is the space you imagine for this wrapping something like the game of snake?

falkmielke commented May 26, 2026
edited
Loading

Copy link
Copy Markdown
Contributor Author

Hello Falk, the .qmd and the index.md file now contain different code for the wrap_difference() function. [...] Should the two not be the same?

Indeed. Thank you for checking @bserrien , and sorry that I missed that!

I believe the index.md file is correct (%% extent).

Which of the two formulas is correct depends on the usage of extent on the rest of the code (and whether extend is defined as half or full wrapping period). Here, spatial positions can be positive and negative, and thus the full period (analogous: "diameter") is twice the extent, and we shift by 1* extent ("radius").

Just to make sure, I have tried rendering both versions again.

((Y - X + (extent/2)) %% (extent)) - (extent/2) produces the following wraps:

... clearly there is some unwanted periodicity with half the extent.

Conclusion that the formula in .qmd was correct, it must be: ((Y - X + (extent)) %% (2*extent)) - (extent))

Is the space you imagine for this wrapping something like the game of snake?

Nice analogy; and maybe the availability of old nokia phones in my teens has lead to a subconscious "snake" image. But that was not my first thought.

bserrien left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Hi Falk, thanks for correcting me on the modulo. I will now approve the revision.

falkmielke merged commit 7e9fb10 into master May 27, 2026
1 check passed
falkmielke deleted the variograms_errata branch May 27, 2026 06:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL