diff options
author | Thomas White <taw@physics.org> | 2011-03-16 18:23:48 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:20 +0100 |
commit | 86e621ad289638d7bf1440092cffd4c2ac64f982 (patch) | |
tree | 0abc051952d4d7d581bfe7b2d7403972ebd7327f /src/pattern_sim.c | |
parent | eaee0f6415b06f40ff7f477328f9f26f01c4d7ec (diff) |
Remove old reflections.h
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r-- | src/pattern_sim.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c index 6d3c07ab..ba760e32 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -29,9 +29,10 @@ #include "hdf5-file.h" #include "detector.h" #include "peaks.h" -#include "reflections.h" #include "beam-parameters.h" #include "symmetry.h" +#include "reflist.h" +#include "reflist-utils.h" static void show_help(const char *s) @@ -412,34 +413,29 @@ int main(int argc, char *argv[]) } else { - int i; - ReflItemList *items; + RefList *reflections; + + reflections = read_reflections(intfile); + free(intfile); if ( grad == GRADIENT_PHASED ) { - phases = new_list_phase(); + phases = phases_from_list(reflections); } else { phases = NULL; } - intensities = new_list_intensity(); - phases = new_list_phase(); - flags = new_list_flag(); - items = read_reflections(intfile, intensities, phases, - NULL, NULL); - free(intfile); - - for ( i=0; i<num_items(items); i++ ) { - struct refl_item *it = get_item(items, i); - set_flag(flags, it->h, it->k, it->l, 1); - } + intensities = intensities_from_list(reflections); + phases = phases_from_list(reflections); + flags = flags_from_list(reflections); /* Check that the intensities have the correct symmetry */ - if ( check_symmetry(items, sym) ) { + if ( check_list_symmetry(reflections, sym) ) { ERROR("The input reflection list does not appear to" " have symmetry %s\n", sym); return 1; } - delete_items(items); + reflist_free(reflections); + } image.det = get_detector_geometry(geometry); |