aboutsummaryrefslogtreecommitdiff
path: root/src/process_image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-03-31 16:27:13 +0200
committerThomas White <taw@physics.org>2017-03-31 16:30:13 +0200
commit3746b4dbed15569764ec6de473806468951748b8 (patch)
tree6539282693783345105809166fa58fc9b25cb943 /src/process_image.c
parent10fd97e6f88bd4d28ffc2bff56aa5ff19ca436ae (diff)
Offset peak locations from HDF5 or CXI files by 0.5,0.5
CrystFEL considers all peak locations to be distances from the corner of the detector panel, in pixel units, consistent with its description of detector geometry. In contrast, Cheetah considers the peak locations to be pixel indices in the data array. Therefore, a half-pixel offset is needed when importing the peak lists. For users who need the old behaviour, this commit adds a new option indexamajig --no-half-pixel-shift to deactivate this offset.
Diffstat (limited to 'src/process_image.c')
-rw-r--r--src/process_image.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/process_image.c b/src/process_image.c
index e6e6d22a..cd5c0866 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -160,7 +160,9 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
switch ( iargs->peaks ) {
case PEAK_HDF5:
- if ( get_peaks(&image, hdfile, iargs->hdf5_peak_path) ) {
+ if ( get_peaks_2(&image, hdfile, iargs->hdf5_peak_path,
+ iargs->half_pixel_shift) )
+ {
ERROR("Failed to get peaks from HDF5 file.\n");
}
if ( !iargs->no_revalidate ) {
@@ -172,8 +174,10 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
break;
case PEAK_CXI:
- if ( get_peaks_cxi(&image, hdfile, iargs->hdf5_peak_path,
- pargs->filename_p_e) ) {
+ if ( get_peaks_cxi_2(&image, hdfile, iargs->hdf5_peak_path,
+ pargs->filename_p_e,
+ iargs->half_pixel_shift) )
+ {
ERROR("Failed to get peaks from CXI file.\n");
}
if ( !iargs->no_revalidate ) {