Skip to content

Commit

Permalink
try quadratic regularization
Browse files Browse the repository at this point in the history
  • Loading branch information
FerreolS committed Oct 17, 2023
1 parent 1b39e5d commit 46fc190
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/plugins/ferreol/demics/AmorsDEMIC.java
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,18 @@ protected void launch() {



fprior = new HomogeneousHyperbolicTotalVariation(objectSpace, epsilon.getValue(), scale.getValue());
//fprior = new HomogeneousHyperbolicTotalVariation(objectSpace, epsilon.getValue(), scale.getValue());
if (singlePrecision.getValue()){
fprior = new QuadraticCost(new FiniteDifferenceOperator((FloatShapedVectorSpace)objectSpace));
}else{
fprior = new QuadraticCost(new FiniteDifferenceOperator((DoubleShapedVectorSpace) objectSpace));
}
deconvolver = new DeconvolutionJob( fdata, mu.getValue(),fprior, positivityEV.getValue(),nbIterDeconv.getValue(), ObjectHook, ObjectHookfinal);
curImager.show(objArray, "obj");

//PSFprior = new HomogeneousHyperbolicTotalVariation(objectSpace, epsilon.getValue(), scale.getValue());


// fprior = new HyperbolicTotalVariation(objectSpace, epsilon.getValue(), scale.getValue());
if (singlePrecision.getValue()){
PSFprior = new QuadraticCost(new FiniteDifferenceOperator((FloatShapedVectorSpace)objectSpace,BoundaryConditions.PERIODIC));
}else{
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/ferreol/demics/SimpleDEMIC.java
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,12 @@ protected void launch() {

buildVectorSpaces();

// fprior = new HyperbolicTotalVariation(objectSpace, epsilon.getValue(), scale.getValue());
if (singlePrecision.getValue()){
fprior = new HyperbolicTotalVariation(objectSpace, epsilon.getValue(), scale.getValue());
/* if (singlePrecision.getValue()){
fprior = new QuadraticCost(new FiniteDifferenceOperator((FloatShapedVectorSpace)objectSpace,BoundaryConditions.PERIODIC));
}else{
fprior = new QuadraticCost(new FiniteDifferenceOperator((DoubleShapedVectorSpace) objectSpace, BoundaryConditions.PERIODIC));
}
}*/
fdata = WeightedConvolutionCost.build( objectSpace, dataSpace);
fdata.setData(dataArray);
fdata.setWeights(wgtArray,true);
Expand Down

0 comments on commit 46fc190

Please sign in to comment.