From 6196e1301726a9b20a92307cdee89f21e8028bad Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:22:15 -0500 Subject: [PATCH] Revert "updated configuration files and use of those values in align.py for relative fits." This reverts commit 758925579674b36c9ab54988eb92bd01c780c529. --- 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 +-- 7 files changed, 10 insertions(+), 21 deletions(-) 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": {