aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-04-13 18:21:21 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:24 +0100
commitaa2f9deebed210e0e87a72125a6dcc3e45a42525 (patch)
tree05ddc801c1185946cb04d6754fd72300f1e9672e /src
parentde215b2a46b3452e8d540a536ecaf53dd839e4b0 (diff)
partial_sim: Add an overall scaling factor for added fun
Diffstat (limited to 'src')
-rw-r--r--src/partial_sim.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index a023737f..f1fcfc5b 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -33,7 +33,8 @@
/* For each reflection in "partial", fill in what the intensity would be
* according to "full" */
-static void calculate_partials(RefList *partial, RefList *full, const char *sym)
+static void calculate_partials(RefList *partial, double osf,
+ RefList *full, const char *sym)
{
Reflection *refl;
RefListIterator *iter;
@@ -55,7 +56,7 @@ static void calculate_partials(RefList *partial, RefList *full, const char *sym)
if ( rfull == NULL ) {
set_redundancy(refl, 0);
} else {
- Ip = p * get_intensity(rfull);
+ Ip = osf * p * get_intensity(rfull);
set_int(refl, Ip);
}
@@ -235,7 +236,7 @@ int main(int argc, char *argv[])
image.i0_available = 0;
image.filename = "(simulated 1)";
image.reflections = find_intersections(&image, image.indexed_cell, 0);
- calculate_partials(image.reflections, full, sym);
+ calculate_partials(image.reflections, 1.0, full, sym);
write_chunk(ofh, &image, STREAM_INTEGRATED);
reflist_free(image.reflections);
@@ -248,7 +249,7 @@ int main(int argc, char *argv[])
/* Write another chunk */
image.reflections = find_intersections(&image, image.indexed_cell, 0);
- calculate_partials(image.reflections, full, sym);
+ calculate_partials(image.reflections, 0.5, full, sym);
write_chunk(ofh, &image, STREAM_INTEGRATED);
reflist_free(image.reflections);