diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-02-06 20:07:56 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-02-06 20:07:56 +0100 |
commit | a1ee07e0887bd23491218301ad440a4ad2efb24f (patch) | |
tree | 855fcfa420bb3a7809773f8df41152d82f91dcf7 /libcrystfel/src/crystal.c | |
parent | 53382f60c7f8955c016725885c04f510f7fe96ee (diff) |
Stuff
Diffstat (limited to 'libcrystfel/src/crystal.c')
-rw-r--r-- | libcrystfel/src/crystal.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/libcrystfel/src/crystal.c b/libcrystfel/src/crystal.c index 6ff251e0..664d933e 100644 --- a/libcrystfel/src/crystal.c +++ b/libcrystfel/src/crystal.c @@ -106,8 +106,6 @@ Crystal *crystal_new() void crystal_free(Crystal *cryst) { if ( cryst == NULL ) return; - if ( cryst->cell != NULL ) cell_free(cryst->cell); - if ( cryst->reflections != NULL ) reflist_free(cryst->reflections); free(cryst); } @@ -163,13 +161,18 @@ int crystal_get_user_flag(Crystal *cryst) } +double crystal_get_mosaicity(Crystal *cryst) +{ + return cryst->m; +} + + /********************************** Setters ***********************************/ void crystal_set_cell(Crystal *cryst, UnitCell *cell) { - if ( cryst->cell != NULL ) cell_free(cryst->cell); - cryst->cell = cell_new_from_cell(cell); + cryst->cell = cell; } @@ -181,7 +184,6 @@ void crystal_set_profile_radius(Crystal *cryst, double r) void crystal_set_reflections(Crystal *cryst, RefList *reflist) { - if ( cryst->reflections != NULL ) reflist_free(reflist); cryst->reflections = reflist; } @@ -214,3 +216,9 @@ void crystal_set_user_flag(Crystal *cryst, int user_flag) { cryst->user_flag = user_flag; } + + +void crystal_set_mosaicity(Crystal *cryst, double m) +{ + cryst->m = m; +} |