Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
5abef58d
Commit
5abef58d
authored
Feb 27, 2020
by
Remi Perenon
Browse files
Correction NDTSF job
parent
91e207b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/Framework/Jobs/NeutronDynamicTotalStructureFactor.py
View file @
5abef58d
...
...
@@ -210,9 +210,12 @@ class NeutronDynamicTotalStructureFactor(IJob):
self
.
_outputData
[
"f(q,t)_coh_weighted_%s%s"
%
pair
][:]
=
self
.
_outputData
[
"f(q,t)_coh_%s%s"
%
pair
][:]
*
numpy
.
sqrt
(
ci
*
cj
)
*
bi
*
bj
self
.
_outputData
[
"s(q,f)_coh_weighted_%s%s"
%
pair
][:]
=
self
.
_outputData
[
"s(q,f)_coh_%s%s"
%
pair
][:]
*
numpy
.
sqrt
(
ci
*
cj
)
*
bi
*
bj
self
.
_outputData
[
"f(q,t)_coh_total"
][:]
+=
self
.
_outputData
[
"f(q,t)_coh_weighted_%s%s"
%
pair
][:]
self
.
_outputData
[
"s(q,f)_coh_total"
][:]
+=
self
.
_outputData
[
"s(q,f)_coh_weighted_%s%s"
%
pair
][:]
if
pair
[
0
]
==
pair
[
1
]:
# Add a factor 2 if the two elements are different
self
.
_outputData
[
"f(q,t)_coh_total"
][:]
+=
self
.
_outputData
[
"f(q,t)_coh_weighted_%s%s"
%
pair
][:]
self
.
_outputData
[
"s(q,f)_coh_total"
][:]
+=
self
.
_outputData
[
"s(q,f)_coh_weighted_%s%s"
%
pair
][:]
else
:
self
.
_outputData
[
"f(q,t)_coh_total"
][:]
+=
2
*
self
.
_outputData
[
"f(q,t)_coh_weighted_%s%s"
%
pair
][:]
self
.
_outputData
[
"s(q,f)_coh_total"
][:]
+=
2
*
self
.
_outputData
[
"s(q,f)_coh_weighted_%s%s"
%
pair
][:]
# Compute incoherent functions and structure factor
for
element
,
ni
in
nAtomsPerElement
.
items
():
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment