aboutsummaryrefslogtreecommitdiff
path: root/src/partialator.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-03-15 15:53:39 +0100
committerThomas White <taw@physics.org>2013-04-17 17:33:49 +0200
commitcef0a71eb385773fa2290dfc99de225948fef06a (patch)
tree5ff754fc7e15c70c8af3c0018f31222ddf96d8ce /src/partialator.c
parentd5bcdd268da3ed20609a390ed89ea8e61cc26cd7 (diff)
partialator: Add --model=
Diffstat (limited to 'src/partialator.c')
-rw-r--r--src/partialator.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 079e078e..bdacd62b 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -79,6 +79,7 @@ static void show_help(const char *s)
" -r, --reference=<file> Refine images against reflections in <file>,\n"
" instead of taking the mean of the intensity\n"
" estimates.\n"
+" -m, --model=<model> Specify partiality model.\n"
"\n"
" -j <n> Run <n> analyses in parallel.\n");
}
@@ -140,13 +141,18 @@ static void done_image(void *vqargs, void *task)
static void refine_all(Crystal **crystals, int n_crystals,
struct detector *det,
- RefList *full, int nthreads)
+ RefList *full, int nthreads, PartialityModel pmodel)
{
struct refine_args task_defaults;
struct queue_args qargs;
+ /* If the partiality model is "p=1", this refinement is really, really
+ * easy... */
+ if ( pmodel == PMODEL_UNITY ) return;
+
task_defaults.full = full;
task_defaults.crystal = NULL;
+ task_defaults.pmodel = pmodel;
qargs.task_defaults = task_defaults;
qargs.n_started = 0;
@@ -329,7 +335,8 @@ int main(int argc, char *argv[])
{"iterations", 1, NULL, 'n'},
{"no-scale", 0, &noscale, 1},
{"reference", 1, NULL, 'r'},
- {"partiality", 1, NULL, 'm'},
+ {"model", 1, NULL, 'm'},
+
{0, 0, NULL, 0}
};
@@ -574,7 +581,7 @@ int main(int argc, char *argv[])
STATUS("\nPerforming initial scaling.\n");
if ( noscale ) STATUS("Scale factors fixed at 1.\n");
full = scale_intensities(crystals, n_crystals, reference,
- nthreads, noscale);
+ nthreads, noscale, pmodel);
sr = sr_titlepage(crystals, n_crystals, "scaling-report.pdf",
infile, cmdline);
@@ -597,7 +604,7 @@ int main(int argc, char *argv[])
/* Refine the geometry of all patterns to get the best fit */
select_reflections_for_refinement(crystals, n_crystals,
comp, have_reference);
- refine_all(crystals, n_crystals, det, comp, nthreads);
+ refine_all(crystals, n_crystals, det, comp, nthreads, pmodel);
nobs = 0;
for ( j=0; j<n_crystals; j++ ) {
@@ -612,7 +619,7 @@ int main(int argc, char *argv[])
/* Re-estimate all the full intensities */
reflist_free(full);
full = scale_intensities(crystals, n_crystals,
- reference, nthreads, noscale);
+ reference, nthreads, noscale, pmodel);
sr_iteration(sr, i+1, crystals, n_crystals, full);