I have updated the configs to match the values in this file with a few minor caveats (also noted in the commit message):
The real change is that the following override has not been included:
config.charImage.measurePsf.starSelector["objectSize"].signalToNoiseMin = 20
|
Originally, this was simply because 20 was the default (and it is preferable not to include supposed overrides in config files when the value is being set to the default). However, on further inspection (see details on DM-17043 and below) the catalogs in play for measurePsf are created with detection thresholds high enough such that typically almost no sources with S/N<~50 actually exist. This low value is not only misleading as to the range actually accessible, but also allows for the occasional lower-than-expected S/N sources to pass the thresholding tests for consideration in the PSF modeling. The default has thus been changed to 50 and this is still appropriate for LSSTCam-imSim/DC2 processing.
Three other overrides that were setting to defaults were also omitted:
config.charImage.measureApCorr.sourceSelector['science'].signalToNoise.maximum = None
|
config.charImage.measureApCorr.sourceSelector['science'].signalToNoise.fluxField = 'base_PsfFlux_instFlux'
|
config.charImage.measureApCorr.sourceSelector['science'].signalToNoise.errField = 'base_PsfFlux_instFluxErr'
|
With these new configs set, I ran step1 & consolidateSourceTable and consolidateVisitSummary of step2 of the imsim DRP.yaml pipeline. Additionally, in order to be able to make the direct run comparison & other relevant pipe_analysis plots not yet included in drp_analysis, I ran a Gen2 SFP on the visits in tract 3829 (this also confirms continued SFM Gen2/Gen3 parity). So, the first set of plots I show below are from pipe_analysis, while the psf residual distribution plots are based solely on Gen3 runs.
Also, note that all plots here are based on the S/N min > 20 config setting for model PSF source selection. The realization and decision to push this to 50 came in hindsight (and light of) of the processing runs. I have kicked off another Gen3 test-med-1 run with the S/N min > 50 override set and will post the updated plots when they come in (but I don't expect significant differences).
Ok, so as Eli Rykoff pointed out, the fluxes plotted in the (now old) versions of the source S/N distribution plots attached are actually not representative of what went into the PSF modeling. They show the PsfFlux values from the src catalogs, but, of course, these are not the same as what went into the source modeling (as they aren't available without the PSF model!). Rather, what should be plotted is the PsfFlux values from the icSrc catalogs (where the "PSF" is an initialized "simple" PSF). Here are the correct versions of the plots, with the fluxes coming from the icSrc catalogs:
First for the w_2021_40 DC2 processing of DM-32071:

Next for the run on this ticket's branches (with S/N>20):

You can see that with the cut at S/N>20, many more sources are available (and ultimately used) as potential PSF model candidates. The difference is most pronounced in u (and g), but the redder bands are much less affected but this (and this is expected and most of the PSF model-related failures reported have been in these bands).
Here is a look at some of the pre and post distributions and direct comparisons for a given visit (selected at random...see here to peruse the rest of them):
w_2021_40 DC2 processing of DM-32071:

This ticket's branches (with S/N>20):

w_2021_40 DC2 processing of DM-32071:

This ticket's branches (with S/N>20):

Direct comparisons:


etc...let me know if I should directly post any others!
To me, the difference look quite minor and it's difficult to rank the quality of the before and after, but the latter do have many more sources contributing to the PSF models in many cases (see below also), which I think is a good thing.
I have attached a couple of plots based on our most recent DC2 processing run (
DM-32071). These are the equivalents of the HSC-based ones presented onDM-17043. The histograms indicate the distributions for two fluxMin values (the default 12500 and the override in 4000) and which stars were actually used in the PSF modeling. There are dashed vertical lines at S/N = 20 and 100 (just to guide the eye).The u-band is likely to be the most affected, and is often where SFM failures due to poor PSF modeling occur (see examples on PREOPS-855), so I'll highlight a randomly selected one here (the labels got cut off in the plot...the visit is 277060):
As you can see, the flux > 12500 cut roughly coincides with a S/N ~ 70, so we are missing out on a significant number of reasonably high S/N.
And here is a randomly selected g-band visit (193827):
Here the flux cut roughly coincides with S/N ~ 50, so we are not missing as significant a fraction.
Feel free to peruse these plots for any visit in the DC2 processing at:
https://lsst.ncsa.illinois.edu/~lauren/DC2.2i_gen2/w_2021_40/plots/
and the plots of interest are in:
BAND/tract-3829/visit-NNNN/plot-vNNNN-BAND-base_PsfFluxSn_raw-hist.png
where BAND is the single character band label and NNNN is the visit number
The value used in the workflow I point to in the description was S/N > 20 which, based on these plots, may seem a bit on the low side, but if there has been some battle testing (in particular demonstrating that is at least does no harm, but ideally also provides better PSF models/fewer failures in some cases) using it, I'm all ears!