check for sign=0 case
This commit is contained in:
parent
e54735d9c6
commit
c543868c0b
1 changed files with 1 additions and 0 deletions
|
|
@ -435,6 +435,7 @@ def _normalized_fields(
|
|||
sign = numpy.sign(E_weighted[:,
|
||||
:max(shape[0] // 2, 1),
|
||||
:max(shape[1] // 2, 1)].real.sum())
|
||||
assert sign != 0
|
||||
|
||||
norm_factor = sign * norm_amplitude * numpy.exp(1j * norm_angle)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue