From 6b889daf0d737c7c921ba80818b0b008e4de86af Mon Sep 17 00:00:00 2001 From: Valerio Mariani Date: Mon, 31 Mar 2014 10:26:40 +0200 Subject: orig_minxx and orig_maxss are initialized when geometry is loaded as opposed to when the image is loaded --- libcrystfel/src/detector.c | 5 +++++ libcrystfel/src/hdf5-file.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index 7ceaddbd..2ccf6a75 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -1060,6 +1060,11 @@ struct detector *get_detector_geometry(const char *filename) max_ss = det->panels[i].max_ss; } + det->panels[i].orig_max_fs = det->panels[i].max_fs; + det->panels[i].orig_min_fs = det->panels[i].min_fs; + det->panels[i].orig_max_ss = det->panels[i].max_ss; + det->panels[i].orig_min_ss = det->panels[i].min_ss; + } for ( i=0; in_bad; i++ ) { diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index 333e1fff..fa5c127d 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -911,11 +911,6 @@ int hdf5_read2(struct hdfile *f, struct image *image, const char* element, int s struct panel *p; p=&image->det->panels[pi]; - if ( p->orig_min_fs == -1 ) p->orig_min_fs = p->min_fs; - if ( p->orig_max_fs == -1 ) p->orig_max_fs = p->max_fs; - if ( p->orig_min_ss == -1 ) p->orig_min_ss = p->min_ss; - if ( p->orig_max_ss == -1 ) p->orig_max_ss = p->max_ss; - if ( override_data_and_mask ) { fail = hdfile_set_image(f, element); } else { -- cgit v1.2.3