CCL icon indicating copy to clipboard operation
CCL copied to clipboard

camb bbn module not always available

Open itrharrison opened this issue 1 year ago • 1 comments

I have managed to encounter a situation in which the line:

https://github.com/LSSTDESC/CCL/blob/dfa2b3b7be13afef0da11b5c4392e413af4e67eb/pyccl/boltzmann.py#L118

returns an error as the camb.bbn module is not directly available.

Confusingly (for me anyway), the bbn module is listed in the camb docs, but not in the camb __init__.py here.

I have also been able to directly access camb.bbn at other times 🤷 .

Either way I note that camb.model.bbn is always available, so an easy fix would be to replace the above line with

cp.bbn_predictor = camb.model.bbn.get_predictor()

itrharrison avatar Jun 13 '24 14:06 itrharrison

...okay, this also happens with camb.constants (with camb.model.constants being available). I will try and work out what has gone strange with the camb import I am using (from cobaya packages).

itrharrison avatar Jun 13 '24 14:06 itrharrison

@itrharrison did you figure out if this is a general issue we should solve or just a result of your particular import system?

damonge avatar Nov 09 '24 00:11 damonge

@itrharrison , I'll close this for now, but let me know if you think this is a general issue we should worry about.

damonge avatar Nov 13 '24 11:11 damonge