Commit c0538326 authored by Luis Fernandez Ruiz's avatar Luis Fernandez Ruiz
Browse files

Control of save_img_path format to avoid errors:

- create_img_param_general.m
- create_suggested_images.m
- save_sim_sphere_coresphere.m

Add example files in doc_files (results and suggest)
Add regression and CNN models
parent b8a496e5
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -15,11 +15,18 @@ function create_img_param_general(save_img_path, scat_model, varargin)
Based on code of ILL: save_sim_sphere.m
Modify by: FERNANDEZ RUIZ Luis
Last modified: 10/07/2019
File: create_img_param.m
File: create_img_param_general.m
*********************************************************************************************
%}
% First, if the path for saving images finishes in '/' we delete this character.
% This is going to be important for saving the image. See 'filename2'
% declaration
if (save_img_path(end) == '/')
save_img_path = save_img_path(1:end-1);
end
% Define the scattered model
scatter_model = scat_model; %'Sphere' or 'Core-Shell Sphere';
......
......@@ -20,6 +20,13 @@ function create_suggested_images(save_img_path, suggest_path, scat_model) % save
*********************************************************************************************
%}
% First, if the path for saving images finishes in '/' we delete this character.
% This is going to be important for saving the image. See 'filename2'
% declaration
if (save_img_path(end) == '/')
save_img_path = save_img_path(1:end-1);
end
% Read suggest.csv file. The structure of this file is a dataframe with the
% following columns (in this order):
% dist, col, wav, bg, CNN prediction, sample parameters, error in sample
......@@ -231,9 +238,9 @@ for i = 1:nrows
end
if strcmp(scatter_model, 'Sphere')
filename2 = [save_img_path '/Sphere' background_model '_col' num2str(collimation) '_dist' num2str(distance) '_radius' num2str(params_scatter.radius) '_poly' num2str(params_scatter.poly_fwhm) '_contrast' num2str(params_scatter.contrast) '_scale' num2str(params_scatter.scale) '_bg' num2str(params_scatter.background) '_wav' num2str(wav) '_thickness' num2str(thickness) '_beamcenter' num2str(horiz_beam_centre) '.jpg'];
filename2 = [save_img_path '/' former_predict '/Sphere' background_model '_col' num2str(collimation) '_dist' num2str(distance) '_radius' num2str(params_scatter.radius) '_poly' num2str(params_scatter.poly_fwhm) '_contrast' num2str(params_scatter.contrast) '_scale' num2str(params_scatter.scale) '_bg' num2str(params_scatter.background) '_wav' num2str(wav) '_thickness' num2str(thickness) '_beamcenter' num2str(horiz_beam_centre) '.jpg'];
elseif strcmp(scatter_model, 'Core-Shell Sphere')
filename2 = [save_img_path '/CoreShellSphere' background_model '_col' num2str(collimation) '_dist' num2str(distance) '_radius' num2str(params_scatter.radius) '_poly' num2str(params_scatter.poly_fwhm) '_shell' num2str(params_scatter.shell) '_rhocore' num2str(params_scatter.rhocore) '_rhoshell' num2str(params_scatter.rhoshell) '_rhomatrix' num2str(params_scatter.rhomatrix) '_scale' num2str(params_scatter.scale) '_bg' num2str(params_scatter.background) '_wav' num2str(wav) '_thickness' num2str(thickness) '_beamcenter' num2str(horiz_beam_centre) '.jpg'];
filename2 = [save_img_path '/' former_predict '/CoreShellSphere' background_model '_col' num2str(collimation) '_dist' num2str(distance) '_radius' num2str(params_scatter.radius) '_poly' num2str(params_scatter.poly_fwhm) '_shell' num2str(params_scatter.shell) '_rhocore' num2str(params_scatter.rhocore) '_rhoshell' num2str(params_scatter.rhoshell) '_rhomatrix' num2str(params_scatter.rhomatrix) '_scale' num2str(params_scatter.scale) '_bg' num2str(params_scatter.background) '_wav' num2str(wav) '_thickness' num2str(thickness) '_beamcenter' num2str(horiz_beam_centre) '.jpg'];
end
data = abs(output.data1(:,:,1));
......
......@@ -19,6 +19,13 @@ function save_sim_sphere_coresphere(save_img_path, scat_model) %save_img_path, s
*********************************************************************************************
%}
% First, if the path for saving images finishes in '/' we delete this character.
% This is going to be important for saving the image. See 'filename2'
% declaration
if (save_img_path(end) == '/')
save_img_path = save_img_path(1:end-1);
end
col_params = [2 2.8 4 5.6 8 11.2 14.4 17.6]; %D22
dist_params = [1.4 2.8 4 5.6 8 11.2 14.4 17.6];
background_params = [0 0.05 1]; % water = 1;D2O = 0.05
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment