diff --git a/zUtil_Deformation/GtOrientationSampling.m b/zUtil_Deformation/GtOrientationSampling.m index 14e50679711ba7cf326e9ef2e295716f73533567..75f71643d2fa93f1a2f617d805509c98291b1d8a 100644 --- a/zUtil_Deformation/GtOrientationSampling.m +++ b/zUtil_Deformation/GtOrientationSampling.m @@ -719,6 +719,7 @@ classdef GtOrientationSampling < handle if (strcmpi(mode, 'dct')) ref_refl_ind = self.ref_gr.allblobs(det_ind).omind; + self.lattice.pl_inds{det_ind} = zeros(1, numel(ref_refl_ind)); % initialize, even if it will not be used.. else ref_refl_ind = self.ref_gr.allblobs(det_ind).phind; end diff --git a/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrain.m b/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrain.m index e1392f852ccd1f46499b0a7b430fae4cbd9eb86b..7785661a6c5be6eb53415e27a3c46ba5e410bd76 100644 --- a/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrain.m +++ b/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrain.m @@ -23,6 +23,7 @@ function [cl, estim_space_bbox_pix, estim_orient_bbox_rod] = gt6DCreateProjDataF 'check_spots', false, ... 'stack_oversize', 1.4, ... 'merge_dist_pixels', 0, ... + 'match_tol', [0, 0, 1], ... 'use_raw_images', false, ... 'use_volume_mask', false, ... 'prefer_raw_shared', false, ... @@ -354,6 +355,9 @@ function [cl, estim_space_bbox_pix, estim_orient_bbox_rod] = gt6DCreateProjDataF 'ors_ondet', cell(num_blobs, 1) ); temp_proj = gtFwdSimProjDefinition([], num_grains); + % allow for some additional tolerance in omega position + blobs_uvw_match_tol = bsxfun(@plus, blobs_uvw_center_width(:, 4:6), conf.match_tol); + for ii_g = 1:num_grains num_chars = fprintf('%03d/%03d', ii_g, num_grains); @@ -372,11 +376,12 @@ function [cl, estim_space_bbox_pix, estim_orient_bbox_rod] = gt6DCreateProjDataF dist_centers = [dist_centers_uv, dist_centers_w]; - matches = dist_centers < blobs_uvw_center_width(:, 4:6); + matches = dist_centers <= blobs_uvw_match_tol; matches = all(matches, 2); if (any(matches)) % TODO: find better logic (fwd-sim type) - cands = find(matches); + ii_o + cands = find(matches) dist_centers_scalar = sqrt(sum(dist_centers .^ 2, 2)); [~, ii_c] = min(dist_centers_scalar(cands)); diff --git a/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrainFwdProj.m b/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrainFwdProj.m index 64f5a1298e3bf14fe9ab05cd34b95390b1d9582c..4e61c7b0563c5214e214d4944622e1f863af12ea 100644 --- a/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrainFwdProj.m +++ b/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrainFwdProj.m @@ -338,7 +338,7 @@ function [cl, estim_space_bbox_pix, estim_orient_bbox_rod] = gt6DCreateProjDataF extended_projs(ii_g).allreflbool_selected(extended_projs(ii_g).ondet(extended_projs(ii_g).included)) = extended_projs(ii_g).selected; if (conf.verbose > 1 || true) - produce_deselected_reflections_table(samp_ors, extended_projs, ii_g, deselected, twin_only_shared_bls_inc, t2t_shr_bls_tbl); + produce_deselected_reflections_table(samp_ors, extended_projs, ii_g, deselected, twin_only_shared_bls_inc, t2t_shr_bls_tbl, conf); end case 'ignore' % we do nothing @@ -668,7 +668,7 @@ function produce_matching_reflections_table(grs, conf, tols, refl_matches) end end -function produce_deselected_reflections_table(samp_ors, eproj, ii_g, deselected, twin_only_shared_bls_inc, t2t_shr_bls_tbl) +function produce_deselected_reflections_table(samp_ors, eproj, ii_g, deselected, twin_only_shared_bls_inc, t2t_shr_bls_tbl, conf) vis_inds = eproj(ii_g).ondet(eproj(ii_g).included(twin_only_shared_bls_inc)); if (size(samp_ors(ii_g).allblobs(conf.det_index).hklsp, 2) == 4)