Skip to content

Commit 97c79a9

Browse files
jstarcksfarrens
authored andcommitted
inpaint 1D Lambda last iter
1 parent 2b5c51a commit 97c79a9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/mga/libmga1d/MCA1D.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,14 @@ void MCA1D::decomposition (fltarray& Signal)
418418

419419
// if (LambdaTV > 0) LambdaTV *= sqrt((double) 2.) / Nbr_Iter;
420420

421-
for (int Iter=0; Iter < Nbr_Iter; Iter++)
421+
for (int Iter=0; Iter < Nbr_Iter; Iter++)
422422
{
423423
if (Iter>0)
424424
{
425-
if (Linear == True) Lambda -= StepL;
426-
else Lambda = LastSoftThreshold
427-
+ DeltaThreshold *(1.-erf(2.8*Iter/ Nbr_Iter));
425+
if (Linear == True)
426+
Lambda = LastSoftThreshold + (FirstSoftThreshold - LastSoftThreshold ) * (Nbr_Iter-1-Iter) / (float) (Nbr_Iter-1);
427+
else Lambda = LastSoftThreshold
428+
+ DeltaThreshold *(1.-erf(2.8*(Iter-1)/ (double)(Nbr_Iter-1))) * cos((double)Iter /(double)(Nbr_Iter-1)*PI/2.);
428429
if (Lambda < LastSoftThreshold) Lambda = LastSoftThreshold;
429430
}
430431

0 commit comments

Comments
 (0)