prior_time_smooth

PURPOSE ^

PRIOR_TIME_SMOOTH calculate image prior

SYNOPSIS ^

function Reg= prior_time_smooth( inv_model );

DESCRIPTION ^

 PRIOR_TIME_SMOOTH calculate image prior
 Reg= prior_time_smooth( inv_model )
 Reg        => output regularization term
 inv_model  => inverse model struct
 inv_model.prior_time_smooth.space_prior =
          @space_prior_function
 inv_model.prior_time_smooth.time_steps  =
          # of steps into future and past
 inv_model.prior_time_smooth.time_weight =  0..1
    each step is weighted by time_weight^time_difference

 This image prior is intended to be used as
  R'*R, but may be used as R for as well.

 The time smoothing prior penalizes non-smooth
 contributions in spatial and time directions

 The function of Reg is ||x-x_0||_Reg where 
 x is the image at 2*n+1 time slices concatenated
 vertially. x= [x_{j-n}; ... ; x_j ; ... x_{j+n} ]

 On a finite element mesh, we define the it as 
 -1 for each adjacent element, and 3 (in 2D) or 4 (in 3D)
 for the element itself

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function Reg= prior_time_smooth( inv_model );
0002 % PRIOR_TIME_SMOOTH calculate image prior
0003 % Reg= prior_time_smooth( inv_model )
0004 % Reg        => output regularization term
0005 % inv_model  => inverse model struct
0006 % inv_model.prior_time_smooth.space_prior =
0007 %          @space_prior_function
0008 % inv_model.prior_time_smooth.time_steps  =
0009 %          # of steps into future and past
0010 % inv_model.prior_time_smooth.time_weight =  0..1
0011 %    each step is weighted by time_weight^time_difference
0012 %
0013 % This image prior is intended to be used as
0014 %  R'*R, but may be used as R for as well.
0015 %
0016 % The time smoothing prior penalizes non-smooth
0017 % contributions in spatial and time directions
0018 %
0019 % The function of Reg is ||x-x_0||_Reg where
0020 % x is the image at 2*n+1 time slices concatenated
0021 % vertially. x= [x_{j-n}; ... ; x_j ; ... x_{j+n} ]
0022 %
0023 % On a finite element mesh, we define the it as
0024 % -1 for each adjacent element, and 3 (in 2D) or 4 (in 3D)
0025 % for the element itself
0026 
0027 % (C) 2006 Andy Adler. License: GPL version 2 or version 3
0028 % $Id: prior_time_smooth.m 3128 2012-06-08 17:04:21Z bgrychtol $
0029 
0030 pp= fwd_model_parameters( inv_model.fwd_model );
0031 ne = pp.n_elem;
0032 
0033 % relative strengths of conductivity and movement priors
0034 if ~isfield( inv_model,'prior_time_smooth')
0035    error('parameters must be specified for prior_time_smooth');
0036 end
0037 
0038 space_prior= inv_model.prior_time_smooth.space_prior;
0039 time_weight= inv_model.prior_time_smooth.time_weight;
0040 time_steps = inv_model.prior_time_smooth.time_steps;
0041 
0042 space_Reg= feval(space_prior, inv_model);
0043 %time_Reg= -speye(ne);
0044 time_Reg= -abs(space_Reg);
0045 tlen= 2*time_steps + 1;
0046 [x,y]= meshgrid(-time_steps:time_steps, ...
0047                 -time_steps:time_steps);
0048 time_w_mat= time_weight.^abs(x-y) .* (1-eye(tlen));
0049 
0050 Reg= kron( eye(tlen),  space_Reg ) + ...
0051      kron( time_w_mat, time_Reg );
0052

Generated on Wed 21-Jun-2017 09:29:07 by m2html © 2005