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
7353b052
Commit
7353b052
authored
10 years ago
by
Wolfgang Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some bugs in the fitting package
Signed-off-by:
Wolfgang Ludwig
<
wolfgang.ludwig@esrf.fr
>
parent
bb97e924
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
zUtil_Fit/gtFitDefaultPars.m
+1
-1
1 addition, 1 deletion
zUtil_Fit/gtFitDefaultPars.m
zUtil_Fit/gtFitFwdSimGrains.m
+8
-9
8 additions, 9 deletions
zUtil_Fit/gtFitFwdSimGrains.m
zUtil_Indexter/gtINDEXIndividualSpots.m
+6
-2
6 additions, 2 deletions
zUtil_Indexter/gtINDEXIndividualSpots.m
with
15 additions
and
12 deletions
zUtil_Fit/gtFitDefaultPars.m
+
1
−
1
View file @
7353b052
...
...
@@ -26,7 +26,7 @@ par.fit_global_rotwedge = false;
par
.
fit_grain_position
=
true
;
par
.
fit_grain_orientation
=
true
;
par
.
fit_grain_strain
=
tru
e
;
par
.
fit_grain_strain
=
fals
e
;
par
.
fit_drift_posX
=
false
;
par
.
fit_drift_posY
=
false
;
...
...
This diff is collapsed.
Click to expand it.
zUtil_Fit/gtFitFwdSimGrains.m
+
8
−
9
View file @
7353b052
...
...
@@ -156,8 +156,8 @@ for ii = 1:length(grain)
grain
{
ii
}
.
fsim
.
plref
=
[
plref
,
plref
,
plref
,
plref
];
grain
{
ii
}
.
fsim
.
refind
=
[
refind
,
refind
,
refind
,
refind
];
grain
{
ii
}
.
fsim
.
hklspind
=
grain
{
ii
}
.
fsim
.
refind
;
grain
{
ii
}
.
fsim
.
thetatype
=
[
cryst
.
thetatypesp
,
cryst
.
thetatypesp
,
...
cryst
.
thetatypesp
,
cryst
.
thetatypesp
];
grain
{
ii
}
.
fsim
.
thetatype
=
[
cryst
.
thetatypesp
'
, cryst.thetatypesp
'
,
...
cryst
.
thetatypesp
'
, cryst.thetatypesp
'
];
grain
{
ii
}
.
fsim
.
hklind
=
grain
{
ii
}
.
fsim
.
thetatype
;
else
...
...
@@ -276,13 +276,12 @@ for ii = 1:length(grain)
grain
{
ii
}
.
fsim
.
plref
=
[
plref
,
plref
,
plref
,
plref
];
grain
{
ii
}
.
fsim
.
refind
=
[
refind
,
refind
,
refind
,
refind
];
grain
{
ii
}
.
fsim
.
hklspind
=
grain
{
ii
}
.
fsim
.
refind
;
grain
{
ii
}
.
fsim
.
thetatype
=
[
cryst
.
thetatypesp
,
cryst
.
thetatypesp
,
...
cryst
.
thetatypesp
,
cryst
.
thetatypesp
];
grain
{
ii
}
.
fsim
.
thetatype
=
[
cryst
.
thetatypesp
'
, cryst.thetatypesp
'
,
...
cryst
.
thetatypesp
'
, cryst.thetatypesp
'
];
grain
{
ii
}
.
fsim
.
hklind
=
grain
{
ii
}
.
fsim
.
thetatype
;
end
% Set NaN for spots that fall outside the detector area
if
~
offdet
offd
=
(
uv
(
1
,:)
<=
0.5
)
|
(
labgeo
.
detsizeu
+
0.5
<=
uv
(
1
,:))
|
...
...
...
@@ -293,19 +292,19 @@ for ii = 1:length(grain)
grain
{
ii
}
.
fsim
.
(
fn
{
jj
})(:,
offd
)
=
NaN
;
end
end
% Delete spots with NaN values (no reflection (omega=NaN) or off
% the detector)
if
~
keepNaN
if
~
keepNaN
todel
=
isnan
(
grain
{
ii
}
.
fsim
.
cu
);
fn
=
fieldnames
(
grain
{
ii
}
.
fsim
);
for
jj
=
1
:
length
(
fn
)
grain
{
ii
}
.
fsim
.
(
fn
{
jj
})(:,
todel
)
=
[];
end
end
end
...
...
This diff is collapsed.
Click to expand it.
zUtil_Indexter/gtINDEXIndividualSpots.m
+
6
−
2
View file @
7353b052
...
...
@@ -102,8 +102,12 @@ if ~exist('spin','var') || isempty(spin)
fprintf
(
'Loading diff. spot data from difspottable %s ...\n'
,
difspottable
)
gtDBConnect
;
mysqlcmd
=
sprintf
(
'SELECT difspotID,CentroidX,CentroidY,CentroidImage,BoundingBoxXsize,BoundingBoxYsize'
,
...
'BoundingBoxXOrigin, BoundingBoxYOrigin, Integral FROM %s ORDER BY difspotID'
,
difspottable
);
mysqlcmd
=
sprintf
([
...
'SELECT difspotID, CentroidX, CentroidY, CentroidImage, '
...
' BoundingBoxXsize, BoundingBoxYsize, BoundingBoxXOrigin, '
...
' BoundingBoxYOrigin, Integral '
...
'FROM %s '
...
'ORDER BY difspotID'
],
difspottable
);
[
spin
.
id
,
spin
.
cu
,
spin
.
cv
,
spin
.
cw
,
spin
.
bbx
,
spin
.
bby
,
spin
.
bbxo
,
spin
.
bbyo
,
spin
.
int
]
=
mym
(
mysqlcmd
);
end
...
...
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