LSSTDESC / CCL

DESC Core Cosmology Library: cosmology routines with validated numerical accuracy
BSD 3-Clause "New" or "Revised" License
145 stars 64 forks source link

BaccoemuBaryons does not check for k or a ranges #1107

Open tilmantroester opened 1 year ago

tilmantroester commented 1 year ago

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.

damonge commented 1 year ago

@matteozennaro may be able to help

damonge commented 1 year ago

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

tilmantroester commented 1 year ago

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...