You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When transforming from cartesian to sky coordinates, an error arises regarding the expected and actual dimensions of the output array, e.g. I have a catalog of N objects, the expected array would be Nx3 but output from the function is 3Nx1.
Also, not sure if it is a problem or not, but function won't execute if observer position is just a list, i.e. [x, y, z], it only runs when the input is in daks.array type.
Steps To Reproduce
From any mock catalogue, run the function trying to assign it to new position column in the catalog:
Actual behaviour
Returns (if observer position is dask.array type) an array of dimension 3Nx1
Expected behaviour
To obtain an array of dimension Nx3.
Version
version 0.3.16dev0
Additional context
I looked in the source code and found that the problem is when stacking the (RA, DEC, z) arrays into one array, as in the source code:
return da.stack((ra, dec, z), axis=0)
and should be
return da.stack((ra, dec, z), axis=1)
or
return da.stack((ra, dec, z), axis=-1)
I implemented this change in my personal installation and worked as expected.
The text was updated successfully, but these errors were encountered:
Describe the bug
When transforming from cartesian to sky coordinates, an error arises regarding the expected and actual dimensions of the output array, e.g. I have a catalog of N objects, the expected array would be Nx3 but output from the function is 3Nx1.
Also, not sure if it is a problem or not, but function won't execute if observer position is just a list, i.e. [x, y, z], it only runs when the input is in daks.array type.
Steps To Reproduce
From any mock catalogue, run the function trying to assign it to new position column in the catalog:
cat['Sky_coords'] = nbodykit.transform.CartesianToSky(pos=cat['Position'], cosmo=cosmo, velocity=None, observer=dask.array.from_array([0, 0, 0]), zmax=100.0, frame='icrs')
Actual behaviour
Returns (if observer position is dask.array type) an array of dimension 3Nx1
Expected behaviour
To obtain an array of dimension Nx3.
Version
version 0.3.16dev0
Additional context
I looked in the source code and found that the problem is when stacking the (RA, DEC, z) arrays into one array, as in the source code:
and should be
or
I implemented this change in my personal installation and worked as expected.
The text was updated successfully, but these errors were encountered: