Skip to content

Commit 49e268b

Browse files
committed
log diagnotics
1 parent a906da8 commit 49e268b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/aspire/abinitio/commonline_sync3n.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,10 @@ def _triangle_scores(
714714
* (a + 1)
715715
)
716716
# normalization of 2nd component: B = P*N_delta/sum(f), where f is the component formula
717-
B0 = P * (self.n_img * (self.n_img - 1) * (self.n_img - 2) / 2) / np.sum(
718-
((1 - hist_x) ** b) * np.exp(-b / (1 - x0) * (1 - hist_x))
717+
B0 = (
718+
P
719+
* (self.n_img * (self.n_img - 1) * (self.n_img - 2) / 2)
720+
/ np.sum(((1 - hist_x) ** b) * np.exp(-b / (1 - x0) * (1 - hist_x)))
719721
)
720722
start_values = np.array([B0, P, b, x0], dtype=np.float64)
721723
lower_bounds = np.array([0, Pmin**3, 2, 0], dtype=np.float64)
@@ -742,6 +744,8 @@ def fun(x, B, P, b, x0, A=A, a=a):
742744
P = P ** (1 / 3)
743745
sigma = (1 - x0) / peak2sigma
744746

747+
logger.info(f"Estimated CL Errors P,STD:\t{100*P}%\t{sigma}")
748+
745749
# Initialize probability computations
746750
# Local histograms analysis
747751
A = a + 1 # distribution 1st component normalization factor
@@ -768,6 +772,10 @@ def fun(x, B, P, b, x0, A=A, a=a):
768772
)
769773
Pij = np.nan_to_num(Pij)
770774

775+
logger.info(
776+
f"Common lines probabilities to be indicative Pij={100*np.mean(Pij)}%"
777+
)
778+
771779
return P, sigma, Pij, scores_hist
772780

773781
###########################################

0 commit comments

Comments
 (0)