diff --git a/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrainFwdProj.m b/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrainFwdProj.m index f78fb077cefc9894729c6e8dd633923bb9cca481..8bb6ebde05bdf4ca1816d619c936b8fabce85c24 100644 --- a/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrainFwdProj.m +++ b/zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrainFwdProj.m @@ -339,6 +339,14 @@ function [samp_ors, estim_space_bbox_pix, estim_orient_bbox] = gt6DCreateProjDat blobs(~shared_parent) = grs(ii_g).proj.bl(~shared_parent_inc_redundant); % Using the same because it gives the same size/uvw-limits blobs(shared_parent) = samp_ors(1).proj.bl(shared_parent_pos); + + if (conf.verbose) + parent_ids = grs(1).fwd_sim(conf.det_index).spotid(ref_included(shared_parent_pos))'; + twin_ids = grs(ii_g).fwd_sim(conf.det_index).spotid(twin_inc(shared_parent))'; + fprintf('Shared included blobs:\n') + fprintf(' - %d: parent blob_id %d, twin blob_id %d\n', ... + [1:numel(find(shared_parent)); parent_ids; twin_ids]) + end end for ii_b = 1:num_blobs @@ -454,20 +462,21 @@ function gr = twin_fwd_sim_to_gr(ref_gr, twin) gr.R_vector = twin.R_vector; gr.allblobs = twin.allblobs; gr.proj = twin.proj; + gr.fwd_sim = twin.fwd_sim; % And the useless stuff - gr.check = twin.fwd_sim.check; - gr.flag = twin.fwd_sim.flag; - gr.spotid = twin.fwd_sim.spotid; + gr.check = twin.fwd_sim(1).check; + gr.flag = twin.fwd_sim(1).flag; + gr.spotid = twin.fwd_sim(1).spotid; % only included spots info - gr.cands = twin.fwd_sim.cands; - gr.likelihood = twin.fwd_sim.likelihood; - gr.difspotID = twin.fwd_sim.difspotID; - gr.uv_exp = twin.fwd_sim.uvw(:, 1:2); - gr.om_exp = twin.fwd_sim.uvw(:, 3); - gr.bb_exp = twin.fwd_sim.bb; - gr.intensity = twin.fwd_sim.intensity; + gr.cands = twin.fwd_sim(1).cands; + gr.likelihood = twin.fwd_sim(1).likelihood; + gr.difspotID = twin.fwd_sim(1).difspotID; + gr.uv_exp = twin.fwd_sim(1).uvw(:, 1:2); + gr.om_exp = twin.fwd_sim(1).uvw(:, 3); + gr.bb_exp = twin.fwd_sim(1).bb; + gr.intensity = twin.fwd_sim(1).intensity; end