From 15eb0d646ae7daf3ae0453354ee3b26b54a2603d Mon Sep 17 00:00:00 2001 From: Eli Rykoff Date: Tue, 23 Jul 2024 16:41:32 -0700 Subject: [PATCH 1/2] Add script to put LATISS crosstalk matrix in obs_lsst_data. --- .../script/write_latiss_crosstalk_coeffs.py | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 python/lsst/obs/lsst/script/write_latiss_crosstalk_coeffs.py diff --git a/python/lsst/obs/lsst/script/write_latiss_crosstalk_coeffs.py b/python/lsst/obs/lsst/script/write_latiss_crosstalk_coeffs.py new file mode 100644 index 000000000..0f5ffc8fb --- /dev/null +++ b/python/lsst/obs/lsst/script/write_latiss_crosstalk_coeffs.py @@ -0,0 +1,55 @@ +# This file is part of obs_lsst. +# +# Developed for the LSST Data Management System. +# This product includes software developed by the LSST Project +# (https://www.lsst.org). +# See the COPYRIGHT file at the top-level directory of this distribution +# for details of code ownership. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +import re +import os +import dateutil.parser +from lsst.daf.butler import Butler +import lsst.utils + + +crosstalk_run = "u/czw/DM-37819/crosstalkGen.20230601a/20230601T201929Z" + +butler = Butler("/repo/embargo") + +camera = butler.get("camera", instrument="LATISS", collections=["LATISS/calib"]) +crosstalk = butler.get("crosstalk", instrument="LATISS", detector=0, collections=[crosstalk_run]) + +det = camera[0] +name = det.getName() + +# Make this valid for all time. +valid_start = "1970-01-01T00:00:00" +valid_date = dateutil.parser.parse(valid_start) +datestr = "".join(re.split(r"[:-]", valid_date.isoformat())) +directory = lsst.utils.getPackageDir("obs_lsst_data") +out_path = os.path.join(directory, "latiss", "crosstalk", name.lower()) +os.makedirs(out_path, exist_ok=True) +out_file = os.path.join(out_path, datestr + ".ecsv") + +crosstalk.updateMetadata( + camera=camera, + detector=det, + setCalibId=True, + setCalibInfo=True, + CALIBDATE=valid_start, +) + +crosstalk.writeText(out_file) From 6049ffa3bb008d1d30a6af8ed10951cc2b49e7c9 Mon Sep 17 00:00:00 2001 From: Eli Rykoff Date: Tue, 15 Oct 2024 10:20:14 -0700 Subject: [PATCH 2/2] Add LATISS configuration overrides for IsrTaskLSST. --- config/latiss/isrLSST.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 config/latiss/isrLSST.py diff --git a/config/latiss/isrLSST.py b/config/latiss/isrLSST.py new file mode 100644 index 000000000..b6eda30fe --- /dev/null +++ b/config/latiss/isrLSST.py @@ -0,0 +1,31 @@ +# This file is part of obs_lsst. +# +# Developed for the LSST Data Management System. +# This product includes software developed by the LSST Project +# (http://www.lsst.org). +# See the COPYRIGHT file at the top-level directory of this distribution +# for details of code ownership. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the LSST License Statement and +# the GNU General Public License along with this program. If not, +# see . +""" +LATISS-specific overrides for IsrTaskLSST +""" +config.overscanCamera.defaultDetectorConfig.defaultAmpConfig.saturation = 120000 + +config.crosstalk.doQuadraticCrosstalkCorrection = False +config.doDeferredCharge = False +config.doBrighterFatter = False + +config.cameraKeywordsToCompare = ["SEQNAME", "SEQFILE", "SEQCKSUM", "ODP", "AP0_RC", "TEMP_SET"]