lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
234 stars 289 forks source link

Exoclass compatible with python notebooks #458

Open astrogirl1 opened 2 years ago

astrogirl1 commented 2 years ago

Hi all,

I am working with the ExoCLASS branch and the modifications that come with it. Everything works successfully using an *.ini input file and a call to DarkAges. But my question is: Is there a way I can use python notebooks/scripts (eg. warmup.py) to access certain functions and their outputs in background.c or thermodynamics.c that were modified under ExoCLASS?

I have also tried modifying "cosmo.get_thermodynamics()" but to no avail.

Also, in my attempts right now, my python script does not recognize ExoCLASS inputs and I get the following error :

"File "scripts/energy.py", line 20, in <module>
    cosmo.compute()
  File "classy.pyx", line 371, in classy.Class.compute
classy.CosmoSevereError: 

Error in Class: Class did not read input parameter(s): injected_particle_branching_ratio" etc. 

Is there a different place I should ask my question? Thanks for any help!

Thanks, Meera

lesgourg commented 2 years ago

Hi @astrogirl1 , yes, this is the right place for this question. I am a bit surprised that there is such an issue, I should test it myself and send you some feedback. If you don't hear from my quickly, don't hesitate to send me reminders by email, at lesgourg@physik.rwth-aachen.de.