File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1537,14 +1537,14 @@ def compute_metrics(FIM):
1537
1537
# Compute and record metrics on FIM
1538
1538
D_opt = np .log10 (np .linalg .det (FIM ))
1539
1539
A_opt = np .log10 (np .trace (FIM ))
1540
- E_vals = np .linalg .eigvalsh ( FIM ) # np.linalg.eigvalsh (FIM) # Grab eigenvalues
1540
+ E_vals , E_vecs = np .linalg .eig (FIM ) # Grab eigenvalues
1541
1541
1542
- E_ind = 0 # Grab index of minima to check imaginary
1543
- img_thereshold = 1e-8 # Threshold for imaginary component
1542
+ E_ind = np . argmin ( E_vals . real ) # Grab index of minima to check imaginary
1543
+ IMG_THERESHOLD = 1e-6 # Threshold for imaginary component
1544
1544
# Warn the user if there is a ``large`` imaginary component (should not be)
1545
- if abs (E_vals .imag [E_ind ]) > img_thereshold :
1545
+ if abs (E_vals .imag [E_ind ]) > IMG_THERESHOLD :
1546
1546
self .logger .warning (
1547
- f"Eigenvalue has imaginary component greater than { img_thereshold } , contact developers if this issue persists."
1547
+ f"Eigenvalue has imaginary component greater than { IMG_THERESHOLD } , contact developers if this issue persists."
1548
1548
)
1549
1549
1550
1550
# If the real value is less than or equal to zero, set the E_opt value to nan
You can’t perform that action at this time.
0 commit comments