From 42b9852ef674a701937cc88854d308f73a9a4ae2 Mon Sep 17 00:00:00 2001 From: Yoann Guilhem <yoann.guilhem@esrf.fr> Date: Wed, 16 Jan 2013 17:38:16 +0000 Subject: [PATCH] Cleaning: redundant function git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@1010 4c865b51-4357-4376-afb4-474e03ccb993 --- 4_grains/gtFindGroupInCand_sab.m | 77 -------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 4_grains/gtFindGroupInCand_sab.m diff --git a/4_grains/gtFindGroupInCand_sab.m b/4_grains/gtFindGroupInCand_sab.m deleted file mode 100644 index f4d238ee..00000000 --- a/4_grains/gtFindGroupInCand_sab.m +++ /dev/null @@ -1,77 +0,0 @@ - -function [pgood,grainoutput]=gtFindGroupInCand_sab(cand,tol,sample,ACM,spacegroup) -% cand: all the lines that possibly belong to the same grain as the 1st line -% (they are pair-consistent) -% 1st line in "cand" is the actual line investigated - -% NOTE: p2 and p3 intersection might be far from the actual grain center if -% they are near being parallel - -% keyboard -nof_cand=length(cand.id); - -p1=1; - -for p2=2:nof_cand % loop to find a 2nd line of the grain - for p3=p2+1:nof_cand % loop to find a 3rd line of the grain - - % p2 - % p3 - - pgood=false(nof_cand,1); - pgood([p1,p2])=true; - - % Assume p2 belong to p1, try a 3rd one: - % is p1,p2,p3 group-consistent? - - ok=gtTryAddLineToGroup(p3,pgood,cand,tol,sample,ACM); - - if ok - pgood(p3)=true; % p1,p2,p3 are group consistent - - for p4=p3+1:nof_cand - % p4 - % having a group of p1,p2,p3 does p4 fit as well? - ok=gtTryAddLineToGroup(p4,pgood,cand,tol,sample,ACM) - - if ok - % p1,p2,p3,p4 are group-consistent. - % We accept them as a good solution. - % Which else could belong to this group? - % Loop through all the remaining candidates and try whether they - % fit. Keep the result, that is all the lines from this grain. - pgood(p4)=true; - - for pn=p4+1:nof_cand - % ACM - ok=gtTryAddLineToGroup(pn,pgood,cand,tol,sample,ACM); - if ok - pgood(pn)=true; - end - end - - grainl=gtKeepLine(pgood,cand); % lines in the grain - - - - % grainoutput=gtIndexCreateGrainOutputBuild(grainl); %,spacegroup); - - % grainoutput=gtIndexCreateGrainOutput(grainl,ACM); - - % end modif sabine - return - - end - - end - end - - end -end - -% If no grain is found: -pgood=false(nof_cand,1); -pgood(1)=true; -grainoutput=[]; - -end -- GitLab