Skip to content

Commit

Permalink
more maj tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Weiss committed Nov 6, 2020
1 parent 7739b7a commit 40d371b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file modified spheres/__pycache__/stars.cpython-38.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions spheres/stars.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,13 @@ def spin_poly(spin, projective=False,\
(((-1)**(int(m+j)))*\
np.sqrt(factorial(2*j)/(factorial(j-m)*factorial(j+m))))
for m in np.arange(-j, j+1)])
if analytic or cartesian or spherical:
if projective or cartesian or spherical:
def __poly__(z):
prefactor = 1/(1+abs(z if z != np.inf else 0)**2)**j if normalized else 1
return prefactor*sum([c*(z if z != np.inf else 0)**i\
for i, c in enumerate((poly if z != np.inf\
else poleflip(poly))[::-1])])
if analytic:
if projective:
return __poly__
if cartesian:
def __cartesian__(*args):
Expand Down
2 changes: 1 addition & 1 deletion tests/temp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
c = spin_c(spin)
s = spin_sph(spin)

poly = spin_poly(spin, analytic=True, normalized=True)
poly = spin_poly(spin, projective=True, normalized=True)
hom = spin_poly(spin, homogeneous=True, normalized=True)
cart = spin_poly(spin, cartesian=True, normalized=True)
sphr = spin_poly(spin, spherical=True, normalized=True)
Expand Down

0 comments on commit 40d371b

Please sign in to comment.