aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/man/indexamajig.15
-rw-r--r--src/im-sandbox.c4
-rw-r--r--src/im-sandbox.h2
-rw-r--r--src/indexamajig.c13
4 files changed, 20 insertions, 4 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1
index e1e1e19f..e4fa91bd 100644
--- a/doc/man/indexamajig.1
+++ b/doc/man/indexamajig.1
@@ -429,6 +429,11 @@ Do not record peak search results in the stream. You won't be able to check tha
.PD
Do not record integrated reflections in the stream. The resulting output won't be usable for merging, but will be a lot smaller. This option might be useful if you're only interested in things like unit cell parameters and orientations.
+.PD 0
+.IP \fB--serial-offset=\fIn\fR
+.PD
+Start the serial numbers in the stream at \fIn\fR instead of 1. Use this if you are splitting an indexing job up into several smaller ones, so that the streams can be concatenated into a single one with consistent numbering. This is important if you use \fBwhirligig\fR.
+
.SH HISTORICAL OPTIONS
.PD 0
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index e4851320..83927f94 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -831,7 +831,7 @@ static void try_status(struct sandbox *sb, time_t tNow)
void create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
int config_basename, FILE *fh,
- Stream *stream, const char *tempdir)
+ Stream *stream, const char *tempdir, int serial_offset)
{
int i;
struct sandbox *sb;
@@ -860,7 +860,7 @@ void create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
sb->t_last_stats = get_monotonic_seconds();
sb->n_proc = n_proc;
sb->iargs = iargs;
- sb->serial = 1;
+ sb->serial = serial_offset;
sb->fds = NULL;
sb->fhs = NULL;
diff --git a/src/im-sandbox.h b/src/im-sandbox.h
index b58e4b9e..f2ca0ce4 100644
--- a/src/im-sandbox.h
+++ b/src/im-sandbox.h
@@ -71,6 +71,6 @@ struct sb_shm
extern void create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
int config_basename, FILE *fh, Stream *stream,
- const char *tempdir);
+ const char *tempdir, int serial_offset);
#endif /* IM_SANDBOX_H */
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 2a3e6bec..3def4efa 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -174,6 +174,7 @@ static void show_help(const char *s)
" --copy-hdf5-field=<f> Copy the value of HDF5 field <f> into the stream\n"
" --no-peaks-in-stream Do not record peak search results in the stream\n"
" --no-refls-in-stream Do not record integrated reflections in the stream\n"
+" --serial-offset Start the serial numbers in the stream here\n"
"\nHistorical options:\n\n"
" --no-sat-corr Don't correct values of saturated peaks\n"
);
@@ -233,6 +234,7 @@ int main(int argc, char *argv[])
int if_peaks = 0;
int if_multi = 1;
int if_retry = 1;
+ int serial_offset = 1;
/* Defaults */
iargs.cell = NULL;
@@ -386,6 +388,7 @@ int main(int argc, char *argv[])
{"felix-num-voxels", 1, NULL, 41},
{"felix-test-fraction", 1, NULL, 42},
{"felix-sigma", 1, NULL, 43},
+ {"serial-offset", 1, NULL, 44},
{0, 0, NULL, 0}
};
@@ -688,6 +691,14 @@ int main(int argc, char *argv[])
}
break;
+ case 44:
+ if ( sscanf(optarg, "%i", &serial_offset) != 1 )
+ {
+ ERROR("Invalid value for --serial-offset\n");
+ return 1;
+ }
+ break;
+
case 0 :
break;
@@ -1002,7 +1013,7 @@ int main(int argc, char *argv[])
gsl_set_error_handler_off();
create_sandbox(&iargs, n_proc, prefix, config_basename, fh,
- st, tempdir);
+ st, tempdir, serial_offset);
free_imagefile_field_list(iargs.copyme);
cell_free(iargs.cell);