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
541f3d48
Commit
541f3d48
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
BROKEN
parent
981db81b
No related branches found
No related tags found
1 merge request
!1454
rm Beam from Dp|Offsp-Sim
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Sim/Scan/AlphaScan.cpp
+1
-0
1 addition, 0 deletions
Sim/Scan/AlphaScan.cpp
Sim/Scan/AlphaScan.h
+2
-0
2 additions, 0 deletions
Sim/Scan/AlphaScan.h
Sim/Simulation/DepthprobeSimulation.cpp
+14
-2
14 additions, 2 deletions
Sim/Simulation/DepthprobeSimulation.cpp
with
17 additions
and
2 deletions
Sim/Scan/AlphaScan.cpp
+
1
−
0
View file @
541f3d48
...
@@ -58,6 +58,7 @@ AlphaScan* AlphaScan::clone() const
...
@@ -58,6 +58,7 @@ AlphaScan* AlphaScan::clone() const
auto
*
result
=
new
AlphaScan
(
*
m_axis
);
auto
*
result
=
new
AlphaScan
(
*
m_axis
);
result
->
setIntensity
(
intensity
());
result
->
setIntensity
(
intensity
());
result
->
setFootprint
(
m_footprint
.
get
());
result
->
setFootprint
(
m_footprint
.
get
());
result
->
setAlphaOffset
(
alphaOffset
());
if
(
m_lambda_distrib
)
if
(
m_lambda_distrib
)
result
->
m_lambda_distrib
.
reset
(
m_lambda_distrib
->
clone
());
result
->
m_lambda_distrib
.
reset
(
m_lambda_distrib
->
clone
());
...
...
This diff is collapsed.
Click to expand it.
Sim/Scan/AlphaScan.h
+
2
−
0
View file @
541f3d48
...
@@ -56,6 +56,8 @@ public:
...
@@ -56,6 +56,8 @@ public:
return
m_alpha_distrib
.
get
();
return
m_alpha_distrib
.
get
();
}
}
double
alphaOffset
()
const
{
return
m_alpha_offset
;
}
private
:
private
:
void
checkInitialization
();
void
checkInitialization
();
...
...
This diff is collapsed.
Click to expand it.
Sim/Simulation/DepthprobeSimulation.cpp
+
14
−
2
View file @
541f3d48
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include
"Resample/Element/DepthprobeElement.h"
#include
"Resample/Element/DepthprobeElement.h"
#include
"Sim/Computation/DepthprobeComputation.h"
#include
"Sim/Computation/DepthprobeComputation.h"
#include
"Sim/Scan/AlphaScan.h"
#include
"Sim/Scan/AlphaScan.h"
#include
<iostream>
DepthprobeSimulation
::
DepthprobeSimulation
(
const
IBeamScan
&
scan
,
const
MultiLayer
&
sample
)
DepthprobeSimulation
::
DepthprobeSimulation
(
const
IBeamScan
&
scan
,
const
MultiLayer
&
sample
)
:
ISimulation
(
sample
)
:
ISimulation
(
sample
)
...
@@ -69,9 +70,15 @@ void DepthprobeSimulation::initDistributionHandler()
...
@@ -69,9 +70,15 @@ void DepthprobeSimulation::initDistributionHandler()
switch
(
distribution
.
whichParameter
())
{
switch
(
distribution
.
whichParameter
())
{
case
ParameterDistribution
::
BeamInclinationAngle
:
case
ParameterDistribution
::
BeamInclinationAngle
:
{
auto
*
s
=
dynamic_cast
<
AlphaScan
*>
(
m_scan
.
get
());
if
(
!
s
)
throw
std
::
runtime_error
(
"Alpha distribution not compatible with non-alpha scan"
);
distributionHandler
().
defineCallbackForDistribution
(
distributionHandler
().
defineCallbackForDistribution
(
&
distribution
,
[
&
](
double
d
)
{
m_beam
->
setInclination
(
d
);
});
&
distribution
,
[
&
](
double
d
)
{
m_beam
->
setInclination
(
d
);
s
->
setAlphaOffset
(
d
);
ASSERT
(
s
->
alphaOffset
()
==
m_beam
->
alpha_i
());});
break
;
break
;
}
case
ParameterDistribution
::
BeamWavelength
:
case
ParameterDistribution
::
BeamWavelength
:
distributionHandler
().
defineCallbackForDistribution
(
distributionHandler
().
defineCallbackForDistribution
(
&
distribution
,
[
&
](
double
d
)
{
m_scan
->
setWavelength
(
d
);
});
&
distribution
,
[
&
](
double
d
)
{
m_scan
->
setWavelength
(
d
);
});
...
@@ -84,7 +91,12 @@ void DepthprobeSimulation::initDistributionHandler()
...
@@ -84,7 +91,12 @@ void DepthprobeSimulation::initDistributionHandler()
void
DepthprobeSimulation
::
runComputation
(
const
ReSample
&
re_sample
,
size_t
i
,
double
weight
)
void
DepthprobeSimulation
::
runComputation
(
const
ReSample
&
re_sample
,
size_t
i
,
double
weight
)
{
{
const
double
result_angle
=
m_alpha_axis
->
bin
(
i
).
center
()
+
m_beam
->
alpha_i
();
const
auto
*
s
=
dynamic_cast
<
AlphaScan
*>
(
m_scan
.
get
());
if
(
!
s
)
throw
std
::
runtime_error
(
"Alpha distribution not compatible with non-alpha scan"
);
std
::
cout
<<
s
->
alphaOffset
()
<<
" vs "
<<
m_beam
->
alpha_i
()
<<
std
::
endl
;
ASSERT
(
s
->
alphaOffset
()
==
m_beam
->
alpha_i
());
const
double
result_angle
=
m_alpha_axis
->
bin
(
i
).
center
()
+
s
->
alphaOffset
();
DepthprobeElement
ele
(
m_scan
->
wavelength
(),
-
result_angle
,
m_z_axis
.
get
(),
DepthprobeElement
ele
(
m_scan
->
wavelength
(),
-
result_angle
,
m_z_axis
.
get
(),
0
<
result_angle
&&
result_angle
<
M_PI_2
);
0
<
result_angle
&&
result_angle
<
M_PI_2
);
...
...
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