From 65b588b53bd0a5b1cc7fec03d3cbb25103b81a29 Mon Sep 17 00:00:00 2001 From: Leindert Boogaard Date: Thu, 24 Nov 2022 10:43:22 +0100 Subject: [PATCH 1/4] open reference files in readonly mode --- grizli/prep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grizli/prep.py b/grizli/prep.py index cde8a72e..2db4cc7c 100644 --- a/grizli/prep.py +++ b/grizli/prep.py @@ -6224,7 +6224,7 @@ def get_jwst_wfssbkg_file(file, valid_flat=[0.6, 1.3], make_figure=False): flat_file = FlatFieldStep().get_reference_file(file, 'flat') - wf = pyfits.open(bkg_file, mode='update') + wf = pyfits.open(bkg_file)#, mode='update') key = f"{wf[0].header['FILTER']} {wf[0].header['PUPIL']}" if 'FIXFLAT' in wf[0].header: From 1869740426ec58e7345dee7d951c73eb8cabc50b Mon Sep 17 00:00:00 2001 From: Leindert Boogaard Date: Fri, 18 Nov 2022 15:32:43 +0100 Subject: [PATCH 2/4] skip hdr copy for band to avoid verification error --- grizli/pipeline/auto_script.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grizli/pipeline/auto_script.py b/grizli/pipeline/auto_script.py index 2d21ddb0..e7c8c33e 100644 --- a/grizli/pipeline/auto_script.py +++ b/grizli/pipeline/auto_script.py @@ -4572,7 +4572,8 @@ def make_filter_combinations(root, weight_fnu=2, filter_combinations=FILTER_COMB head[band] = im_i[0].header.copy() else: for k in im_i[0].header: - head[band][k] = im_i[0].header[k] + #head[band][k] = im_i[0].header[k] + pass for k in ref_h_i: head[band][k] = ref_h_i[k] From 6a2230891b7873f59a04ea94d85bf557b5cd214e Mon Sep 17 00:00:00 2001 From: Leindert Boogaard Date: Fri, 18 Nov 2022 15:33:17 +0100 Subject: [PATCH 3/4] Fix typo in niriss -clear --- grizli/pipeline/auto_script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grizli/pipeline/auto_script.py b/grizli/pipeline/auto_script.py index e7c8c33e..828d1225 100644 --- a/grizli/pipeline/auto_script.py +++ b/grizli/pipeline/auto_script.py @@ -3073,7 +3073,7 @@ def load_GroupFLT(field_root='j142724+334246', PREP_PATH='../Prep', force_ref=No for filt in ['F090W', 'F115W', 'F150W', 'F200W']: #key = f'{gr.lower()}-{filt.lower()}' # key = filt.lower() - key = filt.lower() + 'n-clear' + key = filt.lower() + '-clear' if key in masks: masks[key][0] |= ((info['PUPIL'] == filt) & From cc42960e0e829f0e3230ce992be8d392e1f5e419 Mon Sep 17 00:00:00 2001 From: Leindert Boogaard Date: Fri, 1 Dec 2023 15:14:19 +0100 Subject: [PATCH 4/4] skip offending header keywords --- grizli/pipeline/auto_script.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/grizli/pipeline/auto_script.py b/grizli/pipeline/auto_script.py index 828d1225..c6ebe734 100644 --- a/grizli/pipeline/auto_script.py +++ b/grizli/pipeline/auto_script.py @@ -4572,8 +4572,7 @@ def make_filter_combinations(root, weight_fnu=2, filter_combinations=FILTER_COMB head[band] = im_i[0].header.copy() else: for k in im_i[0].header: - #head[band][k] = im_i[0].header[k] - pass + if k == '' or k == 'HISTORY': continue for k in ref_h_i: head[band][k] = ref_h_i[k]