aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValerio Mariani <valerio.mariani@desy.de>2015-02-20 15:46:35 +0100
committerThomas White <taw@physics.org>2015-02-20 15:59:49 +0100
commitb95dbc4ee0cb358fdbafd5031a7acce216c37819 (patch)
tree359fc9675c0df404e92af337142d9043003b322a
parent8b6b18d76d3d8bd0ba6221dc6c6c1cc157589a2e (diff)
Sets saving of maps as default for geoptimiser
-rw-r--r--doc/man/geoptimiser.112
-rw-r--r--src/geoptimiser.c19
2 files changed, 16 insertions, 15 deletions
diff --git a/doc/man/geoptimiser.1 b/doc/man/geoptimiser.1
index 21f25898..90a04c74 100644
--- a/doc/man/geoptimiser.1
+++ b/doc/man/geoptimiser.1
@@ -33,6 +33,11 @@ the name of two rigid group collections defined in the geometry file: one descri
.PP
See \fBman crystfel_geometry\fR for information on how to create a file describing the detector geometry, and guidelines to define the required rigid groups and rigid groups collections.
+.PP
+Geoptimizer saves error maps before and after the geometry optimization. These maps show an estimation of the geometry error as average displacement, for each pixel, between the predicted and the observed positions of the Bragg peaks. The maps are color-scaled PNG files and
+are named "error_map_before.png" and "error_map_after.png" respectively. In order to better visualize small local errors, the color range has been set to show all displacements bigger that 1 pixel as white (in other words, "displacement saturation" is set at 1 pixel).
+
+
.SH OPTIONS
.PD 0
.IP "\fB-i\fR \fIfilename\fR"
@@ -70,12 +75,9 @@ Specifies the name of the rigid group collection for detector 'quadrants'. This
If a given rigid group is a member of \fIname\fR, then panels which are members of that rigid group and which do not contain enough peaks for positional refinement will be moved according to the average movement of the other panels in the group.
.PD 0
-.IP "\fB-e\fR"
-.IP \fB--error-maps\fR
+.IP \fB--no-error-maps\fR
.PD
-Saves error maps before and after the geometry optimization. These maps show an estimation of the geometry error as average displacement, for each pixel, between the predicted and the observed positions of the Bragg peaks. The maps are color-scaled PNG files and
-are named "error_map_before.png" and "error_map_after.png" respectively. In order to better visualize small local errors, the color range has been set to show all displacements bigger that 1 pixel as white (in other words, "displacement saturation" is set at 1 pixel).
-.sp
+Forces geoptimiser not to save error maps.
.PD 0
.IP "\fB-x\fR \fIn\fR"
diff --git a/src/geoptimiser.c b/src/geoptimiser.c
index eda4e615..26e083e6 100644
--- a/src/geoptimiser.c
+++ b/src/geoptimiser.c
@@ -72,9 +72,7 @@ static void show_help(const char *s)
" -q, --quadrants=<rg_coll> Rigid group collection for quadrants.\n"
" -c, --connected=<rg_coll> Rigid group collection for connected\n"
" ASICs.\n"
-" -e, --error-maps Save error maps to disk, before and\n"
-" after optimization.\n"
-" Default: error maps are not saved.\n"
+" --no-error-maps Do not generate error map PNGs.\n"
" -x, --min-num-peaks-per-pixel=<num> Minimum number of peaks per pixel.\n"
" Default: 3. \n"
" -p, --min-num-peaks-per-panel=<num> Minimum number of peaks per pixel.\n"
@@ -2612,6 +2610,10 @@ int optimize_geometry(char *infile, char *outfile, char *geometry_filename,
return 1;
}
STATUS("All done!\n");
+ if ( error_maps ) {
+ STATUS("Be sure to inspect error_map_before.png and "
+ "error_map_after.png !!\n");
+ }
free(conn_data);
free(displ_x);
@@ -2641,7 +2643,7 @@ int main(int argc, char *argv[])
int only_best_distance = 0;
int nostretch = 0;
int individual_coffset = 0;
- int error_maps = 0;
+ int error_maps = 1;
double max_peak_dist = 4.0;
struct detector *det = NULL;
@@ -2664,16 +2666,16 @@ int main(int argc, char *argv[])
{"most-few-clen", 0, NULL, 'l'},
{"max-peak-dist", 1, NULL, 'm'},
{"individual-dist-offset", 0, NULL, 's'},
- {"error-maps", 0, NULL, 'e'},
/* Long-only options with no arguments */
- {"no-stretch", 0, &nostretch, 1},
+ {"no-stretch", 0, &nostretch, 1},
+ {"no-error-maps", 0, &error_maps, 0},
{0, 0, NULL, 0}
};
/* Short options */
- while ((c = getopt_long(argc, argv, "ho:i:g:q:c:o:x:p:lsm:e",
+ while ((c = getopt_long(argc, argv, "ho:i:g:q:c:o:x:p:lsm",
longopts, NULL)) != -1) {
switch (c) {
@@ -2733,9 +2735,6 @@ int main(int argc, char *argv[])
individual_coffset = 1;
break;
- case 'e' :
- error_maps = 1;
- break;
}
}