Code covered by the BSD License  

Highlights from
A Bayesian Adaptive Basis Algorithm for Single Particle Reconstruction

image thumbnail

A Bayesian Adaptive Basis Algorithm for Single Particle Reconstruction

by

 

3D reconstruction algorithm for electron cryo-microscopy.

adaptiveBasisReconstructionExample.m
%% Adaptive Basis Reconstruction %%
%   A.Kucukelbir 05-Jan-2011
%   Last Revision: 3-Mar-2012

%% Initialize MATLAB and Set Parameters
warning('off','Images:imshow:magnificationMustBeFitForDockedFigure');
fig_count = 1;

% Check MATLABPOOL state and initiate multi-core processing
% Note: configuration 'local' should be properly configured for YOUR machine
if(matlabpool('size')==0)
     matlabpool local
end

% Set path to utilities
path('utils',path);

% Nesterov Parameters
nest_plot_flag    = 0;          % Plot intermediate slices of iterations of Nesterov loop
basis             = 's';        % 's' for swt16 frame, 'w' for regular wavelet basis
thr_type          = 0;          % 0 Soft Threshold, 1 Hard Threshold
W                 = 'coif3';    % Wavelet family
W_lev             = 2;          % Wavelet tree depth. Note: if basis = 's', then W_lev must = 2.
nesterov_iter_lim = 30;         % Max no. of iterations for Nesterov
nesterov_stop_lim = 0.02;       % Stopping threshold for Nesterov

%% Load Example Inputs
% proj:      the simulated class means
% data_axes: the projection directions stored as vectors in 3D
% ctfs:      the CTF associated with each class mean (with some error)
% maskR:     integer value of spherical mask used during 
load('exampleInputs3QD7simulated.mat');
slice = ceil(size(proj,1)/2);

%% Determine STEP SIZE for Nesterov
% Note: this will depend on the size of your dataset
mu = 1e-3;

%% Run Adaptive Basis Reconstruction using Nesterov's Method
tic
x_est = reconstruct_by_nesterov_w_ctf(...
 		proj, data_axes, ctfs, maskR,...
 		basis, ...      
 		W, W_lev,thr_type,...
 		mu, nesterov_iter_lim, nesterov_stop_lim, fig_count, slice, nest_plot_flag);
toc

Contact us