From 248ed621389889050e8fc01d508f50b09e914594 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:29:04 -0500 Subject: [PATCH] Reverting PR #1860 (#1915) --- CHANGELOG.rst | 2 -- drizzlepac/align.py | 13 ++++--------- .../acs/hrc/acs_hrc_alignment_all.json | 3 +-- .../acs/sbc/acs_sbc_alignment_all.json | 3 +-- .../acs/wfc/acs_wfc_alignment_all.json | 3 +-- .../wfc3/ir/wfc3_ir_alignment_all.json | 3 +-- .../wfc3/uvis/wfc3_uvis_alignment_all.json | 3 +-- .../wfpc2/pc/wfpc2_pc_alignment_all.json | 3 +-- 8 files changed, 10 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9fb956ce3..c6135a019 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -53,8 +53,6 @@ number of the code change for that issue. These PRs can be viewed at: - Addressed additional issures related to numpy 2.0 scalar promotion. [#1875] -- Added new header keywords and match requirements for relative fitting. [#1860] - - Update to HDRTABLE for MVM products to include SVM rootname and SVM creation date. [#1846] - Added python 3.12 to testing matrix for Jenkins and github actions. [#1843] diff --git a/drizzlepac/align.py b/drizzlepac/align.py index c2f26a3fa..84ba3b79a 100644 --- a/drizzlepac/align.py +++ b/drizzlepac/align.py @@ -986,16 +986,11 @@ def determine_fit_quality( # Execute checks nmatches_check = False - - if item.meta['fit method']!='relative': - required_nmatches = align_pars["run_align"]["mosaic_fitgeom_list"][fitgeom] - else: - required_nmatches = align_pars["run_align"]["mosaic_relgeom_list"][fitgeom] - - # If the number of matches is more than requirement set in configuration (json) files - # OR the fit RMS is higher --> fit is compromised below - if num_xmatches >= required_nmatches or (num_xmatches >= 2 and fit_rms_val > 0.5): + if num_xmatches >= align_pars["run_align"]["mosaic_fitgeom_list"][fitgeom] or ( + num_xmatches >= 2 and fit_rms_val > 0.5 + ): nmatches_check = True + radial_offset_check = False radial_offset = ( math.sqrt( diff --git a/drizzlepac/pars/hap_pars/svm_parameters/acs/hrc/acs_hrc_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/acs/hrc/acs_hrc_alignment_all.json index d4a3ac23b..85f94767f 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/acs/hrc/acs_hrc_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/acs/hrc/acs_hrc_alignment_all.json @@ -16,8 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6}, - "mosaic_relgeom_list": {"rshift": 20, "rscale": 10, "general": 9} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/drizzlepac/pars/hap_pars/svm_parameters/acs/sbc/acs_sbc_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/acs/sbc/acs_sbc_alignment_all.json index 9f000f667..87aee019f 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/acs/sbc/acs_sbc_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/acs/sbc/acs_sbc_alignment_all.json @@ -16,8 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6}, - "mosaic_relgeom_list": {"rshift": 20, "rscale": 10, "general": 9} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/drizzlepac/pars/hap_pars/svm_parameters/acs/wfc/acs_wfc_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/acs/wfc/acs_wfc_alignment_all.json index ff3ce38c4..6d5404776 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/acs/wfc/acs_wfc_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/acs/wfc/acs_wfc_alignment_all.json @@ -16,8 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6}, - "mosaic_relgeom_list": {"rshift":20, "rscale": 10, "general": 9} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/drizzlepac/pars/hap_pars/svm_parameters/wfc3/ir/wfc3_ir_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/wfc3/ir/wfc3_ir_alignment_all.json index f5f957086..9baa83646 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/wfc3/ir/wfc3_ir_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/wfc3/ir/wfc3_ir_alignment_all.json @@ -16,8 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6}, - "mosaic_relgeom_list": {"rshift":20, "rscale": 10, "general": 9} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/drizzlepac/pars/hap_pars/svm_parameters/wfc3/uvis/wfc3_uvis_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/wfc3/uvis/wfc3_uvis_alignment_all.json index 4db568684..cb146be44 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/wfc3/uvis/wfc3_uvis_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/wfc3/uvis/wfc3_uvis_alignment_all.json @@ -16,8 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6}, - "mosaic_relgeom_list": {"rshift":20, "rscale": 10, "general": 9} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": { diff --git a/drizzlepac/pars/hap_pars/svm_parameters/wfpc2/pc/wfpc2_pc_alignment_all.json b/drizzlepac/pars/hap_pars/svm_parameters/wfpc2/pc/wfpc2_pc_alignment_all.json index 5a4354164..4c0bd903c 100644 --- a/drizzlepac/pars/hap_pars/svm_parameters/wfpc2/pc/wfpc2_pc_alignment_all.json +++ b/drizzlepac/pars/hap_pars/svm_parameters/wfpc2/pc/wfpc2_pc_alignment_all.json @@ -16,8 +16,7 @@ "MAX_FIT_LIMIT": 150, "mosaic_catalog_list": ["GAIAeDR3", "GSC242", "2MASS"], "mosaic_fit_list": ["match_relative_fit", "match_2dhist_fit", "match_default_fit"], - "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6}, - "mosaic_relgeom_list": {"rshift":20, "rscale": 10, "general": 9} + "mosaic_fitgeom_list": {"rshift": 4, "rscale": 10, "general": 6} }, "generate_source_catalogs": {