diff options
author | Valerio Mariani <valerio.mariani@desy.de> | 2016-10-07 15:46:29 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2016-10-10 15:21:56 +0200 |
commit | 4f17116d29759077a02d80fd410965f848ffc05f (patch) | |
tree | ba4243f7c2a8ec91cd0350841fc882accb61b4ef /libcrystfel/src/crystal.c | |
parent | 34198e6f92f19dfeb0ee13c0fcc60c82b05f85e3 (diff) |
Added detector shift to crystal structure, wrote get and get functions
Diffstat (limited to 'libcrystfel/src/crystal.c')
-rw-r--r-- | libcrystfel/src/crystal.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libcrystfel/src/crystal.c b/libcrystfel/src/crystal.c index dc2b28fb..116b6bce 100644 --- a/libcrystfel/src/crystal.c +++ b/libcrystfel/src/crystal.c @@ -72,6 +72,10 @@ struct _crystal /* Text notes, which go in the stream */ char *notes; + + /* Detector shift */ + double det_shift_x; + double det_shift_y; }; @@ -100,6 +104,8 @@ Crystal *crystal_new() cryst->n_implausible = 0; cryst->notes = NULL; cryst->user_flag = 0; + cryst->det_shift_x = 0; + cryst->det_shift_y = 0; return cryst; } @@ -219,6 +225,15 @@ const char *crystal_get_notes(Crystal *cryst) } +void crystal_get_det_shift(Crystal *cryst, double* shift_x, + double *shift_y) +{ + *shift_x = cryst->det_shift_x; + *shift_y = cryst->det_shift_y; +} + + + /********************************** Setters ***********************************/ @@ -318,3 +333,10 @@ void crystal_add_notes(Crystal *cryst, const char *notes_add) free(cryst->notes); cryst->notes = nnotes; } + + +void crystal_set_det_shift(Crystal *cryst, double shift_x, double shift_y) +{ + cryst->det_shift_x = shift_x; + cryst->det_shift_y = shift_y; +} |