Skip to content
Snippets Groups Projects
Commit ceeb3be9 authored by Wolfgang Ludwig's avatar Wolfgang Ludwig
Browse files

Let Indexter work on a sub-set of pair data

parent 59fbde07
No related branches found
No related tags found
No related merge requests found
......@@ -91,11 +91,18 @@ else
end
% All the pair data are loaded in 'tot'
% order list according to parameters.index.ordering {'avintint', 'bbXSize'...}
if ~isfield(parameters.index,'sort_criterium')
parameters.index.sort_criterium = 'avintint'
end
if ~isfield(parameters.index,'sort_direction')
parameters.index.sort_direction = 'desc'
end
if (~test)
mymcmd = sprintf(['SELECT pairID, theta, '...
'avintint, avbbXsize, avbbYsize, samcentXA, samcentYA, samcentZA, '...
'ldirX, ldirY, ldirZ, plX, plY, plZ, thetatype '...
'FROM %s WHERE phasetype=%d ORDER BY avintint desc'],pairtable, phaseID);
'FROM %s WHERE phasetype=%d ORDER BY %s %s'],pairtable, phaseID, parameters.index.sort_criterium, parameters.index.sort_direction);
[tot.pairid, tot.theta, tot.int, tot.bbxs, tot.bbys, ...
tot.ca(:,1), tot.ca(:,2), tot.ca(:,3), ...
......@@ -137,6 +144,28 @@ if isfield(parameters.index,'discard') && ~isempty(parameters.index.discard)
tot.id = (1:length(tot.pairid))';
end
% Use a sub-set of pair-data
if isfield(parameters.index,'subset') && ~isempty(parameters.index.subset)
keeplist = parameters.index.subset;
tot.pairid = tot.pairid(keeplist);
tot.theta = tot.theta(keeplist);
tot.int = tot.int(keeplist);
tot.bbxs = tot.bbxs(keeplist);
tot.bbys = tot.bbys(keeplist);
tot.thetatype = tot.thetatype(keeplist);
tot.ca = tot.ca(keeplist,:);
tot.dir = tot.dir(keeplist,:);
tot.pl = tot.pl(keeplist,:);
if (test)
tot.g3d = tot.g3d(keeplist,:);
end
tot.id = (1:length(tot.pairid))';
end
% Number of reflections
......
function gtINDEXTER(phaseID, flag_update, flag_inputfile, flag_log, ...
function grain = gtINDEXTER(phaseID, flag_update, flag_inputfile, flag_log, ...
forcemerge, parameters)
% GTINDEXTER Grain indexing algorithm Indexter main 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