From 220377d85d8cf71d37a47b160ff71bdfadce8f38 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Sun, 1 Nov 2020 18:23:58 -0600 Subject: update cat-grid-jobs to reprocess all zdabs --- utils/cat-grid-jobs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/cat-grid-jobs b/utils/cat-grid-jobs index 8f53be1..d64fab2 100755 --- a/utils/cat-grid-jobs +++ b/utils/cat-grid-jobs @@ -103,7 +103,9 @@ def cat_grid_jobs(conn, output_dir, zdab_dir=None): total_fits += f['fits'].shape[0] with h5py.File(output,'r') as fout: - if 'reprocessed' in filename and 'reprocessed' not in fout.attrs: + if 'version' not in fout.attrs or fout.attrs['version'] < 2: + pass + elif 'reprocessed' in filename and 'reprocessed' not in fout.attrs: pass elif 'fits' in fout and fout['fits'].shape[0] >= total_fits: log.verbose("skipping %s because there are already %i fit results" % (tail,total_fits)) @@ -132,6 +134,9 @@ def cat_grid_jobs(conn, output_dir, zdab_dir=None): total_fits = 0 with h5py.File(output,"a") as fout: + # Mark a version in case we need to reprocess all the files + fout.attrs['version'] = 2 + # Mark the file as being reprocessed so we know in the future if we # already used the reprocessed version instead of the reduced # version -- cgit