aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-02-09 15:08:03 +0100
committerThomas White <taw@physics.org>2010-02-09 15:08:03 +0100
commit89bd4cc23c5ac40dd0060d362f663819a5f4ae22 (patch)
treecc5c5813f1d6acbbb1e8cfc728da02050e061404
parenta122cc94e01bbfb34243d9db5268284a23aed116 (diff)
Add resolution to reflection lists
-rw-r--r--src/process_hkl.c5
-rw-r--r--src/reflections.c7
2 files changed, 7 insertions, 5 deletions
diff --git a/src/process_hkl.c b/src/process_hkl.c
index 0d09ad3f..89d79a78 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -258,10 +258,9 @@ int main(int argc, char *argv[])
ref = new_list_intensity();
counts = new_list_count();
+ mol = load_molecule();
if ( !config_noanalyse ) {
- mol = load_molecule();
get_reflections_cached(mol, eV_to_J(2.0e3));
-
trueref = ideal_intensities(mol->reflections);
}
@@ -328,7 +327,7 @@ int main(int argc, char *argv[])
}
if ( output != NULL ) {
- write_reflections(output, counts, ref, 0, NULL);
+ write_reflections(output, counts, ref, 0, mol->cell);
}
STATUS("There were %u patterns.\n", n_patterns);
diff --git a/src/reflections.c b/src/reflections.c
index 4379e25f..88b2ab59 100644
--- a/src/reflections.c
+++ b/src/reflections.c
@@ -53,7 +53,7 @@ void write_reflections(const char *filename, unsigned int *counts,
for ( l=-INDMAX; l<INDMAX; l++ ) {
int N;
- double F;
+ double F, s;
if ( counts ) {
N = lookup_count(counts, h, k, l);
@@ -65,7 +65,10 @@ void write_reflections(const char *filename, unsigned int *counts,
F = lookup_intensity(ref, h, k, l) / N;
if ( zone_axis && (l != 0) ) continue;
- fprintf(fh, "%3i %3i %3i %f\n", h, k, l, F);
+ s = resolution(cell, h, k, l);
+
+ /* h, k, l, I, sigma(I), s */
+ fprintf(fh, "%3i %3i %3i %f %f %f\n", h, k, l, F, 0.0, s/1.0e9);
}
}