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
d921479f
Commit
d921479f
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
simplify
parent
d7a92bed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1303
simplifications of resolution handling; resolve warnings
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Model/FromCore/ItemizeSimulation.cpp
+2
-2
2 additions, 2 deletions
GUI/Model/FromCore/ItemizeSimulation.cpp
Sim/Scan/ScanResolution.cpp
+0
-5
0 additions, 5 deletions
Sim/Scan/ScanResolution.cpp
Sim/Scan/ScanResolution.h
+4
-1
4 additions, 1 deletion
Sim/Scan/ScanResolution.h
with
6 additions
and
8 deletions
GUI/Model/FromCore/ItemizeSimulation.cpp
+
2
−
2
View file @
d921479f
...
...
@@ -453,13 +453,13 @@ SpecularInstrumentItem* createSpecularInstrumentItem(const SpecularSimulation& s
if
(
const
ScanResolution
*
resolution
=
alphaScan
->
wavelengthResolution
())
if
(
const
IRangedDistribution
*
rdis
=
resolution
->
rdistribution
())
{
double
mean
=
alphaScan
->
wavelength
();
double
std_dev
=
resolution
->
stdDev
s
(
mean
,
1
).
front
();
double
std_dev
=
resolution
->
stdDev
();
addRangedDistributionToItem
(
beam_item
->
wavelengthItem
(),
*
rdis
,
mean
,
std_dev
);
}
if
(
const
ScanResolution
*
resolution
=
alphaScan
->
angleResolution
())
if
(
const
IRangedDistribution
*
rdis
=
resolution
->
rdistribution
())
{
double
std_dev
=
resolution
->
stdDev
s
(
0.0
,
1
).
front
();
double
std_dev
=
resolution
->
stdDev
();
addRangedDistributionToItem
(
beam_item
->
inclinationAngleItem
(),
*
rdis
,
0
,
std_dev
);
}
...
...
This diff is collapsed.
Click to expand it.
Sim/Scan/ScanResolution.cpp
+
0
−
5
View file @
d921479f
...
...
@@ -35,11 +35,6 @@ std::vector<ParameterSample> ScanResolution::resolutionSamples(double mean) cons
return
rdistribution
()
->
generateSamples
(
mean
,
m_stddev
);
}
std
::
vector
<
double
>
ScanResolution
::
stdDevs
(
double
,
size_t
n_times
)
const
{
return
std
::
vector
<
double
>
(
n_times
,
m_stddev
);
}
size_t
ScanResolution
::
nSamples
()
const
{
return
m_distr
?
m_distr
->
nSamples
()
:
1L
;
...
...
This diff is collapsed.
Click to expand it.
Sim/Scan/ScanResolution.h
+
4
−
1
View file @
d921479f
...
...
@@ -38,7 +38,10 @@ public:
std
::
vector
<
ParameterSample
>
resolutionSamples
(
double
mean
)
const
;
std
::
vector
<
double
>
stdDevs
(
double
mean
,
size_t
n_times
)
const
;
double
stdDev
()
const
{
return
m_stddev
;
}
//... For export:
double
delta
()
const
...
...
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