Skip to content
Snippets Groups Projects
Commit de57fae9 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Grain-conflicts: let's avoid querying the database if we don't need it

parent dced4e73
No related branches found
No related tags found
No related merge requests found
......@@ -33,9 +33,6 @@ end
if (~exist('parameters', 'var') || isempty(parameters))
parameters = gtLoadParameters();
end
if (~exist('db_info', 'var') || isempty(db_info))
db_info = gtDBLoadTable([parameters.acq.name 'difspot'], 'difspotID');
end
fsim = parameters.fsim;
omstep = gtGetOmegaStepDeg(parameters);
......@@ -63,6 +60,11 @@ load(fullfile('4_grains', 'grains_conflicts.mat'));
idspots = grains_conflicts{phaseid}.getIdSpot(grain.id);
if ~isempty(idspots)
% We load things from DB only if we need it!
if (~exist('db_info', 'var') || isempty(db_info))
db_info = gtDBLoadTable([parameters.acq.name 'difspot'], 'difspotID');
end
% get conflict difspotID and index in list (grain.selected)
ids = idspots(1, :);
indexes = idspots(2, :);
......
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