From 46fc190e402e0295a0767f96b44c00cacfdeccf8 Mon Sep 17 00:00:00 2001 From: ferreol Date: Tue, 17 Oct 2023 17:09:12 +0200 Subject: [PATCH] try quadratic regularization --- src/plugins/ferreol/demics/AmorsDEMIC.java | 8 ++++++-- src/plugins/ferreol/demics/SimpleDEMIC.java | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/plugins/ferreol/demics/AmorsDEMIC.java b/src/plugins/ferreol/demics/AmorsDEMIC.java index 61882ed..2e1e67a 100644 --- a/src/plugins/ferreol/demics/AmorsDEMIC.java +++ b/src/plugins/ferreol/demics/AmorsDEMIC.java @@ -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{ diff --git a/src/plugins/ferreol/demics/SimpleDEMIC.java b/src/plugins/ferreol/demics/SimpleDEMIC.java index 7d31005..50d5e03 100644 --- a/src/plugins/ferreol/demics/SimpleDEMIC.java +++ b/src/plugins/ferreol/demics/SimpleDEMIC.java @@ -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);