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
bb36d36a
Commit
bb36d36a
authored
9 years ago
by
Pospelov, Gennady
Browse files
Options
Downloads
Plain Diff
Merge branch 'BugInDetectorInit' into develop
parents
5c837061
87815e62
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Core/Algorithms/inc/Instrument.h
+2
-8
2 additions, 8 deletions
Core/Algorithms/inc/Instrument.h
Core/Algorithms/src/Instrument.cpp
+16
-0
16 additions, 0 deletions
Core/Algorithms/src/Instrument.cpp
with
18 additions
and
8 deletions
Core/Algorithms/inc/Instrument.h
+
2
−
8
View file @
bb36d36a
...
...
@@ -119,15 +119,9 @@ inline Beam Instrument::getBeam() const
return
m_beam
;
}
inline
void
Instrument
::
setBeam
(
const
Beam
&
beam
)
{
m_beam
=
beam
;
}
inline
void
Instrument
::
setBeamParameters
(
double
wavelength
,
double
alpha_i
,
double
phi_i
)
{
m_beam
.
setCentralK
(
wavelength
,
alpha_i
,
phi_i
);
}
inline
void
Instrument
::
setBeamIntensity
(
double
intensity
)
{
...
...
This diff is collapsed.
Click to expand it.
Core/Algorithms/src/Instrument.cpp
+
16
−
0
View file @
bb36d36a
...
...
@@ -46,6 +46,7 @@ Instrument &Instrument::operator=(const Instrument &other)
void
Instrument
::
setDetector
(
const
IDetector2D
&
detector
)
{
mP_detector
.
reset
(
detector
.
clone
());
initDetector
();
}
void
Instrument
::
matchDetectorAxes
(
const
OutputData
<
double
>
&
output_data
)
...
...
@@ -82,6 +83,9 @@ std::string Instrument::addParametersToExternalPool(std::string path, ParameterP
void
Instrument
::
initDetector
()
{
if
(
!
mP_detector
)
{
throw
RuntimeErrorException
(
"Instrument::initDetector() -> Error. Detector is not initialized."
);
}
getDetector
()
->
init
(
getBeam
());
}
...
...
@@ -140,3 +144,15 @@ void Instrument::print(std::ostream &ostr) const
ostr
<<
" "
<<
m_beam
<<
std
::
endl
;
ostr
<<
" "
<<
*
mP_detector
<<
std
::
endl
;
}
void
Instrument
::
setBeamParameters
(
double
wavelength
,
double
alpha_i
,
double
phi_i
)
{
m_beam
.
setCentralK
(
wavelength
,
alpha_i
,
phi_i
);
if
(
mP_detector
)
initDetector
();
}
void
Instrument
::
setBeam
(
const
Beam
&
beam
)
{
m_beam
=
beam
;
if
(
mP_detector
)
initDetector
();
}
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