Skip to content

Commit

Permalink
fix assertion logic in surface FT
Browse files Browse the repository at this point in the history
  • Loading branch information
smiet committed May 24, 2024
1 parent 4983382 commit 06cfbce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simsopt/geo/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,8 @@ def fourier_transform_field(self, field, mpol=None, ntor=None, normalization=Non
- A_mnc: 2D array of shape (mpol+1, 2*ntor+1) containing the cosine coefficients
(these are zero if the surface is stellarator symmetric)
"""
assert field.shape[0]!= self.quadpoints_phi.size,"Field must be evaluated at the quadrature points on the surface.\n the field you passed in has shape {}".format(field.shape)
assert field.shape[1] != self.quadpoints_theta.size,"Field must be evaluated at the quadrature points on the surface.\n the field you passed in has shape {}".format(field.shape)
assert field.shape[0] == self.quadpoints_phi.size,"Field must be evaluated at the quadrature points on the surface.\n the field you passed in has shape {}".format(field.shape)
assert field.shape[1] == self.quadpoints_theta.size,"Field must be evaluated at the quadrature points on the surface.\n the field you passed in has shape {}".format(field.shape)
stellsym = kwargs.pop('stellsym', self.stellsym)
if mpol is None:
try: mpol = self.mpol
Expand Down

0 comments on commit 06cfbce

Please sign in to comment.