Skip to content
Snippets Groups Projects
Commit 05bdb57d authored by Laura Nervo's avatar Laura Nervo Committed by Nicola Vigano
Browse files

Removed gtUpdateGrainsConflicts.m


Signed-off-by: default avatarLaura Nervo <laura.nervo@esrf.fr>
parent 2f8c0260
No related branches found
No related tags found
No related merge requests found
function gtUpdateGrainsConflicts(grains_merge)
% GTUPDATEGRAINSCONFLICTS
% gtUpdateGrainsConflicts(grains_merge)
% ------------------------------------------------
% Loads ./4_grains/sample.mat
% Reads ./4_grains/grains_merge.mat
% Updates ./4_grains/sample.mat
%
% Updates info from grains_merge.mat:
% sample.phases{:}.summary{:}
% sample.phases{:}.conflicts{:}
% sample.phases{:}.hasConflicts(:)
% sample.phases{:}.nofConflicts(:)
%
% INPUT:
% grains_merge = output of gtAnalyseGrainsConflicts
%
% Version 002 19-09-2012 by LNervo
if ~exist('grains_merge','var') || isempty(grains_merge)
grains_merge = [];
load(fullfile('4_grains','grains_merge.mat'));
end
bkpdir = fullfile('4_grains','archive');
[~,msg]=mkdir(bkpdir);disp(msg)
filename = fullfile('4_grains','sample.mat');
sample = GtSample.loadFromFile(filename, 'sample');
tmpSample = GtSample.convertToSample(grains_merge);
% ASSUMED perfect coherence between sample and grains_merge
% updating sample.mat
sample.updateConflicts(tmpSample);
% File names for output; start log file
fname0 = fullfile(bkpdir,'%s');
sample_root = 'sample';
sampleFile = gtLastFileName(sprintf(fname0,[sample_root '_' date() '_']),'new');
disp(' ')
disp(['Updating file ' filename '...'])
if exist(filename,'file')
copyfile(filename,sampleFile)
end
% problem with mergeToFile
sample.saveToFile(filename);
end % end of function
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment