Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-46356: Add LATISS crosstalk matrix and default LATISS config for IsrTaskLSST #556

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions config/latiss/isrLSST.py
Original file line number Diff line number Diff line change
@@ -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 <http://www.lsstcorp.org/LegalNotices/>.
"""
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"]
55 changes: 55 additions & 0 deletions python/lsst/obs/lsst/script/write_latiss_crosstalk_coeffs.py
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.
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)
Loading