aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hrs-scaling.c9
-rw-r--r--src/hrs-scaling.h3
-rw-r--r--src/partialator.c8
3 files changed, 16 insertions, 4 deletions
diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c
index c6a5a1b3..15f2c9f9 100644
--- a/src/hrs-scaling.c
+++ b/src/hrs-scaling.c
@@ -407,13 +407,20 @@ static void calculate_esds(struct image *images, int n, RefList *full,
/* Scale the stack of images */
RefList *scale_intensities(struct image *images, int n, RefList *gref,
- int n_threads)
+ int n_threads, int noscale)
{
int i;
double max_corr;
RefList *full = NULL;
const int min_redundancy = 3;
+ if ( noscale ) {
+ for ( i=0; i<n; i++ ) images[i].osf = 1.0;
+ full = lsq_intensities(images, n, n_threads);
+ calculate_esds(images, n, full, n_threads, min_redundancy);
+ return full;
+ }
+
/* No reference -> create an initial list to refine against */
if ( gref == NULL ) {
full = lsq_intensities(images, n, n_threads);
diff --git a/src/hrs-scaling.h b/src/hrs-scaling.h
index 70157f3f..3eba8b7d 100644
--- a/src/hrs-scaling.h
+++ b/src/hrs-scaling.h
@@ -21,7 +21,8 @@
#include "image.h"
extern RefList *scale_intensities(struct image *images, int n,
- RefList *reference, int n_threads);
+ RefList *reference, int n_threads,
+ int noscale);
#endif /* HRS_SCALING_H */
diff --git a/src/partialator.c b/src/partialator.c
index bfbf6ae4..c8cede82 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -58,6 +58,7 @@ static void show_help(const char *s)
" an HDF5 file.\n"
" -y, --symmetry=<sym> Merge according to symmetry <sym>.\n"
" -n, --iterations=<n> Run <n> cycles of scaling and post-refinement.\n"
+" --no-scale Fix all the scaling factors at unity.\n"
" -r, --reference=<file> Refine images against reflections in <file>,\n"
" instead of taking the mean of the intensity\n"
" estimates.\n"
@@ -279,6 +280,7 @@ int main(int argc, char *argv[])
int have_reference = 0;
char cmdline[1024];
SRContext *sr;
+ int noscale = 0;
/* Long options */
const struct option longopts[] = {
@@ -289,6 +291,7 @@ int main(int argc, char *argv[])
{"beam", 1, NULL, 'b'},
{"symmetry", 1, NULL, 'y'},
{"iterations", 1, NULL, 'n'},
+ {"no-scale", 0, &noscale, 1},
{"reference", 1, NULL, 'r'},
{0, 0, NULL, 0}
};
@@ -485,8 +488,9 @@ int main(int argc, char *argv[])
/* Make initial estimates */
STATUS("Performing initial scaling.\n");
+ if ( noscale ) STATUS("Scale factors fixed at 1.\n");
full = scale_intensities(images, n_usable_patterns, reference,
- nthreads);
+ nthreads, noscale);
sr = sr_titlepage(images, n_usable_patterns, "scaling-report.pdf",
infile, cmdline);
@@ -524,7 +528,7 @@ int main(int argc, char *argv[])
/* Re-estimate all the full intensities */
reflist_free(full);
full = scale_intensities(images, n_usable_patterns,
- reference, nthreads);
+ reference, nthreads, noscale);
sr_iteration(sr, i+1, images, n_usable_patterns, full);