Repository navigation
Conversation
cfranken
referenced
this pull request
in RemoteSensingTools/CanopyOptics.jl
Nov 7, 2026
cfranken
marked this pull request as ready for review
November 7, 2026 03:17
…on-precision Preserve thin-layer canopy transmission increments in Float32
Co-authored-by: cfranken <10467190+cfranken@users.noreply.github.com>
This branch has not been deployed
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
CanopySurface.canopy_quadrature.n_leafdiffers from the projection routine's default, the canopy cache uses one leaf-angle quadrature for directional extinction and another for scattering. Internal layer absorption then disagrees with the leaf-area-integrated APAR. This remains present on current main, including the recent canopy polarization fix.Pass
canopy.canopy_quadraturetoCanopyOptics.Gbefore applying clumping and moving the projection array to the selected architecture. Require CanopyOptics 0.2.1 in the package and test environments, which provides consistent projection/scattering normalization through RemoteSensingTools/CanopyOptics.jl#63.Dependency: CanopyOptics #63 is merged and v0.2.1 is published and registered in General. This PR is ready for review. Hosted checks were rerun after registration. The minimum version prevents silently combining the new cache preparation with the old phase normalization; no manifest or local dependency path is committed.
Validation on Julia 1.12.6 with the companion CanopyOptics checkout:
From
test/, runjulia --project=.. -e 'using Test; include("test_canopy.jl")'with the companion CanopyOptics checkout developed in the environment. The complete atmospheric suite and GPU/Metal execution were not rerun for this cache-preparation fix.The larger differences between native two-stream and multi-stream APAR are a separate closure-accuracy issue; this PR fixes the inconsistent numerical leaf measure.