error introduce new parameters CLASS/AxiCLASS/classy

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Margionet D
Posts: 1
Joined: January 26 2023
Affiliation: Instituto de Astronomía Teórica y Experimental

error introduce new parameters CLASS/AxiCLASS/classy

Post by Margionet D » January 26 2023

Hello, people

I have an error when I try to introduce new parameters to AxiCLASS.
I need to calculate the angular power spectrum of the axion particle,
but when introduce the parameters e.g., the mass into dictionary,

Code: Select all

#############################################
#
# Cosmological parameters and other CLASS parameters
#
common_settings = {# wich output? ClTT, transfer functions delta_i and theta_i
                   'output':'tCl lCl', 
                   # LambdaCDM parameters
                   'h':0.67556,
                   'omega_b':0.022032,
                   'omega_cdm':0.12038,
                   'A_s':2.215e-9,
                   'tau_reio':0.0925,
                   # Take fixed value for primordial Helium (instead of automatic BBN adjustment)
                   'YHe':0.246, 
                   # other output and precision parameters
                   #'l_max_scalars':3000,
                   #'scf_potential':'axion',
                   #'n_axion':1,
                    }
                         

Code: Select all

##############
#    
# call CLASS 
#
###############
#
# scalars only
#
M = Class()
M.set(common_settings)
M.set({'output':'tCl, lCl','modes':'s','lensing':'no','n_s':0.9619,'l_max_scalars':3000 })
M.compute()
cls = M.raw_cl(3000)
M.struct_cleanup()
M.empty()


iPython prints:

---------------------------------------------------------------------------

Code: Select all

CosmoSevereError                          Traceback (most recent call last)
Input In [47], in <cell line: 12>()
     10 M.set(common_settings)
     11 M.set({'output':'tCl, lCl','modes':'s','lensing':'no','n_s':0.9619,'l_max_scalars':3000 })
---> 12 M.compute()
     13 cls = M.raw_cl(3000)
     14 M.struct_cleanup()

File classy.pyx:372, in classy.Class.compute()

CosmoSevereError: 

Error in Class: Class did not read input parameter(s): n_axion

The libreries import:


# import necessary modules
# uncomment to get plots displayed in notebook
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from classy import Class
from scipy.optimize import fsolve
from scipy.interpolate import interp1d
import math



Please, I need healp because is for an exam.
Thansk
cheers!

Post Reply