Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
graintracking
DCT
Commits
a3c25a6c
Commit
a3c25a6c
authored
6 years ago
by
Wolfgang Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
Redefine origin of recgeo.orig(3) (z) to match with center of detector
Signed-off-by:
Wolfgang Ludwig
<
wolfgang.ludwig@esrf.fr
>
parent
1783f481
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zUtil_ForwardSim/gtSetupForwardSimulation.m
+20
-9
20 additions, 9 deletions
zUtil_ForwardSim/gtSetupForwardSimulation.m
with
20 additions
and
9 deletions
zUtil_ForwardSim/gtSetupForwardSimulation.m
+
20
−
9
View file @
a3c25a6c
function
gtSetupForwardSimulation
(
varargin
)
function
gtSetupForwardSimulation
(
phaseID
,
varargin
)
%
GTSETUPFORWARDSIMULATION
Simple
helper
function
to
run
gtForwardSimulate
_
v2
%
gtSetupForwardSimulation
()
%
--------------------------
...
...
@@ -8,11 +8,14 @@ conf = struct( ...
'
reset
_
sample
',
true
,
...
'
reset
_
spot2grain
',
[]
,
...
'
reset
_
difspot
_
table
',
[]
,
...
'
reset
_
grains
',
[]
)
;
conf
=
parse
_
pv
_
pairs
(
conf
,
varargin
)
;
'
reset
_
grains
',
[]
,
...
'
list
',
[]
)
;
[
conf
,
rej
_
conf
_
pars
]
=
parse
_
pv
_
pairs
(
conf
,
varargin
)
;
parameters
=
gtLoadParameters
()
;
[
parameters
.
fsim
,
rej
_
pars
]
=
parse
_
pv
_
pairs
(
parameters
.
fsim
,
rej
_
conf
_
pars
)
;
conf
.
mode
=
parameters
.
fsim
.
mode
%
Let
'
s
check
every
field
is
in
,
and
in
case
let
'
s
update
it
!
parameters
=
gtCheckParameters
(
parameters
,
'
fsim
',
'
verbose
',
true
)
;
parameters
=
gtCheckParameters
(
parameters
,
'
recgeo
',
'
verbose
',
true
)
;
...
...
@@ -22,8 +25,9 @@ end
if
(
~
isfield
(
parameters
.
labgeo
,
'
omstep
'
)
||
isempty
(
parameters
.
labgeo
.
omstep
))
parameters
.
labgeo
.
omstep
=
gtAcqGetOmegaStep
(
parameters
)
;
end
%
Updating
recgeo
with
a
consistent
set
of
parameters
parameters
.
recgeo
=
gtGeoRecDefaultParameters
(
parameters
.
detgeo
,
parameters
.
samgeo
)
;
parameters
.
recgeo
=
gtGeoRecDefaultParameters
(
parameters
.
detgeo
,
parameters
.
samgeo
,
parameters
.
acq
)
;
gtSaveParameters
(
parameters
)
;
gtDBConnect
()
;
...
...
@@ -58,6 +62,7 @@ for ii = 1:nof_phases
ngrains
(
ii
)
=
length
(
grain
)
;
end
if
(
isempty
(
conf
.
reset
_
difspot
_
table
))
check
=
inputwdefault
(
'
Do
you
want
to
reset
grainID
/
flag
/
phaseID
in
the
difspot
table
?
[
y
/
n
]
',
'
y
'
)
;
conf
.
reset
_
difspot
_
table
=
strcmpi
(
check
,
'
y
'
)
;
...
...
@@ -151,6 +156,12 @@ if (~strcmpi(check, 'y'))
save(fullfile(parameters.acq.dir, 'parameters.mat'), 'parameters');
end
% If list is provided, the grain_ids are distributed over the cluster
if isempty(conf.list)
conf.list = 1 : ngrains(phaseID)
end
% launch forward simulation process to OAR - split to two jobs
check = inputwdefault([ ...
'Launch Forward Simulation with OAR (o), here on the command line ' ...
...
...
@@ -172,7 +183,7 @@ switch(lower(check))
OARh = (OARtmp - OARm) / 60; % hours
OAR_parameters.walltime = sprintf('%02d:%02d:00', OARh, OARm);
OAR_parameters.otherparameters = sprintf('mode %s ', conf.mode);
disp('Using OAR parameters:')
disp(OAR_parameters)
disp(['Using ' num2str(OAR_parameters.njobs) ' OAR jobs']);
...
...
@@ -186,8 +197,8 @@ switch(lower(check))
'walltime', OAR_parameters.walltime, 'mem', OAR_parameters.mem);
else
OAR_make('gtForwardSimulate_v2', 1, ngrains(phaseID), OAR_parameters.njobs, ...
[
parameters.acq.dir
' '
phaseID_str
]
, true, ...
'walltime', OAR_parameters.walltime, 'mem', OAR_parameters.mem);
sprintf('%s %s %s ',
parameters.acq.dir
,
phaseID_str
, OAR_parameters.otherparameters)
, true, ...
'walltime', OAR_parameters.walltime, 'mem', OAR_parameters.mem
, 'distribute', true, 'list', conf.list
);
end
case 'c'
disp('Launching forward simulation...')
...
...
@@ -196,7 +207,7 @@ switch(lower(check))
if (isfield(parameters.labgeo, 'sourcepoint') && ~isempty(parameters.labgeo.sourcepoint))
gtForwardSimulatePoly(1, ngrains(phaseID), parameters.acq.dir, phaseID);
else
gtForwardSimulate_v2(1, ngrains(phaseID), parameters.acq.dir, phaseID, 'display_figure', false);
gtForwardSimulate_v2(1, ngrains(phaseID), parameters.acq.dir, phaseID, 'display_figure', false
, 'list', conf.list
);
end
otherwise
disp('Quitting forward simulation...')
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment