brinckmann / montepython_public

Public repository for the Monte Python Code
MIT License
92 stars 78 forks source link

bao_angular likelihood not working #368

Open jorgefsoriano opened 3 months ago

jorgefsoriano commented 3 months ago

As distributed with v3.6, the bao_angular likelihood seems not to work, for two independent problems:

brinckmann commented 3 months ago

Hi Jorge,

Thank you for the bug report and for including a solution. I'm surprised the first was never noticed, as that means it would have never run, oops! The second issue seems to be down to how the likelihood splits the data when reading it. Your solution would work, but I'm thinking instead to edit line 27 of __init__.py to split on tabs instead of leaving it undeclared (I wonder if default behavior changed with some python version?), i.e. instead of this_line = line.split() I'll change it to

line = line.strip('\n')
this_line = line.split(sep='\t')

That seems to work (stripping the next line also seemed to be missing, which I expect should be there). This solution leaves the data file unchanged, preserving the time stamp of when it was last edited, which I think is beneficial.

Best, Thejs

jorgefsoriano commented 3 months ago

Hi Thejs,

Happy to help. Big fan.

Best, Jorge