class_public icon indicating copy to clipboard operation
class_public copied to clipboard

`k_output_values` does not follow the gauge of computation

Open lingyuanji opened this issue 5 years ago • 3 comments

The mode evolutions obtained from k_output_values in the initial file do not follow the gauge of computation. No matter what gauge is specified in the initial file (i.e. newtonian or synchronous), the mode evolutions are always the same.

However, the transfer functions obtained from output = mTk appear to follow the gauge of computation. Moreover, when gauge = newtonian, the mode evolutions fromk_output_values at z = 0 are the same as the transfer function for all k. This seem to imply that no matter what gauge is set, k_output_values always follow newtonian gauge.

So what is the gauge of mode evolutions obtained using k_output_values?

lingyuanji avatar Nov 26 '19 01:11 lingyuanji

With help from Vivian Poulin I have figured out where this happens in the code: it is in the 'perturb_print_variables' and starts with the comment: "/* converting synchronous variables to newtonian ones */". By commenting this out you can get synchronous gauge mode evolution.

tsmith2 avatar Oct 19 '20 15:10 tsmith2

Thanks for providing this workaround! But I think the desired behavior of the code probably is that all outputs should be consistent with gauge. So I will leave this issue open in case the developers would like to have it as a reminder.

lingyuanji avatar Oct 19 '20 17:10 lingyuanji

I stumbled upon the same issue of gauge in k_output_values. I agree with @lingyuanji that the output should be consistent with the user input. I believe this can be fixed by simply changing "if (ppt->gauge == synchronous)" to "if (ppt->gauge == newtonian)" in the gauge transformation section.

anirbandas89 avatar Mar 10 '22 06:03 anirbandas89