aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2013-02-06 20:07:56 +0100
committerThomas White <taw@bitwiz.org.uk>2013-02-06 20:07:56 +0100
commita1ee07e0887bd23491218301ad440a4ad2efb24f (patch)
tree855fcfa420bb3a7809773f8df41152d82f91dcf7 /libcrystfel/src
parent53382f60c7f8955c016725885c04f510f7fe96ee (diff)
Stuff
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/crystal.c18
-rw-r--r--libcrystfel/src/crystal.h2
-rw-r--r--libcrystfel/src/dirax.c2
3 files changed, 15 insertions, 7 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;
+}
diff --git a/libcrystfel/src/crystal.h b/libcrystfel/src/crystal.h
index f7c49a81..3d0ad9d1 100644
--- a/libcrystfel/src/crystal.h
+++ b/libcrystfel/src/crystal.h
@@ -58,6 +58,7 @@ extern long long int crystal_get_num_saturated_reflections(Crystal *cryst);
extern int crystal_get_user_flag(Crystal *cryst);
extern double crystal_get_osf(Crystal *cryst);
extern struct image *crystal_get_image(Crystal *cryst);
+extern double crystal_get_mosaicity(Crystal *cryst);
extern void crystal_set_cell(Crystal *cryst, UnitCell *cell);
extern void crystal_set_profile_radius(Crystal *cryst, double r);
@@ -68,5 +69,6 @@ extern void crystal_set_num_saturated_reflections(Crystal *cryst,
extern void crystal_set_user_flag(Crystal *cryst, int flag);
extern void crystal_set_osf(Crystal *cryst, double osf);
extern void crystal_set_image(Crystal *cryst, struct image *image);
+extern void crystal_set_mosaicity(Crystal *cryst, double m);
#endif /* CRYSTAL_H */
diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c
index 6fbb9663..2cbb0ec1 100644
--- a/libcrystfel/src/dirax.c
+++ b/libcrystfel/src/dirax.c
@@ -140,8 +140,6 @@ static int check_cell(struct dirax_private *dp, struct image *image,
image_add_crystal(image, cr);
- cell_free(out); /* Crystal makes its own copy */
-
return 1;
}