Skip to content

Add Cacciato-style conditional luminosity function / HOD modelling component #7

Description

@nikosarcevic

Goal

Add a Cacciato-style conditional luminosity function / HOD modelling component that can be used directly in the DSF data-vector modelling layer.

The goal is to make this model available as an optional galaxy-matter modelling choice for $\Delta\Sigma(R)$, without hardwiring it into the core data-vector calculator.

This is extra modelling functionality for DSF now, but it should be written in a clean enough way that it can eventually be moved into CCL or used as a CCL HOD example.

Scope

Add the new implementation in a separate file, for example:

src/dsf/data_vector/conditional_luminosity_function.py

or a similarly clear name such as:

src/dsf/data_vector/clf_hod.py

Then expose a simple wrapper or import through the existing data-vector modelling layer so that it can be called from modelling.py.

The current DSF modelling setup already supports power-spectrum-backed model components, including HOD galaxy-matter spectra, baryonified HOD spectra, and HOD+NLA variants. The new CLF/HOD model should follow the same spirit: it should return something that can be passed into the existing $\Delta\Sigma$ calculation through the modelling hook rather than requiring changes to the calculator itself.

Suggested implementation

Implement a Cacciato-style conditional luminosity function / HOD model with a clean user-facing function, for example:

pk2d_cacciato_clf_hod(...)

or, if the first step is not yet a full Pk2D model:

cacciato_clf_hod_occupation(...)

The exact API can depend on the model requirements, but it should be possible to call it from the DSF modelling layer with explicit keyword arguments.

The implementation should support, where relevant:

  • central galaxy occupation
  • satellite galaxy occupation
  • luminosity-threshold or luminosity-bin selection
  • galaxy number density / normalization
  • effective galaxy bias
  • galaxy-matter power spectrum construction
  • clear handling of required model parameters

The first version does not need to support every possible CLF extension. It should prioritize a clean, tested baseline implementation that can be compared against the literature and later extended.

Design requirements

  • Keep the implementation separate from the core $\Delta\Sigma$ calculator.
  • Do not hardwire Cacciato CLF/HOD assumptions into the generic data-vector code.
  • Make the model callable through the existing modelling interface.
  • Use explicit keyword arguments for model parameters.
  • Add validation for required parameters and numerical inputs.
  • Keep units and mass definitions clearly documented.
  • Keep the code close in structure to something that could later become a CCL example or CCL contribution.
  • Must include unit test and pass linting requirements of dsf.

Suggested checks

Add tests or example checks for:

  • finite central occupation values
  • finite satellite occupation values
  • positive galaxy normalization
  • reasonable effective galaxy bias
  • stable output over a small mass grid and scale-factor grid
  • compatibility with the existing (\Delta\Sigma) data-vector path
  • comparison to the existing simpler HOD model where appropriate

Suggested outputs / examples

Add a small example script or docs example showing how to use the new model in DSF, for example:

examples/cacciato_clf_hod_delta_sigma.py

or, if examples are not ready yet, at least add a minimal test that demonstrates the model can be passed through the existing modelling hook and used to compute $\Delta\Sigma(R)$.

Acceptance criteria

  • A new Cacciato-style CLF/HOD modelling file exists under src/dsf/data_vector/.
  • The model is exposed through the existing DSF modelling layer.
  • The model can be called directly with explicit keyword arguments.
  • The implementation does not require changes to the core $\Delta\Sigma$ calculator.
  • The model can be used as a pk2d_func-style hook where appropriate.
  • Central and satellite terms are implemented or clearly staged.
  • Galaxy normalization and/or effective galaxy bias can be computed.
  • Basic validation and numerical sanity checks are included.
  • At least one test or example demonstrates that the model works inside the DSF data-vector workflow.
  • The code is written in a way that could later be adapted into a CCL HOD example.

Notes

This should stay modular. The purpose is not to redesign the DSF data-vector machinery, but to add a new modelling option that plugs into the current structure. If the full Cacciato CLF/HOD implementation becomes too large, the first PR can add the baseline occupation and normalization pieces, with follow-up issues for full galaxy-matter $P_k$, luminosity-bin selections, and CCL integration.

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions