From 625be83b392c6be4dad876789429dc24e6c20182 Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 20 Nov 2024 17:27:40 -0500 Subject: [PATCH] rename SourceDetection to SourceCatalog --- src/roman_datamodels/maker_utils/_common_meta.py | 8 ++++---- src/roman_datamodels/maker_utils/_tagged_nodes.py | 8 ++++---- tests/test_models.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/roman_datamodels/maker_utils/_common_meta.py b/src/roman_datamodels/maker_utils/_common_meta.py index f7f361f3..62e80155 100644 --- a/src/roman_datamodels/maker_utils/_common_meta.py +++ b/src/roman_datamodels/maker_utils/_common_meta.py @@ -10,7 +10,7 @@ from ._base import NONUM, NOSTR from ._basic_meta import mk_basic_meta -from ._tagged_nodes import mk_cal_logs, mk_photometry, mk_resample, mk_source_detection +from ._tagged_nodes import mk_cal_logs, mk_photometry, mk_resample, mk_source_catalog def mk_exposure(**kwargs): @@ -301,7 +301,7 @@ def mk_l2_cal_step(**kwargs): l2calstep["linearity"] = kwargs.get("linearity", "INCOMPLETE") l2calstep["outlier_detection"] = kwargs.get("outlier_detection", "INCOMPLETE") l2calstep["photom"] = kwargs.get("photom", "INCOMPLETE") - l2calstep["source_detection"] = kwargs.get("source_detection", "INCOMPLETE") + l2calstep["source_catalog"] = kwargs.get("source_catalog", "INCOMPLETE") l2calstep["ramp_fit"] = kwargs.get("ramp_fit", "INCOMPLETE") l2calstep["refpix"] = kwargs.get("refpix", "INCOMPLETE") l2calstep["saturation"] = kwargs.get("saturation", "INCOMPLETE") @@ -441,7 +441,7 @@ def mk_l2_meta(**kwargs): meta["photometry"] = mk_photometry(**kwargs.get("photometry", {})) meta["outlier_detection"] = mk_outlier_detection(**kwargs.get("outlier_detection", {})) meta["background"] = mk_sky_background(**kwargs.get("background", {})) - meta["source_detection"] = mk_source_detection(**kwargs.get("source_detection", {})) + meta["source_catalog"] = mk_source_catalog(**kwargs.get("source_catalog", {})) meta["cal_logs"] = mk_cal_logs(**kwargs) return meta @@ -851,7 +851,7 @@ def mk_individual_image_meta(**kwargs): # imm["program"] = kwargs.get("program", QTable(table_dct)) # imm["rcs"] = kwargs.get("rcs", QTable(table_dct)) # imm["ref_file"] = kwargs.get("ref_file", QTable(table_dct)) - # imm["source_detection"] = kwargs.get("source_detection", QTable(table_dct)) + # imm["source_catalog"] = kwargs.get("source_catalog", QTable(table_dct)) # imm["velocity_aberration"] = kwargs.get("velocity_aberration", QTable(table_dct)) # imm["visit"] = kwargs.get("visit", QTable(table_dct)) # imm["wcsinfo"] = kwargs.get("wcsinfo", QTable(table_dct)) diff --git a/src/roman_datamodels/maker_utils/_tagged_nodes.py b/src/roman_datamodels/maker_utils/_tagged_nodes.py index d439d8a0..6fc69ab6 100644 --- a/src/roman_datamodels/maker_utils/_tagged_nodes.py +++ b/src/roman_datamodels/maker_utils/_tagged_nodes.py @@ -61,16 +61,16 @@ def mk_cal_logs(**kwargs): ) -def mk_source_detection(**kwargs): +def mk_source_catalog(**kwargs): """ - Create a dummy Source Detection instance with valid values for attributes + Create a dummy Source Catalog instance with valid values for attributes required by the schema. Utilized by the model maker utilities below. Returns ------- - roman_datamodels.stnode.SourceDetection + roman_datamodels.stnode.SourceCatalog """ - sd = stnode.SourceDetection() + sd = stnode.SourceCatalog() sd["tweakreg_catalog_name"] = kwargs.get("tweakreg_catalog_name", "catalog") return sd diff --git a/tests/test_models.py b/tests/test_models.py index ba5d917f..298e4bf1 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -26,7 +26,7 @@ stnode.IndividualImageMeta, stnode.Resample, stnode.SkyBackground, - stnode.SourceDetection, + stnode.SourceCatalog, ]