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

Use SNR starSelector for measurePsf; add assembleCoadd.py with WCSSel… #421

Merged
merged 1 commit into from
Sep 6, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions config/latiss/assembleCoadd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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/>.

# AuxTel PSF is not stable at this time resulting in many frames being
# rejected by standard psfWcsSelect. Switch to using WcsSelectImagesTask
# to avoid rejecting too many frames.
from lsst.pipe.tasks.selectImages import WcsSelectImagesTask
config.select.retarget(WcsSelectImagesTask)
35 changes: 27 additions & 8 deletions config/latiss/characterizeImage.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
# Switch to PCA determiner as it is much more robust when there are very few
# sources. Increase default FWHM due to plate scale and reduce fluxMin due to
# short expTimes on a 1.2m telescope. nEigenComponents and spatialOrder set to
# min values so that we always succeed even with one or two stars.
config.measurePsf.psfDeterminer = 'pca'
config.measurePsf.psfDeterminer['pca'].spatialOrder = 0
config.measurePsf.psfDeterminer['pca'].nEigenComponents = 1
config.measurePsf.starSelector['objectSize'].fluxMin = 2500
# To ensure as many candidates as possible are passed to measurePsf, we use a simple 'science' star selector,
# including only a signal to noise limit and pixel flag filter to filter out bad candidates. THe SNR>30 limit
# corresponds to a band-dependent magnitude of around 19 on LATISS in a 30s image, so galaxy contamination is
# limited. The default objectSize star selector is not appropriate given the low number of sources and
# PSF variations across the FOV.
config.measurePsf.starSelector = 'science'
config.measurePsf.starSelector['science'].doSignalToNoise = True
config.measurePsf.starSelector['science'].signalToNoise.minimum = 30.0
config.measurePsf.starSelector['science'].signalToNoise.maximum = None
config.measurePsf.starSelector['science'].signalToNoise.fluxField = "base_GaussianFlux_instFlux"
config.measurePsf.starSelector['science'].signalToNoise.errField = "base_GaussianFlux_instFluxErr"
config.measurePsf.starSelector['science'].doFlags = True
config.measurePsf.starSelector['science'].flags.bad = ["base_PixelFlags_flag_edge",
"base_PixelFlags_flag_interpolatedCenter",
"base_PixelFlags_flag_saturatedCenter",
"base_PixelFlags_flag_crCenter",
"base_PixelFlags_flag_bad",
"base_PixelFlags_flag_interpolated"]

# Use these to run the pca psf estimator
#config.measurePsf.psfDeterminer = 'pca'
#config.measurePsf.psfDeterminer['pca'].spatialOrder = 0

# Set PSF spatialOrder to 0 to calculate the mean PSF profile across the detector, i.e. no
# spatial variations.
config.measurePsf.psfDeterminer['piff'].spatialOrder = 0

config.installSimplePsf.width = 81
config.installSimplePsf.fwhm = 2.355*2 # LATISS platescale is 2x LSST nominal