diff options
Diffstat (limited to 'libcrystfel/src/reflist.c')
-rw-r--r-- | libcrystfel/src/reflist.c | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/libcrystfel/src/reflist.c b/libcrystfel/src/reflist.c index 33c1f948..795894a1 100644 --- a/libcrystfel/src/reflist.c +++ b/libcrystfel/src/reflist.c @@ -75,10 +75,7 @@ struct _refldata { /* Location in image */ double fs; double ss; - - /* The distance from the exact Bragg position to the coordinates - * given above. */ - double excitation_error; + struct panel *panel; /* Non-zero if this reflection can be used for scaling */ int scalable; @@ -316,29 +313,31 @@ Reflection *next_found_refl(Reflection *refl) /********************************** Getters ***********************************/ + /** - * get_excitation_error: + * get_detector_pos: * @refl: A %Reflection + * @fs: Location at which to store the fast scan offset of the reflection + * @ss: Location at which to store the slow scan offset of the reflection * - * Returns: The excitation error for the reflection. **/ -double get_excitation_error(const Reflection *refl) +void get_detector_pos(const Reflection *refl, double *fs, double *ss) { - return refl->data.excitation_error; + *fs = refl->data.fs; + *ss = refl->data.ss; } /** - * get_detector_pos: + * get_panel: * @refl: A %Reflection - * @fs: Location at which to store the fast scan offset of the reflection - * @ss: Location at which to store the slow scan offset of the reflection + * + * Returns: the panel which the reflection appears on * **/ -void get_detector_pos(const Reflection *refl, double *fs, double *ss) +struct panel *get_panel(const Reflection *refl) { - *fs = refl->data.fs; - *ss = refl->data.ss; + return refl->data.panel; } @@ -570,20 +569,32 @@ void copy_data(Reflection *to, const Reflection *from) /** * set_detector_pos: * @refl: A %Reflection - * @exerr: The excitation error for this reflection * @fs: The fast scan offset of the reflection * @ss: The slow scan offset of the reflection * **/ -void set_detector_pos(Reflection *refl, double exerr, double fs, double ss) +void set_detector_pos(Reflection *refl, double fs, double ss) { - refl->data.excitation_error = exerr; refl->data.fs = fs; refl->data.ss = ss; } /** + * set_panel: + * @refl: A %Reflection + * @panel: Pointer to the panel structure on which the reflection appears + * + * Note that the pointer will be stored, not the contents of the structure. + * + **/ +void set_panel(Reflection *refl, struct panel *p) +{ + refl->data.panel = p; +} + + +/** * set_partial: * @refl: A %Reflection * @rlow: The "low" excitation error |