# setFuncsShrink

Set functions required in soft-shrinkage (minShrink.m).

## Contents

- Syntax
- Description
- Input Arguments
- Output Arguments
- More About
- References
- See Also
- Code: function: setFuncsShrink
- Code: subfunction: setminfParts
- Code: subfunction: setTikParts

## Syntax

    seti = setFuncsShrink(seti)

## Description

`seti = setFuncsShrink(seti)` sets functions in structure array `seti`, that are required in thresholded, nonlinear Landweber scheme based on the (extended) soft-shrinkage operator, see minShrink.html. Therefore this function is called in setRecon.m, see setRecon.html.

## Input Arguments

- seti : structure array

## Output Arguments

- seti : structure array

For the fields of the structrual array `seti` see the section "More About".

## More About

Notation:

- P = `seti.pNorm`
- Q = `seti.qNorm`

The following formulas are implemented:

- , where is the weighted Schatten -norm.
- , where is described in normroi.html.

The case with wavelets is analog.

The details are described in Ch. 6 in [1].

The function to minimize is the Tikhonov functional `seti.MT`, that is (in the case of no wavelets):

The first summand is saved as `seti.M1` and the second one as `seti.M2`.

## References

- [1] Florian Bürgel. Effective and Efficient Reconstruction Schemes for the Inverse Medium Problem in Scattering. PhD thesis, Universität Bremen, 2019.

## See Also

- setInvType.html
- setRecon.html
- setFuncsShrink.html
- setFuncsPda.html

## Code: function: setFuncsShrink

    function seti = setFuncsShrink(seti)
    % Note: sum of f parts and MT is the same result

    % Definition of parts of function to minimize (f = minf)
    % (parts for reconstruction process)
    seti = setminfParts(seti);

    % Definition of Tikhonov functional
    seti = setTikParts(seti);

    end

## Code: subfunction: setminfParts

Definition of parts of function to minimize (f = minf)

    function seti = setminfParts(seti)

    P = seti.pNorm;
    Q = seti.qNorm;

    seti.vd = -seti.FmeasDelta; % F_meas^\delta
    seti.fd = @(FFq) (1/P)*normws(FFq+seti.vd,seti)^P; % FFq is FFqMeas

    seti.vs = 0;
    seti.fs = @(q) seti.alpha*(1/Q)*(normroi(real(q+seti.vs),seti)^Q + normroi(imag(q+seti.vs),seti)^Q);

Wavelets

    seti.vsw = 0;
    seti.fsw = @(q) seti.alpha*(1/Q)*(normroi(real(seti.wW(q+seti.vsw)),seti)^Q + normroi(imag(seti.wW(q+seti.vsw)),seti)^Q);
        % The routine |seti.wW weights| the wavelet coefficients.
        % Note that |seti.wavWght| is the weight of the wavelet coefficients and is
        % inside |seti.wW| (small |w| is weight, big |W| is transformation).
    clear P Q

    end

## Code: subfunction: setTikParts

Definition of Tikhonov functional

    function seti = setTikParts(seti)
    % Parts to evalute the Tikhonov functional

    % Tikhonov functional MT = M1 + M2
    % 1) MT = fd + fs  (case of no wavelets)
    % 2) MT = fd + fsw (case of wavelets)

    seti.M1 = seti.fd;
    if seti.useWavelet == 1
        seti.M2 = seti.fsw;
    else
        seti.M2 = seti.fs;
    end
    seti.MT = @(FFq,q) seti.M1(FFq) + seti.M2(q); % function to minimize (Tikhonov functional)
    end