Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
82b9ba0c
Commit
82b9ba0c
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
generate alpha/lambda resolution inside alpha scan
parent
f2de0be6
No related branches found
No related tags found
1 merge request
!1299
decisive simplification of scan resolution evaluation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sim/Scan/AlphaScan.cpp
+8
-10
8 additions, 10 deletions
Sim/Scan/AlphaScan.cpp
with
8 additions
and
10 deletions
Sim/Scan/AlphaScan.cpp
+
8
−
10
View file @
82b9ba0c
...
@@ -61,18 +61,16 @@ std::vector<SpecularElement> AlphaScan::generateElements() const
...
@@ -61,18 +61,16 @@ std::vector<SpecularElement> AlphaScan::generateElements() const
std
::
vector
<
SpecularElement
>
result
;
std
::
vector
<
SpecularElement
>
result
;
result
.
reserve
(
nSteps
());
result
.
reserve
(
nSteps
());
const
DistrOutput
lambdaDistrib
=
m_lambda_distrib
->
generateResolutionSamples
(
wavelength
(),
m_axis
->
size
());
const
DistrOutput
alphaDistrib
=
m_alpha_distrib
->
generateResolutionSamples
(
m_axis
->
binCenters
());
for
(
size_t
i
=
0
;
i
<
m_axis
->
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
m_axis
->
size
();
++
i
)
{
for
(
size_t
j
=
0
;
j
<
alphaDistrib
[
i
].
size
();
++
j
)
{
const
auto
lambdaDistrib
=
m_lambda_distrib
->
generateResolutionSamples
(
wavelength
(),
1
)[
0
];
const
double
alpha
=
alphaDistrib
[
i
][
j
].
value
;
const
auto
alphaDistrib
=
for
(
size_t
k
=
0
;
k
<
lambdaDistrib
[
i
].
size
();
++
k
)
{
m_alpha_distrib
->
generateResolutionSamples
(
m_axis
->
binCenters
()[
i
],
1
)[
0
];
const
double
wavelength
=
lambdaDistrib
[
i
][
k
].
value
;
for
(
size_t
j
=
0
;
j
<
alphaDistrib
.
size
();
++
j
)
{
const
double
alpha
=
alphaDistrib
[
j
].
value
;
for
(
size_t
k
=
0
;
k
<
lambdaDistrib
.
size
();
++
k
)
{
const
double
wavelength
=
lambdaDistrib
[
k
].
value
;
const
bool
computable
=
wavelength
>=
0
&&
alpha
>=
0
&&
alpha
<=
M_PI_2
;
const
bool
computable
=
wavelength
>=
0
&&
alpha
>=
0
&&
alpha
<=
M_PI_2
;
const
double
weight
=
alphaDistrib
[
i
][
j
].
weight
*
lambdaDistrib
[
i
][
k
].
weight
;
const
double
weight
=
alphaDistrib
[
j
].
weight
*
lambdaDistrib
[
k
].
weight
;
const
double
footprint
=
m_footprint
?
m_footprint
->
calculate
(
alpha
)
:
1
;
const
double
footprint
=
m_footprint
?
m_footprint
->
calculate
(
alpha
)
:
1
;
result
.
emplace_back
(
SpecularElement
::
FromAlphaScan
(
i
,
weight
,
wavelength
,
-
alpha
,
result
.
emplace_back
(
SpecularElement
::
FromAlphaScan
(
i
,
weight
,
wavelength
,
-
alpha
,
footprint
,
polarizerMatrix
(),
footprint
,
polarizerMatrix
(),
...
...
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