aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2020-11-01 18:23:58 -0600
committertlatorre <tlatorre@uchicago.edu>2020-11-01 18:23:58 -0600
commit220377d85d8cf71d37a47b160ff71bdfadce8f38 (patch)
tree569d447e2bd38cb27942024af7fb9dda51a41cbd
parent9948d77579a23fc59f6a95ace7c3862fcccbdf93 (diff)
downloadsddm-220377d85d8cf71d37a47b160ff71bdfadce8f38.tar.gz
sddm-220377d85d8cf71d37a47b160ff71bdfadce8f38.tar.bz2
sddm-220377d85d8cf71d37a47b160ff71bdfadce8f38.zip
update cat-grid-jobs to reprocess all zdabs
-rwxr-xr-xutils/cat-grid-jobs7
1 files changed, 6 insertions, 1 deletions
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