From ff74e26ef0dfb7f1584bce67a9d9abf48170eca4 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 12 Dec 2014 21:01:17 +0100 Subject: Fussiness --- libcrystfel/src/hdf5-file.c | 11 ++++++----- libcrystfel/src/hdf5-file.h | 2 +- src/indexamajig.c | 6 +++--- src/process_image.c | 2 +- src/process_image.h | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index 923d27ca..0d041e01 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -380,10 +380,9 @@ static int read_hdf5_data_into_buffer(struct hdfile *f, char *path, int line, int get_peaks(struct image *image, struct hdfile *f, const char *p, - int cxidb_format, struct filename_plus_event *fpe) + int cxi_format, struct filename_plus_event *fpe) { - - if ( cxidb_format ) { + if ( cxi_format ) { char *path_n; char *path_x; @@ -404,10 +403,12 @@ int get_peaks(struct image *image, struct hdfile *f, const char *p, path_y=malloc((strlen(p)+strlen("/peakYPosRaw")+1)*sizeof(char)); path_i=malloc((strlen(p)+strlen("/peakIntensity")+1)*sizeof(char)); - if ( fpe != NULL && fpe->ev != NULL && fpe->ev->dim_entries != NULL ) { + if ( (fpe != NULL) && (fpe->ev != NULL) + && (fpe->ev->dim_entries != NULL) ) + { line = fpe->ev->dim_entries[0]; } else { - ERROR("CXIDB peak list format selected," + ERROR("CXI format peak list format selected," "but file has no event structure"); free(path_n); free(path_x); diff --git a/libcrystfel/src/hdf5-file.h b/libcrystfel/src/hdf5-file.h index 93ef1d95..84b20798 100644 --- a/libcrystfel/src/hdf5-file.h +++ b/libcrystfel/src/hdf5-file.h @@ -80,7 +80,7 @@ extern int hdfile_is_scalar(struct hdfile *f, const char *name, int verbose); char *hdfile_get_string_value(struct hdfile *f, const char *name, struct event* ev); extern int get_peaks(struct image *image, struct hdfile *f, const char *p, - int cxidb_format, struct filename_plus_event *fpe); + int cxi_format, struct filename_plus_event *fpe); extern double get_value(struct hdfile *f, const char *name); extern double get_ev_based_value(struct hdfile *f, const char *name, diff --git a/src/indexamajig.c b/src/indexamajig.c index 6aeaaad5..e3daa1c9 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -99,7 +99,7 @@ static void show_help(const char *s) " hdf5 : Get from a table in HDF5 file.\n" " --hdf5-peaks=

Find peaks table in HDF5 file here.\n" " Default: /processing/hitfinder/peakinfo\n" -" --cxidb-hdf5-peaks Peaks in the HDF5 file are in CXIDB format.\n" +" --cxi-hdf5-peaks Peaks in the HDF5 file are in CXI file format.\n" " Only used in conjunction with the --hdf5-peaks,\n" " ignored otherwise." " --integration= Perform final pattern integration using .\n" @@ -219,7 +219,7 @@ int main(int argc, char *argv[]) iargs.beam = &beam; iargs.element = NULL; iargs.hdf5_peak_path = strdup("/processing/hitfinder/peakinfo"); - iargs.cxidb_hdf5_peaks = 0; + iargs.cxi_hdf5_peaks = 0; iargs.copyme = NULL; iargs.pk_inn = -1.0; iargs.pk_mid = -1.0; @@ -269,7 +269,7 @@ int main(int argc, char *argv[]) {"no-use-saturated", 0, &iargs.use_saturated, 0}, {"no-revalidate", 0, &iargs.no_revalidate, 1}, {"check-hdf5-snr", 0, &iargs.check_hdf5_snr, 1}, - {"cxidb-hdf5-peaks", 0, &iargs.cxidb_hdf5_peaks, 1}, + {"cxi-hdf5-peaks", 0, &iargs.cxi_hdf5_peaks, 1}, /* Long-only options which don't actually do anything */ {"no-sat-corr", 0, &iargs.satcorr, 0}, diff --git a/src/process_image.c b/src/process_image.c index 57bc9e3c..6ccd0c9a 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -180,7 +180,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, /* Get peaks from HDF5 */ if ( get_peaks(&image, hdfile, iargs->hdf5_peak_path, - iargs->cxidb_hdf5_peaks, pargs->filename_p_e) ) { + iargs->cxi_hdf5_peaks, pargs->filename_p_e) ) { ERROR("Failed to get peaks from HDF5 file.\n"); } if ( !iargs->no_revalidate ) { diff --git a/src/process_image.h b/src/process_image.h index 891553e6..8dba8a85 100644 --- a/src/process_image.h +++ b/src/process_image.h @@ -64,7 +64,7 @@ struct index_args struct beam_params *beam; char *element; char *hdf5_peak_path; - int cxidb_hdf5_peaks; + int cxi_hdf5_peaks; float pk_inn; float pk_mid; float pk_out; -- cgit v1.2.3