diff options
-rw-r--r-- | doc/man/indexamajig.1 | 4 | ||||
-rw-r--r-- | libcrystfel/meson.build | 22 | ||||
-rw-r--r-- | meson.build | 20 | ||||
-rw-r--r-- | src/indexamajig.c | 8 | ||||
-rw-r--r-- | src/process_image.c | 10 |
5 files changed, 35 insertions, 29 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1 index b8fed6d4..a9d80175 100644 --- a/doc/man/indexamajig.1 +++ b/doc/man/indexamajig.1 @@ -336,7 +336,7 @@ Normally, peaks which contain one or more pixels above max_adu (defined in the d .PD 0 .IP \fB--no-revalidate\fR .PD -When using \fB--peaks=hdf5\fR or \fB--peaks=cxi\fR, the peaks will be put through some of the same checks as if you were using \fB--peaks=zaef\fR. These checks reject peaks which are too close to panel edges, are saturated (unless you use \fB--use-saturated\fR), have other nearby peaks (closer than twice the inner integration radius, see \fB--int-radius\fR), or have any part in a bad region. Using this option skips this validation step, and uses the peaks directly. +When using \fB--peaks=hdf5\fR, \fB--peaks=cxi\fR or \fB--peaks=msgpack\fR, the peaks will be put through some of the same checks as if you were using \fB--peaks=zaef\fR. These checks reject peaks which are too close to panel edges, are saturated (unless you use \fB--use-saturated\fR), have other nearby peaks (closer than twice the inner integration radius, see \fB--int-radius\fR), or have any part in a bad region. Using this option skips this validation step, and uses the peaks directly. .PD 0 .IP \fB--no-half-pixel-shift\fR @@ -346,7 +346,7 @@ CrystFEL considers all peak locations to be distances from the corner of the det .PD 0 .IP \fB--check-hdf5-snr\fR .PD -With this option with \fB--peaks=hdf5\fR, the peaks will additionally be checked to see that they satisfy the minimum SNR specified with \fB--min-snr\fR. +With this option with \fB--peaks=hdf5\fR (or \fBcxi\fR or \fBmsgpack\fR), the peaks will additionally be checked to see that they satisfy the minimum SNR specified with \fB--min-snr\fR. .SH INDEXING OPTIONS .PD 0 diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build index d333d554..b5005aa5 100644 --- a/libcrystfel/meson.build +++ b/libcrystfel/meson.build @@ -5,7 +5,7 @@ if zlibdep.found() if cc.has_function('gzbuffer', prefix: '#include <zlib.h>', dependencies: zlibdep) - conf_data.set10('HAVE_GZBUFFER', 1) + conf_data.set10('HAVE_GZBUFFER', true) endif else zlibproj = subproject('zlib') @@ -13,49 +13,49 @@ else # Cannot check for gzbuffer in this case, because Zlib won't be built # until compile time. However, we already know that the wrap version is # new enough - conf_data.set10('HAVE_GZBUFFER', 1) + conf_data.set10('HAVE_GZBUFFER', true) endif if zlibdep.found() - conf_data.set10('HAVE_ZLIB', 1) + conf_data.set10('HAVE_ZLIB', true) endif fftwdep = dependency('fftw3', required: false) if fftwdep.found() - conf_data.set10('HAVE_FFTW', 1) + conf_data.set10('HAVE_FFTW', true) endif xgandalfdep = dependency('xgandalf', required: false, fallback: ['xgandalf', 'xgandalf_dep']) if xgandalfdep.found() - conf_data.set10('HAVE_XGANDALF', 1) + conf_data.set10('HAVE_XGANDALF', true) endif pinkindexerdep = dependency('pinkIndexer', required: false, fallback: ['pinkindexer', 'pinkindexer_dep']) if pinkindexerdep.found() - conf_data.set10('HAVE_PINKINDEXER', 1) + conf_data.set10('HAVE_PINKINDEXER', true) endif fdipdep = dependency('fdip', required: false, fallback: ['fdip', 'fdip_dep']) if fdipdep.found() - conf_data.set10('HAVE_FDIP', 1) + conf_data.set10('HAVE_FDIP', true) endif ccp4dep = dependency('libccp4c', required: false, fallback: ['libccp4c', 'libccp4c_dep']) if ccp4dep.found() - conf_data.set10('HAVE_LIBCCP4', 1) + conf_data.set10('HAVE_LIBCCP4', true) endif msgpackdep = dependency('msgpack', required: false) if msgpackdep.found() - conf_data.set10('HAVE_MSGPACK', 1) + conf_data.set10('HAVE_MSGPACK', true) endif @@ -68,9 +68,9 @@ libcrystfel_includes = include_directories('src') # Find forkpty() utildep = cc.find_library('util', required: true) if cc.has_function('forkpty', dependencies: utildep, prefix: '#include <pty.h>') - conf_data.set10('HAVE_FORKPTY_PTY_H', 1) + conf_data.set10('HAVE_FORKPTY_PTY_H', true) elif cc.has_function('forkpty', dependencies: utildep, prefix: '#include <util.h>') - conf_data.set10('HAVE_FORKPTY_UTIL_H', 1) + conf_data.set10('HAVE_FORKPTY_UTIL_H', true) else error('Couldn\'t find forkpty()') endif diff --git a/meson.build b/meson.build index d7b04aae..be0f6477 100644 --- a/meson.build +++ b/meson.build @@ -24,7 +24,7 @@ pthreaddep = dependency('threads', required: true) # Find HDF5 using inbuilt Meson methods. Requires Meson >= 0.50.0 hdf5dep = dependency('hdf5', language: 'c', required: get_option('hdf5')) if hdf5dep.found() - conf_data.set10('HAVE_HDF5', 1) + conf_data.set10('HAVE_HDF5', true) # Request HDF5 1.10-style API add_project_arguments('-DH5_USE_110_API', language: 'c') add_project_arguments('-DH5O_GET_INFO_BY_IDX1', language: 'c') @@ -32,45 +32,45 @@ endif fftwdep = dependency('fftw3', required: false) if fftwdep.found() - conf_data.set10('HAVE_FFTW', 1) + conf_data.set10('HAVE_FFTW', true) endif gtkdep = dependency('gtk+-3.0', required: false) if gtkdep.found() add_project_arguments('-Wno-deprecated-declarations', language: 'c') - conf_data.set10('HAVE_GTK', 1) + conf_data.set10('HAVE_GTK', true) endif gdkdep = dependency('gdk-3.0', required: false) if gdkdep.found() - conf_data.set10('HAVE_GDK', 1) + conf_data.set10('HAVE_GDK', true) endif gdkpixbufdep = dependency('gdk-pixbuf-2.0', required: false) if gdkpixbufdep.found() - conf_data.set10('HAVE_GDKPIXBUF', 1) + conf_data.set10('HAVE_GDKPIXBUF', true) endif cairodep = dependency('cairo', required: false) if cairodep.found() - conf_data.set10('HAVE_CAIRO', 1) + conf_data.set10('HAVE_CAIRO', true) endif opencldep = dependency('OpenCL', required: get_option('opencl')) if opencldep.found() - conf_data.set10('HAVE_OPENCL', 1) + conf_data.set10('HAVE_OPENCL', true) if cc.has_header('CL/cl.h', dependencies: opencldep) - conf_data.set10('HAVE_CL_CL_H', 1) + conf_data.set10('HAVE_CL_CL_H', true) endif endif zmqdep = dependency('libzmq', required: false) if zmqdep.found() - conf_data.set10('HAVE_ZMQ', 1) + conf_data.set10('HAVE_ZMQ', true) endif if cc.has_function('clock_gettime', prefix: '#include <time.h>') - conf_data.set10('HAVE_CLOCK_GETTIME', 1) + conf_data.set10('HAVE_CLOCK_GETTIME', true) endif # ************************ libcrystfel (subdir) ************************ diff --git a/src/indexamajig.c b/src/indexamajig.c index 75c7a2d5..fc22a562 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -229,7 +229,7 @@ static void write_harvest_file(struct index_args *args, fprintf(fh, " },\n"); if ( args->ipriv == NULL ) { - fprintf(fh, " \"indexing\": null\n"); + fprintf(fh, " \"indexing\": null,\n"); fprintf(fh, " \"integration\": null\n"); } else { @@ -970,11 +970,11 @@ int main(int argc, char *argv[]) "highest pixel and neighbours (peakfinder9 only, just for speed)"}, {"no-use-saturated", 318, NULL, OPTION_NO_USAGE, "Reject saturated peaks"}, {"no-revalidate", 319, NULL, OPTION_NO_USAGE, "Don't re-integrate and check HDF5 " - "peaks"}, + "or MsgPack peaks"}, {"no-half-pixel-shift", 320, NULL, OPTION_NO_USAGE, "Don't offset HDF5 peak " "locations by 0.5 pixels"}, - {"check-hdf5-snr", 321, NULL, OPTION_NO_USAGE, "Check SNR for peaks from HDF5 or " - "CXI (see --min-snr)"}, + {"check-hdf5-snr", 321, NULL, OPTION_NO_USAGE, "Check SNR for peaks from HDF5, " + "CXI or MsgPack (see --min-snr)"}, {NULL, 0, 0, OPTION_DOC, "Indexing options:", 4}, {"indexing", 400, "method", 0, "List of indexing methods"}, diff --git a/src/process_image.c b/src/process_image.c index 5282e135..9151528d 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -3,11 +3,11 @@ * * The processing pipeline for one image * - * Copyright © 2012-2021 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2012-2022 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * * Authors: - * 2010-2020 Thomas White <taw@physics.org> + * 2010-2022 Thomas White <taw@physics.org> * 2014-2017 Valerio Mariani <valerio.mariani@desy.de> * 2017 Stijn de Graaf * @@ -319,6 +319,12 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, pargs->zmq_data, pargs->zmq_data_size, iargs->half_pixel_shift); + if ( !iargs->no_revalidate ) { + validate_peaks(image, iargs->min_snr, + iargs->pk_inn, iargs->pk_mid, + iargs->pk_out, iargs->use_saturated, + iargs->check_hdf5_snr); + } break; case PEAK_NONE: |