aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/crystal.c17
-rw-r--r--libcrystfel/src/crystal.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/libcrystfel/src/crystal.c b/libcrystfel/src/crystal.c
index e1ad5dfe..91c3fd52 100644
--- a/libcrystfel/src/crystal.c
+++ b/libcrystfel/src/crystal.c
@@ -69,6 +69,9 @@ struct _crystal
/* User flag, e.g. for "this is a bad crystal". */
int user_flag;
+
+ /* Text notes, which go in the stream */
+ char *notes;
};
@@ -95,6 +98,7 @@ Crystal *crystal_new()
cryst->resolution_limit = 0.0;
cryst->n_saturated = 0;
cryst->n_implausible = 0;
+ cryst->notes = NULL;
return cryst;
}
@@ -207,6 +211,12 @@ double crystal_get_mosaicity(Crystal *cryst)
}
+const char *crystal_get_notes(Crystal *cryst)
+{
+ return cryst->notes;
+}
+
+
/********************************** Setters ***********************************/
@@ -274,3 +284,10 @@ void crystal_set_mosaicity(Crystal *cryst, double m)
{
cryst->m = m;
}
+
+
+void crystal_set_notes(Crystal *cryst, const char *notes)
+{
+ free(cryst->notes); /* free(NULL) is OK */
+ cryst->notes = strdup(notes);
+}
diff --git a/libcrystfel/src/crystal.h b/libcrystfel/src/crystal.h
index 6863f666..92f60fc3 100644
--- a/libcrystfel/src/crystal.h
+++ b/libcrystfel/src/crystal.h
@@ -65,6 +65,7 @@ extern double crystal_get_osf(Crystal *cryst);
extern double crystal_get_Bfac(Crystal *cryst);
extern struct image *crystal_get_image(Crystal *cryst);
extern double crystal_get_mosaicity(Crystal *cryst);
+extern const char *crystal_get_notes(Crystal *cryst);
extern void crystal_set_cell(Crystal *cryst, UnitCell *cell);
extern void crystal_set_profile_radius(Crystal *cryst, double r);
@@ -79,6 +80,7 @@ extern void crystal_set_osf(Crystal *cryst, double osf);
extern void crystal_set_Bfac(Crystal *cryst, double B);
extern void crystal_set_image(Crystal *cryst, struct image *image);
extern void crystal_set_mosaicity(Crystal *cryst, double m);
+extern void crystal_set_notes(Crystal *cryst, const char *notes);
#ifdef __cplusplus
}