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

[BUG] The lightcone_coords attribute of a LightCone class seems to be wrongly defined #344

Open
frankn1ng opened this issue Sep 6, 2023 · 1 comment

Comments

@frankn1ng
Copy link

frankn1ng commented Sep 6, 2023

In outputs.py, the lightcone_coords attribute of a LightCone class is defined as follows:

def lightcone_coords(self):
    """Co-ordinates [Mpc] of each cell along the redshift axis."""
    return np.linspace(0, self.lightcone_dimensions[-1], self.n_slices)

I believe the intention was to create an array with fixed intervals of cell_size. However, the code here does not achieve this because both ends are included, and the interval will be slightly increased from cell_size. Changing the above line to

return np.linspace(0, self.lightcone_dimensions[-1], self.n_slices, endpoint=False)

should do.

@frankn1ng frankn1ng added the bug label Sep 6, 2023
@steven-murray
Copy link
Member

Thanks @Frank-N1ng, this is true, and is fixed in an open PR (I can't remember which). I hope to be merging it soon.

@github-actions github-actions bot removed the bug label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants