This commit is contained in:
rstiskalek 2023-06-01 22:57:46 +01:00
parent e28739835b
commit e7e1015279

View File

@ -75,10 +75,10 @@ def radec_to_cartesian(X, isdeg=True):
if isdeg: if isdeg:
ra = numpy.deg2rad(ra) ra = numpy.deg2rad(ra)
dec = numpy.deg2rad(dec) dec = numpy.deg2rad(dec)
x = numpy.cos(dec) * numpy.cos(ra) x = dist * numpy.cos(dec) * numpy.cos(ra)
y = numpy.cos(dec) * numpy.sin(ra) y = dist * numpy.cos(dec) * numpy.sin(ra)
z = numpy.sin(dec) z = dist * numpy.sin(dec)
return dist * numpy.vstack([x, y, z]).T return numpy.vstack([x, y, z]).T
def real2redshift(pos, vel, origin, box, in_box_units, periodic_wrap=True, def real2redshift(pos, vel, origin, box, in_box_units, periodic_wrap=True,