Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bao_angular likelihood not working #368

Open
jorgefsoriano opened this issue Apr 7, 2024 · 2 comments
Open

bao_angular likelihood not working #368

jorgefsoriano opened this issue Apr 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jorgefsoriano
Copy link

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

  • First, in the __init__.py file, the function is called bao_boss instead of bao_angular.
  • Second, in the data file bao_angular.txt, the first column is supposed to represent the catalog the data comes from. When the likelihood function is reading the data, in a string like SDSS DR7 0.235 9.06 0.23 8, the first word is taken as SDSS, and the the string DR7 is attempted to save as the redshift. It can be solved by rewriting SDSS-DR7.
@brinckmann
Copy link
Owner

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

@brinckmann brinckmann added the bug Something isn't working label Apr 10, 2024
@jorgefsoriano
Copy link
Author

Hi Thejs,

Happy to help. Big fan.

Best,
Jorge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants