CCL icon indicating copy to clipboard operation
CCL copied to clipboard

BaccoemuBaryons does not check for k or a ranges

Open tilmantroester opened this issue 1 year ago • 3 comments

I just tried BaccoemuBaryons but ran into a bunch of issues.

The following snipped fails with an opaque error, because the k and a ranges in https://github.com/LSSTDESC/CCL/blob/master/pyccl/baryons/baccoemu_baryons.py#L47 are never checked:

import numpy as np
import pyccl as ccl

bacco_emu = ccl.BaccoemuBaryons()
cosmo_bacco = ccl.CosmologyVanillaLCDM()
baryon_pk = bacco_emu.include_baryonic_effects(
    cosmo=cosmo_bacco, pk=cosmo_bacco.get_nonlin_power()
)

Installing baccoemu was quite painful as well. For one, the last release on pip is from 2021. Because it is not on conda, it tries to install a bunch of things from pip that was in conflict with my conda environment.

tilmantroester avatar Jul 18 '23 16:07 tilmantroester

@matteozennaro may be able to help

damonge avatar Jul 18 '23 16:07 damonge

In the meantime, this is what we do to install baccoemu in GHA: https://github.com/LSSTDESC/CCL/blob/86125b08f66b27341e9bb67403f3f0ca3cece359/.github/environment.yml#L19C1-L19C73

damonge avatar Jul 18 '23 16:07 damonge

GHA seem to install numpy twice (https://github.com/LSSTDESC/CCL/actions/runs/5552350593/jobs/10139592538?pr=1103#step:8:255) as well, but due to class in that case...

tilmantroester avatar Jul 18 '23 16:07 tilmantroester