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)
223 stars 292 forks source link

Unrecognized parameters in python wrapper #459

Open mattcarney106 opened 2 years ago

mattcarney106 commented 2 years ago

Hi everyone,

I've been learning CLASS for some future research projects and ran into some issues when I wanted to generate additional metric transfer functions, specifically in CLASS's python wrapper. Parameters like "extra_metric_transfer_functions" and "tensor_method" seem to be unrecognized when they're specified within a python script, but work fine when running via command line. Are parameter names different between the ini files and the python wrapper?

Thanks, Matt Carney

lesgourg commented 2 years ago

HI @mattcarney106 , Absolutely not, the parameter names are strictly the same in the .ini files and the python wrapper, because there is no conversion layer in between. So you should pass to the python wrapper something like: xxx.set({..., 'extra_metric_transfer_functions':'yes', 'tensor_method':'massless', ...}) Is this what you are doing? If yes, what makes you think that there is a problem? Maybe there is something missing in the wrapper concerning these options that we can correct, but it should not be at the level of reading parameters.