diff options
author | Thomas White <taw@physics.org> | 2024-10-01 10:36:09 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2024-10-01 10:36:09 +0200 |
commit | 5c358aaaf7e0fb2d7aae9c20e1923c4a8f07f0a8 (patch) | |
tree | 3b655541ed88721a34df1cd0e20f6aa4f023ca64 /src | |
parent | 62672df6a3bfaf40d7a056164fe24ada9cc3f206 (diff) |
partialator: Add filename/frame ID to --unmerged-output
Diffstat (limited to 'src')
-rw-r--r-- | src/merge.c | 6 | ||||
-rw-r--r-- | src/merge.h | 6 | ||||
-rw-r--r-- | src/partialator.c | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/merge.c b/src/merge.c index 4a2dae66..14935f9a 100644 --- a/src/merge.c +++ b/src/merge.c @@ -491,7 +491,10 @@ double log_residual(RefList *list, Crystal *cr, /* Has to match run_merge_job to be useful */ -void write_unmerged(const char *fn, struct crystal_refls *crystals, int n_crystals) +void write_unmerged(const char *fn, + struct crystal_refls *crystals, + struct image **images, + int n_crystals) { FILE *fh; int i; @@ -510,6 +513,7 @@ void write_unmerged(const char *fn, struct crystal_refls *crystals, int n_crysta UnitCell *cell; fprintf(fh, "Crystal %i\n", i); + fprintf(fh, "Filename: %s %s\n", images[i]->filename, images[i]->ev); if ( crystal_get_user_flag(crystals[i].cr) ) { fprintf(fh, "Flagged: yes\n"); } else { diff --git a/src/merge.h b/src/merge.h index e304db78..4453a2e1 100644 --- a/src/merge.h +++ b/src/merge.h @@ -35,6 +35,7 @@ #endif +#include "image.h" #include "crystal.h" #include "reflist.h" #include "geometry.h" @@ -59,6 +60,9 @@ extern double residual(RefList *list, Crystal *cr, const RefList *full, int free extern double log_residual(RefList *list, Crystal *cr, const RefList *full, int free, int *pn_used, const char *filename); -extern void write_unmerged(const char *fn, struct crystal_refls *crystals, int n_crystals); +extern void write_unmerged(const char *fn, + struct crystal_refls *crystals, + struct image **images, + int n_crystals); #endif /* MERGE */ diff --git a/src/partialator.c b/src/partialator.c index 7d3f19f6..93e78abb 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -1809,7 +1809,7 @@ int main(int argc, char *argv[]) } if ( unmerged_filename != NULL ) { - write_unmerged(unmerged_filename, crystals, n_crystals); + write_unmerged(unmerged_filename, crystals, images, n_crystals); } /* Write final figures of merit (no rejection any more) */ |