Skip to content

gh-104: Add EuclidLikelihood_DarkEmu_RealSpace for real-space GC/GGL (+ optional WL) - #105

Open
ryusei172525 wants to merge 3 commits into
mainfrom
issue-104-dark_emulator_realspace
Open

gh-104: Add EuclidLikelihood_DarkEmu_RealSpace for real-space GC/GGL (+ optional WL)#105
ryusei172525 wants to merge 3 commits into
mainfrom
issue-104-dark_emulator_realspace

Conversation

@ryusei172525

Copy link
Copy Markdown

🚀 Pull Request Checklist

✅ Summary

Add a likelihood class for real-space two-point statistics (w_p(R), ΔΣ(R), and optional WL ξ±) with theory predictions from the Dark Emulator. The existing photo likelihoods (EuclidLikelihood_WL, GCph, GGL, 3x2pt) are built on angular power spectra C_ℓ and do not accept real-space data or use the Dark Emulator. This PR adds EuclidLikelihood_DarkEmu_RealSpace so that analyses that fit real-space GC/GGL with the Dark Emulator (e.g. HSC-style) can use cloelike with a single loglike(parameters) interface.

🔄 Changes

  • Feature: New EuclidLikelihood_DarkEmu_RealSpace in EuclidLikelihood_DarkEmu_RealSpace.py — accepts optional data_gc (w_p), data_ggl (ΔΣ), data_wl (ξ±); uses DarkEmuHODPerturbations for GC/GGL theory; scale cuts via settings; Gaussian log-likelihood over combined data vector.
  • Feature: Export EuclidLikelihood_DarkEmu_RealSpace from cloelike/__init__.py.
  • Bug fix 1
  • Other improvements

🛠 How to Test

  1. From a Python environment with cloelib, cloelike, and dark_emulator_public available:
    from cloelike import EuclidLikelihood_DarkEmu_RealSpace
    from cloelib.cosmology.camb_cosmology import CAMBBackground
    # Build minimal data dicts (e.g. data_gc with keys: wp, R_bins, z_sample, covariance, pimax)
    # and settings (e.g. R_min_gc, R_max_gc, hod_params_fixed).
    # likelihood = EuclidLikelihood_DarkEmu_RealSpace(data_gc=data_gc, settings=settings, Background=CAMBBackground)
    # logl = likelihood.loglike(parameters_dict)
    # assert np.isfinite(logl)
  2. Optional: run the playground notebooks that use this likelihood (playground/tutorials/dark_emulator/fitting_gc_wp.ipynb, fitting_ggl_delta_sigma.ipynb, or fitting_3x2pt.ipynb) against a checkout that includes this cloelike branch.

📝 Documentation

  • This PR updates documentation

  • This PR does not require documentation changes

  • Issue created for documentation update: Don't forget to link the task!

  • Module and class docstrings in EuclidLikelihood_DarkEmu_RealSpace.py describe the API. Usage is documented in the playground repo (tutorials/dark_emulator/).

🏗 Related Issues

(Replace with the cloelike issue number for "Add real-space likelihood for GC/GGL (and optional WL) using Dark Emulator".)

📸 Screenshots (if applicable)

  • N/A (library change only).

📌 Additional Notes

  • Observables (w_p, ΔΣ) are obtained from the Dark Emulator via cloelib’s DarkEmuHODPerturbations, not from cloelib’s native C_ℓ/Limber pipeline. See playground/tutorials/dark_emulator/dark_emulator_observables_usage.ipynb for the intended retrieval pattern.
  • A corresponding playground PR adds tutorials and scripts that use this likelihood.

✅ PR Checklist for Developers

  • I have titled this PR before merging as "gh-#:", where "#" represents the task it closes
  • I have run locally pre-commit using pre-commit run --all-files
  • I have tested my changes locally
  • No new warnings or errors introduced
  • I have updated documentation (if applicable)
  • My changes do not introduce breaking changes
  • I have added tests (if applicable)
  • I have consistently updated the GitHub information for the project, including milestones, task types, and other relevant details.

✅ PR Checklist for Reviewers

  • The next PR targets the correct branch
  • CI tests have run and passed for the latest commit on the source branch
  • Check that the code can still be installed if new packages are imported
  • If necessary, the notebooks in the playground will be updated in a corresponding follow-up PR
  • Coverage percentage is retained or increased
  • Quality of new/changed code is acceptable
  • Quality of new/changed unit tests is acceptable
  • No data files have been included in the commits
  • Implementation follows the agreed task description point by point
  • Check that there are no No newline at the end of file warnings
  • Check that any added folder/file has been added to the README.md file
  • Check that the documentation has been updated accordantly
  • Check that the corresponding branch has been deleted after merging. If not, delete it

@ryusei172525 ryusei172525 self-assigned this Feb 12, 2026
@gcanasherrera gcanasherrera added theory issues related with dealing with the theory vectors weak-lensing labels Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theory issues related with dealing with the theory vectors weak-lensing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add real-space likelihood for GC/GGL (and optional WL) using Dark Emulator

2 participants