[Nirfast] reconstruction

Vincent Kitsmiller Vincent.J.Kitsmiller.1 at nd.edu
Wed Mar 22 14:52:23 EDT 2017


when i try running using the "working" script I get a different error...

script:

clear all

% In this example, we will use a 2D case to demonstrate how we can generate

% simulated forward data, and use tomographic recontruction from these data

% to recover location of anamalies

%% Load the 2D multiwavelength wavelength mesh

% This mesh is 43 mm in diameter and has 16 source/detectors on the

% periphery

% The wavelengths being modelled are 661   735   761   785   808   826

% 849 nm

mesh_anom = load_mesh('dot_mesh_anom_5mm_deep.rpt');

% Set anomaly size and properties

% Anomaly 1

% blob.x=0; % x location

% blob.y=15; % y location

% blob.r=5; % radius (mm)

% blob.region=2;

% blob.sa=0.5;

% blob.sp=1;

% blob.HbO=1;

% blob.deoxyHb=0;

% blob.Water=0;

% blob.Lipids=0;

% mesh_anom = add_blob(mesh,blob);



% And view the mesh

plotmesh(mesh_anom,1);

%% Generate forward data using Frequency Domain model at 100 MHz

data_anom = femdata(mesh_anom,100);

% and add random noise (1% amplitude, and 2 degrees in Phase)

data_anom_noise = add_noise(data_anom,1,2);

% and view data

%plot_data(data_anom_noise);



%% Reconstruct

lambda.type='Automatic';

lambda.value=1;

[mesh_recon,pj] = reconstruct(mesh,[30
30],100,data_anom_noise,40,lambda,'test',0,[650 680 740 770 800 830
860 890 940 950 980]);

plotmesh(mesh_recon);



% %% Reconstruct assumin some information about location

% % in this case, we assume we know the region of the blobs and will use this

% % as priori knowledge

% % Copy region label into mesh for reconstructing

% mesh.region = mesh_anom.region;

% lambda=1;

% [mesh_recon_spatial,pj] = reconstruct_spectral_spatial(mesh,[30
30],100,data_anom_noise,40,lambda,'spectral_spatial_example',0);

% plotmesh(mesh_recon_spatial);


error:
>> add_blob_fandr_sim
Moving Sources
Moving Detectors
Calculating data for: 650 nm
Calculating data for: 680 nm
Calculating data for: 740 nm
Calculating data for: 770 nm
Calculating data for: 800 nm
Calculating data for: 830 nm
Calculating data for: 860 nm
Calculating data for: 890 nm
Calculating data for: 940 nm
Calculating data for: 950 nm
Calculating data for: 980 nm
Error using mesh (line 58)
Not enough input arguments.

Error in add_blob_fandr_sim (line 37)
[mesh_recon,pj] = reconstruct(mesh,[30
30],100,data_anom_noise,40,lambda,'test',0,[650 680
740 770 800 830 860 890 940 950 980]);

On Wed, Mar 22, 2017 at 1:21 PM, Vincent Kitsmiller
<Vincent.J.Kitsmiller.1 at nd.edu> wrote:
> When attempting to run a spectral reconstruction on my own mesh I get
> the error below. I can however run a reconstruction using the spectral
> example from the NIRFAST web page.
>
> Moving Sources
> Moving Detectors
> Moving Sources
> Moving Detectors
> Loading data and wavelength information
> Loading recon basis
> Creating coarse mesh
> Coarse mesh created with 900 nodes
> ---------------------------------
> Building Jacobian using jacobian_spectral
> Calculating Jacobian for 650nm
> Calculating Jacobian for 680nm
> Calculating Jacobian for 740nm
> Calculating Jacobian for 770nm
> Calculating Jacobian for 800nm
> Calculating Jacobian for 830nm
> Calculating Jacobian for 860nm
> Calculating Jacobian for 890nm
> Calculating Jacobian for 940nm
> Calculating Jacobian for 950nm
> Calculating Jacobian for 980nm
> Subscripted assignment dimension mismatch.
>
> Error in jacobian_spectral (line 133)
>     data.paa(:,i*2-1:i*2) = data_tmp(i).paa;
>
> Error in reconstruct_spectral_spatial (line 217)
>     [J,data,fwd_mesh] =
> jacobian_spectral(fwd_mesh,frequency,wv_array,recon_mesh);
>
>
> Error in gui_reconstruct>done_Callback (line 646)
>                     evalin('base',content{end});
>
> Error in gui_mainfcn (line 95)
>         feval(varargin{:});
>
> Error in gui_reconstruct (line 42)
>     gui_mainfcn(gui_State, varargin{:});
>
> Error in
> @(hObject,eventdata)gui_reconstruct('done_Callback',hObject,eventdata,guidata(hObject))
>
>
> Error while evaluating UIControl Callback


More information about the Nirfast mailing list