Skip to content

Use BasisFunctions object in post-processing #383

@brendan-m-murphy

Description

@brendan-m-murphy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions