baudren / montepython_public

Public repository for the Monte Python Code
MIT License
65 stars 115 forks source link

How to assign more than one m_ncdm? #73

Closed shouvikrc closed 7 years ago

shouvikrc commented 7 years ago

Suppose I have N_ncdm = 2 in the Montepython input file and I want the two species of non-cold dark matter to have different masses. In that case what would be the correct format to assign m_ncdm values (for both in case of data.parameters['m_ncdm'] and data.cosmo_arguments['m_ncdm'] formats)? Please provide a solution. Note: I tried something like: "data.cosmo_arguments['m_ncdm'] = 0.06, 1.0". It leads to the following error: Cosmological Module Error: /|\ Something went wrong when calling CLASS /o\ Error in Class: input_init(L:402) :error in input_read_parameters(&(fzw.fc), ppr, pba, pth, ppt, ptr, ppm, psp, pnl, ple, pop, errmsg); =>input_read_parameters(L:818) :error in parser_read_list_of_doubles(pfc,"m_ncdm", &entries_read,&(pba->m_ncdm_in_eV),&flag1,errmsg); =>parser_read_list_of_doubles(L:432) :condition (sscanf(string_with_one_value,"%lg",&(list[i-1])) != 1) is true; could not read 1th value of list of parameters m_ncdm in file NOFILE

I also tried the, "data.parameters['m_ncdm'] = [ ], [ ]" format (since I want to vary the parameters also, not just keep them fixed. But this also leads to the error:

IndexError: tuple index out of range