Hi @pyMatJ ,
I am currently checking the GTM core code I stumbled a bit over this code here:
|
## sort berremann qi's according to (12) |
|
if any(np.abs(np.imag(qsunsorted))): |
|
for km in range(0,4): |
|
if np.imag(qsunsorted[km])>=0 : |
|
transmode[kt] = km |
|
kt = kt + 1 |
|
else: |
|
reflmode[kr] = km |
|
kr = kr +1 |
|
else: |
|
for km in range(0,4): |
|
if np.real(qsunsorted[km])>0 : |
|
transmode[kt] = km |
|
kt = kt + 1 |
|
else: |
|
reflmode[kr] = km |
|
kr = kr +1 |
Shouldn't the if-else-case be within the for loop .
As I understood it, you need to sort according to the four cases:
- complex number with imaginary part >= 0: transmode[0]
- real number with >= 0: transmode[1]
- complex number with imaginary part < 0: reflmode[0]
- real number with < 0: reflmode[1]
Maybe you can check and tell me the idea of the current code.
Thanks
Daniel
Hi @pyMatJ ,
I am currently checking the GTM core code I stumbled a bit over this code here:
pyGTM/GTM/GTMcore.py
Lines 461 to 477 in 1f62af2
Shouldn't the
if-else-casebe within thefor loop.As I understood it, you need to sort according to the four cases:
Maybe you can check and tell me the idea of the current code.
Thanks
Daniel