Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci_support/environment-old.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- pymatgen =2022.2.1
- pyscal3 =3.2.5
- scikit-learn =1.2.1
- scipy =1.9.3
- scipy =1.15.0
- spglib =1.16.5
- sqsgenerator =0.2
- hatchling =1.27.0
Expand Down
6 changes: 3 additions & 3 deletions structuretoolkit/analyse/neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scipy.sparse import coo_matrix
from scipy.spatial import cKDTree
from scipy.spatial.transform import Rotation
from scipy.special import gamma, sph_harm
from scipy.special import gamma, sph_harm_y

from structuretoolkit.common.helper import (
get_average_of_unique_labels,
Expand Down Expand Up @@ -667,7 +667,7 @@ def get_spherical_harmonics(
The angles are calculated based on `self.vecs`, where the azimuthal angle is defined on the
xy-plane and the polar angle is along the z-axis.

See more on: scipy.special.sph_harm
See more on: scipy.special.sph_harm_y

"""
vecs = self.filled.vecs
Expand All @@ -684,7 +684,7 @@ def get_spherical_harmonics(
phi[within_cutoff] = np.arctan2(
np.linalg.norm(vecs[within_cutoff, :2], axis=-1), vecs[within_cutoff, 2]
)
return np.sum(sph_harm(m, l, theta, phi) * within_cutoff, axis=-1) / np.sum(
return np.sum(sph_harm_y(l, m, phi, theta) * within_cutoff, axis=-1) / np.sum(
within_cutoff, axis=-1
)

Expand Down
Loading