aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-11-08 16:20:58 +0100
committerThomas White <taw@physics.org>2018-02-27 11:02:02 +0100
commitd813960912ddc76d5cff0501b4f7783c3eeca95d (patch)
tree4dc11e2ecd789d34a451abc81d799508118a6b86 /src
parentcc64a9ae6c4ca7518ba904d6cdf38b3d8dccbbf7 (diff)
Separate partiality calculation from prediction
Diffstat (limited to 'src')
-rw-r--r--src/partial_sim.c3
-rw-r--r--src/partialator.c3
-rw-r--r--src/post-refinement.c9
3 files changed, 10 insertions, 5 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index 2f0a0277..4a348742 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -384,8 +384,9 @@ static void run_job(void *vwargs, int cookie)
snprintf(wargs->image.filename, 255, "dummy.h5");
}
- reflections = find_intersections(&wargs->image, cr, PMODEL_SCSPHERE);
+ reflections = predict_to_res(cr, largest_q(&wargs->image));
crystal_set_reflections(cr, reflections);
+ calculate_partialities(cr, PMODEL_SCSPHERE);
for ( i=0; i<NBINS; i++ ) {
wargs->n_ref[i] = 0;
diff --git a/src/partialator.c b/src/partialator.c
index aded835d..428b0d68 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -1135,7 +1135,8 @@ int main(int argc, char *argv[])
crystal_set_image(cryst, &images[i]);
/* Now it's safe to do the following */
- update_partialities(cryst, pmodel);
+ update_predictions(cryst);
+ calculate_partialities(cryst, pmodel);
}
}
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 487ce872..bf30d299 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -606,7 +606,8 @@ static void write_residual_graph(Crystal *cr, const RefList *full)
cell_set_reciprocal(cell, asx, asy, asz,
bsx, bsy, bsz,
csx, csy, csz);
- update_partialities(cr, PMODEL_SCSPHERE);
+ update_predictions(cr);
+ calculate_partialities(cr, PMODEL_SCSPHERE);
res = residual(cr, full, 0, &n, NULL);
fprintf(fh, "%i %e %e %i\n", i, asx, res, n);
}
@@ -614,7 +615,8 @@ static void write_residual_graph(Crystal *cr, const RefList *full)
cell_set_reciprocal(cell, orig_asx, asy, asz,
bsx, bsy, bsz,
csx, csy, csz);
- update_partialities(cr, PMODEL_SCSPHERE);
+ update_predictions(cr);
+ calculate_partialities(cr, PMODEL_SCSPHERE);
fclose(fh);
}
@@ -648,7 +650,8 @@ static void do_pr_refine(Crystal *cr, const RefList *full,
pr_iterate(cr, full, pmodel, NULL, verbose);
- update_partialities(cr, pmodel);
+ update_predictions(cr);
+ calculate_partialities(cr, pmodel);
dev = residual(cr, full, 0, 0, NULL);
if ( fabs(dev - old_dev) < dev*0.0001 ) done = 1;