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

function VectorProjection not found in module nbodykit.transform #689

Open
Striker-png opened this issue Aug 3, 2024 · 0 comments
Open

Comments

@Striker-png
Copy link

Hi, I'm trying to add RSD to data following an example of the guide of nbodykit
https://nbodykit.readthedocs.io/en/latest/catalogs/common-operations.html#Adding-Redshift-space-Distortions
when I encounter an error:

# apply RSD along the z axis
line_of_sight = [0,0,1]

# redshift and cosmology
redshift =  0.55; cosmo = cosmology.Cosmology(h=0.7).match(Omega0_m=0.31)

# the RSD normalization factor
rsd_factor = (1+redshift) / (100 * cosmo.efunc(redshift))

# update Position, applying RSD
src['Position'] = src['Position'] + rsd_factor * transform.VectorProjection(src['Velocity'], line_of_sight)

AttributeError: module 'nbodykit.transform' has no attribute 'VectorProjection'

So I check the source code of transform.py but find no VectorProjection function. At first, I think maybe this function has been renamed or moved into another module. Unfortunately, there is no information about VectorProjection either in changelog or in issues, and I find it still belongs to transform and remains unchanged in the official documentation.

So I'm wondering if VectorProjection has been removed or what? I'm using the latest 0.3.15 version of nbodykit.

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

1 participant