Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Oleksii Turkot
CrystFEL
Commits
7b3e7208
Commit
7b3e7208
authored
Sep 24, 2010
by
Thomas White
Browse files
process_hkl: Add intensity per peak scaling
parent
7e146b3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/process_hkl.c
View file @
7b3e7208
...
...
@@ -307,7 +307,8 @@ static void merge_pattern(double *model, ReflItemList *observed,
enum
{
SCALE_NONE
,
SCALE_CONSTINT
,
SCALE_TWOPASS
SCALE_INTPERBRAGG
,
SCALE_TWOPASS
,
};
...
...
@@ -319,7 +320,7 @@ static void scale_intensities(const double *model, ReflItemList *model_items,
double
top
=
0
.
0
;
double
bot
=
0
.
0
;
unsigned
int
i
;
const
int
scaling
=
SCALE_
CONSTINT
;
const
int
scaling
=
SCALE_
INTPERBRAGG
;
for
(
i
=
0
;
i
<
num_items
(
new_items
);
i
++
)
{
...
...
@@ -354,6 +355,15 @@ static void scale_intensities(const double *model, ReflItemList *model_items,
break
;
case
SCALE_INTPERBRAGG
:
/* Sum up the intensity in the pattern */
i2
=
lookup_intensity
(
new_pattern
,
it
->
h
,
it
->
k
,
it
->
l
);
top
+=
i2
;
bot
+=
1
.
0
;
break
;
}
}
...
...
@@ -365,6 +375,9 @@ static void scale_intensities(const double *model, ReflItemList *model_items,
case
SCALE_CONSTINT
:
s
=
1000
.
0
/
top
;
break
;
case
SCALE_INTPERBRAGG
:
s
=
1000
.
0
/
(
top
/
bot
);
break
;
}
//if ( f0_valid ) printf("%f %f\n", s, f0);
...
...
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