Skip to content
Snippets Groups Projects
Commit 88b8361d authored by Peter Reischig's avatar Peter Reischig Committed by Nicola Vigano
Browse files

Added commentss for later upgrade.

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@878 4c865b51-4357-4376-afb4-474e03ccb993
parent 94d9f0a1
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ detdiru0 = labgeo.detdiru; % will use detdiru0 to distinguish from ro ...@@ -103,7 +103,7 @@ detdiru0 = labgeo.detdiru; % will use detdiru0 to distinguish from ro
detdirv0 = labgeo.detdirv; detdirv0 = labgeo.detdirv;
rotdir = labgeo.rotdir; rotdir = labgeo.rotdir;
beamdir = labgeo.beamdir; beamdir = labgeo.beamdir;
pixelsize = mean([labgeo.pixelsizeu, labgeo.pixelsizev]); pixelsize = mean([labgeo.pixelsizeu, labgeo.pixelsizev]); % !!! using a mean pixel size is uncertain; ideally fwd simulation should use mm-s
detrefpos = labgeo.detrefpos ./ pixelsize; % detector reference position in pixels detrefpos = labgeo.detrefpos ./ pixelsize; % detector reference position in pixels
detposcorner = gtGeoDetOrig(labgeo) ./ pixelsize; % the (0,0) corner of the detector in Lab system (edge of detector pixel) detposcorner = gtGeoDetOrig(labgeo) ./ pixelsize; % the (0,0) corner of the detector in Lab system (edge of detector pixel)
...@@ -176,7 +176,10 @@ for n = first : last ...@@ -176,7 +176,10 @@ for n = first : last
gr = gtCalculateGrain(gr, parameters); gr = gtCalculateGrain(gr, parameters);
u = gr.allblobs.uv(:, 1); u = gr.allblobs.uv(:, 1);
v = gr.allblobs.uv(:, 2); v = gr.allblobs.uv(:, 2);
% radial distance of spot center from detector center % radial distance of spot center from detector center
% !!! to be corrected: detrefu and detrefv can be anywhere, not necessarily in the
% center
radius = sqrt((u-detrefu).^2 + (v-detrefv).^2); radius = sqrt((u-detrefu).^2 + (v-detrefv).^2);
%%% Get the average difspot X and Y sizes for the current spots in the grain, %%% Get the average difspot X and Y sizes for the current spots in the grain,
...@@ -192,6 +195,7 @@ for n = first : last ...@@ -192,6 +195,7 @@ for n = first : last
% allow for a lateral deviation of spot postions based on grain orientation statics % allow for a lateral deviation of spot postions based on grain orientation statics
%dif_Offset = fsim.Rdist_factor * gr.stat.Rdiststd * norm(detrefpos) %dif_Offset = fsim.Rdist_factor * gr.stat.Rdiststd * norm(detrefpos)
% !!! detrefpos is not necessarily the distance; depends on definition by user
dif_Offset = fsim.Rdist_factor * deg2rad(gr.stat.dangstd) * norm(detrefpos); dif_Offset = fsim.Rdist_factor * deg2rad(gr.stat.dangstd) * norm(detrefpos);
grainBBox = [max(gr.bbxs), max(gr.bbys)]; grainBBox = [max(gr.bbxs), max(gr.bbys)];
......
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