Skip to content

theory_fn protocol + default CCL backend + fixed pure draw #2

Description

@cailmdaley

Introduce the theory-backend protocol, the default CCL backend, and the fixed pure draw in the fork, and migrate the fork's own test suite off the module-level firecrown import.

Scope

datavector.py, param_shifts.py, and a new backend module.

  • Theory protocol + default CCL backend. Introduce theory_fn(cosmo_params) -> np.ndarray, aligned to the SACC rows, as the theory entry point; any callable satisfies it. Ship a built-in default CCL backend in a new backend module, replacing the module-level firecrown import (datavector.py:31) and the ParamsMap-through-likelihood path in calculate_concealing_factor. import smokescreen imports no theory backend; pyccl is imported inside the default-backend module at construction.
  • Firecrown sidelining. Make the firecrown import lazy — retain the path, remove the module-level import. No firecrown-defaults overlay on the default path.
  • Fixed pure draw. Replace the global-seed/order-dependent draw with a local default_rng draw, order-independent, speaking CCL-native parameter names (for example sigma8, Omega_c). No injectable draw_fn abstraction — deferred. The draw fix folds in here: with the injectable abstraction dropped it is a small change coupled to the same datavector rewrite.
  • Fork-test migration. Migrate the inherited DESC test suite (which assumes a module-level firecrown import) onto the synthetic and CCL backends.

Acceptance

  • import smokescreen succeeds with firecrown absent.
  • A synthetic callable satisfying theory_fn blinds a SACC vector end-to-end.
  • The default CCL backend blinds a standard cosmic-shear SACC file.
  • The draw is order-independent and expressed in CCL-native parameter names.
  • The migrated fork test suite passes without firecrown installed.

— Opus on behalf of Cail.

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