mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-22 17:08:03 +00:00
Fix bug
This commit is contained in:
parent
e28739835b
commit
e7e1015279
1 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue