ignore some lint
This commit is contained in:
parent
c6c9159b13
commit
a1568a6f16
6 changed files with 30 additions and 24 deletions
|
|
@ -262,7 +262,7 @@ def maxwell_operator(
|
|||
else:
|
||||
# transform from mn to xyz
|
||||
b_xyz = (m * b_m
|
||||
+ n * b_n) # noqa: E128
|
||||
+ n * b_n) # noqa
|
||||
|
||||
# divide by mu
|
||||
temp = ifftn(b_xyz, axes=range(3))
|
||||
|
|
@ -409,7 +409,7 @@ def inverse_maxwell_operator_approx(
|
|||
else:
|
||||
# transform from mn to xyz
|
||||
h_xyz = (m * hin_m
|
||||
+ n * hin_n) # noqa: E128
|
||||
+ n * hin_n) # noqa
|
||||
|
||||
# multiply by mu
|
||||
temp = ifftn(h_xyz, axes=range(3))
|
||||
|
|
@ -474,7 +474,7 @@ def find_k(
|
|||
`(k, actual_frequency, eigenvalues, eigenvectors)`
|
||||
The found k-vector and its frequency, along with all eigenvalues and eigenvectors.
|
||||
"""
|
||||
direction = numpy.array(direction) / norm(direction)
|
||||
direction = numpy.array(direction) / norm(direction) # type: ignore[operator]
|
||||
|
||||
k_bounds = tuple(sorted(k_bounds)) # type: ignore # we know the length already...
|
||||
assert len(k_bounds) == 2
|
||||
|
|
@ -504,7 +504,7 @@ def find_k(
|
|||
assert n is not None
|
||||
assert v is not None
|
||||
actual_frequency = get_f(float(res.x), band)
|
||||
return direction * float(res.x), float(actual_frequency), n, v
|
||||
return direction * float(res.x), float(actual_frequency), n, v # type: ignore[operator,return-value]
|
||||
|
||||
|
||||
def eigsolve(
|
||||
|
|
|
|||
|
|
@ -87,14 +87,14 @@ def near_to_farfield(
|
|||
|
||||
# Normalized vector potentials N, L
|
||||
N = [-Hn_fft[1] * cos_phi * cos_th + Hn_fft[0] * cos_phi * sin_th,
|
||||
Hn_fft[1] * sin_th + Hn_fft[0] * cos_th] # noqa: E127
|
||||
Hn_fft[1] * sin_th + Hn_fft[0] * cos_th] # noqa
|
||||
L = [ En_fft[1] * cos_phi * cos_th - En_fft[0] * cos_phi * sin_th,
|
||||
-En_fft[1] * sin_th - En_fft[0] * cos_th] # noqa: E128
|
||||
-En_fft[1] * sin_th - En_fft[0] * cos_th] # noqa
|
||||
|
||||
E_far = [-L[1] - N[0],
|
||||
L[0] - N[1]] # noqa: E127
|
||||
L[0] - N[1]] # noqa
|
||||
H_far = [-E_far[1],
|
||||
E_far[0]] # noqa: E127
|
||||
E_far[0]] # noqa
|
||||
|
||||
theta = numpy.arctan2(ky, kx)
|
||||
phi = numpy.arccos(cos_phi)
|
||||
|
|
@ -203,9 +203,9 @@ def far_to_nearfield(
|
|||
|
||||
# Normalized vector potentials N, L
|
||||
L = [0.5 * E_far[1],
|
||||
-0.5 * E_far[0]] # noqa: E128
|
||||
-0.5 * E_far[0]] # noqa
|
||||
N = [L[1],
|
||||
-L[0]] # noqa: E128
|
||||
-L[0]] # noqa
|
||||
|
||||
En_fft = [
|
||||
numpy.divide(
|
||||
|
|
|
|||
|
|
@ -373,8 +373,10 @@ def normalized_fields_e(
|
|||
"""
|
||||
e = exy2e(wavenumber=wavenumber, dxes=dxes, epsilon=epsilon) @ e_xy
|
||||
h = exy2h(wavenumber=wavenumber, omega=omega, dxes=dxes, epsilon=epsilon, mu=mu) @ e_xy
|
||||
e_norm, h_norm = _normalized_fields(e=e, h=h, omega=omega, dxes=dxes, epsilon=epsilon,
|
||||
mu=mu, prop_phase=prop_phase)
|
||||
e_norm, h_norm = _normalized_fields( # type: ignore[call-arg]
|
||||
e=e, h=h, omega=omega, dxes=dxes, epsilon=epsilon,
|
||||
mu=mu, prop_phase=prop_phase,
|
||||
)
|
||||
return e_norm, h_norm
|
||||
|
||||
|
||||
|
|
@ -415,8 +417,10 @@ def normalized_fields_h(
|
|||
"""
|
||||
e = hxy2e(wavenumber=wavenumber, omega=omega, dxes=dxes, epsilon=epsilon, mu=mu) @ h_xy
|
||||
h = hxy2h(wavenumber=wavenumber, dxes=dxes, mu=mu) @ h_xy
|
||||
e_norm, h_norm = _normalized_fields(e=e, h=h, omega=omega, dxes=dxes, epsilon=epsilon,
|
||||
mu=mu, prop_phase=prop_phase)
|
||||
e_norm, h_norm = _normalized_fields( # type: ignore[call-arg]
|
||||
e=e, h=h, omega=omega, dxes=dxes, epsilon=epsilon,
|
||||
mu=mu, prop_phase=prop_phase,
|
||||
)
|
||||
return e_norm, h_norm
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -529,8 +529,10 @@ def normalized_fields_e(
|
|||
"""
|
||||
e = exy2e(angular_wavenumber=angular_wavenumber, omega=omega, dxes=dxes, rmin=rmin, epsilon=epsilon) @ e_xy
|
||||
h = exy2h(angular_wavenumber=angular_wavenumber, omega=omega, dxes=dxes, rmin=rmin, epsilon=epsilon, mu=mu) @ e_xy
|
||||
e_norm, h_norm = _normalized_fields(e=e, h=h, omega=omega, dxes=dxes, rmin=rmin, epsilon=epsilon,
|
||||
mu=mu, prop_phase=prop_phase)
|
||||
e_norm, h_norm = _normalized_fields( # type: ignore[call-arg]
|
||||
e=e, h=h, omega=omega, dxes=dxes, rmin=rmin, epsilon=epsilon,
|
||||
mu=mu, prop_phase=prop_phase,
|
||||
)
|
||||
return e_norm, h_norm
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue