Current we reconstruct the inverse to the basis projections map in post-processing to recover the posterior flux trace on the original lat/lon grid from the traces on the basis regions. We also use this inverse basis map to produce country traces.
With the new BasisFunctions object being created in basis_functions_wrapper, we can use that object to apply these maps instead of re-deriving them. This should simplify the post-processing code.
If the BasisFunctions object is not created in basis_functions_wrapper (since it is currently opt-in), then post-processing should fall back to the existing ("legacy") code.
Deliverable:
- Postprocessing can consume retained
BasisFunctions when present.
- If absent, falls back to legacy basis reconstruction.
Key change:
- Prefer
BasisFunctions.operator.basis_matrix for flux/country computations when object is available.
Acceptance criteria:
- New and fallback paths produce equal (or tolerance-equivalent) totals on shared test cases.
Current we reconstruct the inverse to the basis projections map in post-processing to recover the posterior flux trace on the original lat/lon grid from the traces on the basis regions. We also use this inverse basis map to produce country traces.
With the new
BasisFunctionsobject being created inbasis_functions_wrapper, we can use that object to apply these maps instead of re-deriving them. This should simplify the post-processing code.If the
BasisFunctionsobject is not created inbasis_functions_wrapper(since it is currently opt-in), then post-processing should fall back to the existing ("legacy") code.Deliverable:
BasisFunctionswhen present.Key change:
BasisFunctions.operator.basis_matrixfor flux/country computations when object is available.Acceptance criteria: