From 5f5b214f3d763da41131596c3e3b4892b00d2eb5 Mon Sep 17 00:00:00 2001 From: Eli Rykoff Date: Wed, 30 Aug 2023 09:29:50 -0700 Subject: [PATCH 1/4] Add colorterms for ATLAS Refcat2 -> LATISS (g/r/i). --- config/latiss/colorterms.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 config/latiss/colorterms.py diff --git a/config/latiss/colorterms.py b/config/latiss/colorterms.py new file mode 100644 index 000000000..4f60efd30 --- /dev/null +++ b/config/latiss/colorterms.py @@ -0,0 +1,37 @@ +from lsst.pipe.tasks.colorterms import Colorterm, ColortermDict + + +config.data = { + "atlas_refcat2*": ColortermDict(data={ + "SDSSg_65mm~empty": Colorterm( + primary="g", + secondary="r", + c0=-0.09034144345111599, + c1=0.1710923238086337, + c2=-0.038260355621929296, + ), + "SDSSr_65mm~empty": Colorterm( + primary="r", + secondary="i", + c0=0.0073632488906825045, + c1=-0.026620900037027242, + c2=-0.03203533692013322, + ), + "SDSSi_65mm~empty": Colorterm( + primary="i", + secondary="r", + c0=0.016940180565664747, + c1=0.0610018330811135, + c2=-0.0722575356707918, + ), + # The following two are blank until we have data to measure them. + "SDSSz_65mm~empty": Colorterm( + primary="z", + secondary="z", + ), + "SDSSy_65mm~empty": Colorterm( + primary="y", + secondary="y", + ), + }), +} From 39902c345de335a49ea2b554af40801b6a26f5cf Mon Sep 17 00:00:00 2001 From: Eli Rykoff Date: Wed, 30 Aug 2023 09:30:16 -0700 Subject: [PATCH 2/4] Add filterMap to properly map reference catalog to LATISS filters. --- config/latiss/filterMap.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 config/latiss/filterMap.py diff --git a/config/latiss/filterMap.py b/config/latiss/filterMap.py new file mode 100644 index 000000000..603e53bef --- /dev/null +++ b/config/latiss/filterMap.py @@ -0,0 +1,12 @@ +# Mapping of camera filter name: reference catalog filter name +# This file is appropriate for ATLAS Refcat2. + +for source, target in [ + ("SDSSg_65mm~empty", "g"), + ("SDSSr_65mm~empty", "r"), + ("SDSSi_65mm~empty", "i"), + ("SDSSz_65mm~empty", "z"), + # ATLAS Refcat2 does not have y band. + ("SDSSy_65mm~empty", "z"), + ]: + config.filterMap[source] = target From d0021e853df6ba303e4647c8fdbb7c5203de4a25 Mon Sep 17 00:00:00 2001 From: Eli Rykoff Date: Wed, 30 Aug 2023 09:31:22 -0700 Subject: [PATCH 3/4] Add color terms to calibrate config and limit color range. --- config/latiss/calibrate.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/config/latiss/calibrate.py b/config/latiss/calibrate.py index c034cd25f..388c57787 100644 --- a/config/latiss/calibrate.py +++ b/config/latiss/calibrate.py @@ -1,8 +1,21 @@ +import os.path + from lsst.meas.astrom import FitAffineWcsTask +from lsst.meas.algorithms import ColorLimit + +ObsConfigDir = os.path.dirname(__file__) # Configure the photometry to use atlas_refcat2. -config.connections.photoRefCat = 'atlas_refcat2_20220201' +config.connections.photoRefCat = "atlas_refcat2_20220201" +config.photoRefObjLoader.load(os.path.join(ObsConfigDir, "filterMap.py")) + config.photoCal.match.referenceSelection.magLimit.fluxField = "r_flux" +colors = config.photoCal.match.referenceSelection.colorLimits +colors["g-r"] = ColorLimit(primary="g_flux", secondary="r_flux", minimum=0.4, maximum=2.0) + +config.photoCal.applyColorTerms = True +config.photoCal.photoCatName="atlas_refcat2_20220201" +config.photoCal.colorterms.load(os.path.join(ObsConfigDir, "colorterms.py")) # We often have very few sources due to smaller aperture so use affine task. config.astrometry.wcsFitter.retarget(FitAffineWcsTask) From d872757a939f2c98bba31f2a4594d66c1699a168 Mon Sep 17 00:00:00 2001 From: Eli Rykoff Date: Wed, 30 Aug 2023 09:31:51 -0700 Subject: [PATCH 4/4] Remove extra space. --- config/latiss/calibrate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/latiss/calibrate.py b/config/latiss/calibrate.py index 388c57787..e9bba3af7 100644 --- a/config/latiss/calibrate.py +++ b/config/latiss/calibrate.py @@ -17,7 +17,7 @@ config.photoCal.photoCatName="atlas_refcat2_20220201" config.photoCal.colorterms.load(os.path.join(ObsConfigDir, "colorterms.py")) -# We often have very few sources due to smaller aperture so use affine task. +# We often have very few sources due to smaller aperture so use affine task. config.astrometry.wcsFitter.retarget(FitAffineWcsTask) # Note that the following two config values were validated on data taken in