diff options
author | Thomas White <taw@physics.org> | 2015-02-20 14:09:22 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-02-20 14:09:22 +0100 |
commit | 6ad20e4d35878c7fccc5bf765c2f33f1117e3c4d (patch) | |
tree | 7cd0aa4591d0875887466525f51e070588c00258 /src | |
parent | d75aa0efaf30562d42999b78b040e024bc9bc80c (diff) |
indexamajig: Intelligently set default peak path
Diffstat (limited to 'src')
-rw-r--r-- | src/indexamajig.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index 627dfa67..e9f3d3d3 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -216,7 +216,7 @@ int main(int argc, char *argv[]) iargs.det = NULL; iargs.peaks = PEAK_ZAEF; iargs.beam = &beam; - iargs.hdf5_peak_path = strdup("/processing/hitfinder/peakinfo"); + iargs.hdf5_peak_path = NULL; iargs.copyme = NULL; iargs.pk_inn = -1.0; iargs.pk_mid = -1.0; @@ -517,6 +517,15 @@ int main(int argc, char *argv[]) } free(speaks); + /* Set default path for peaks, if appropriate */ + if ( iargs.hdf5_peak_path == NULL ) { + if ( iargs.peaks == PEAK_HDF5 ) { + iargs.hdf5_peak_path = strdup("/processing/hitfinder/peakinfo"); + } else if ( iargs.peaks == PEAK_CXI ) { + iargs.hdf5_peak_path = strdup("/entry_1/result_1"); + } + } + if ( prefix == NULL ) { prefix = strdup(""); } else { |