diff options
author | Thomas White <taw@physics.org> | 2011-09-30 13:43:22 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:38 +0100 |
commit | d27813718695ff745ea3f44f06ce4361a501891d (patch) | |
tree | 3d5a851026e15b937e70f54a2da56bd0c70ea658 /src | |
parent | 353a04965e506c135f3bb7e992f729f73441ed1e (diff) |
A cleaner (but slower) way of rejecting PR duds in scaling
Diffstat (limited to 'src')
-rw-r--r-- | src/hrs-scaling.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c index 05250166..71274eec 100644 --- a/src/hrs-scaling.c +++ b/src/hrs-scaling.c @@ -65,22 +65,7 @@ static void *create_job(void *vqargs) wargs = malloc(sizeof(struct worker_args)); wargs->reference = qargs->reference; - wargs->image = NULL; - do { - - if ( !qargs->images[qargs->n_started].pr_dud ) { - wargs->image = &qargs->images[qargs->n_started]; - break; - } - - qargs->n_started++; - - } while ( qargs->n_started >= qargs->n_to_do ); - - if ( wargs->image == NULL ) { - free(wargs); - return NULL; - } + wargs->image = &qargs->images[qargs->n_started++]; return wargs; } @@ -97,6 +82,11 @@ static void run_job(void *vwargs, int cookie) double den = 0.0; double corr; + if ( image->pr_dud ) { + wargs->shift = 0.0; + return; + } + for ( refl = first_refl(image->reflections, &iter); refl != NULL; refl = next_refl(refl, iter) ) |