Open esheldon opened 8 years ago
Take input stars for DES PSFEx and extrapolate to lower fluxes. @rmjarvis will send a distribution
@rmjarvis I see files like this, stars used for psfex, have a magnitude: ~mjarvis/work/psfex_rerun/y1a1-v11/psf_cats/DECam_00239305_psf.fits
Do you know how to convert this to the flux used in the config files?
(I recall you did not use the zero point in the header, for example)
@mjarvis here is a typical mag dist. Are the zero points from the image headers (instrumental mags) or did you fudge it to be closer to calibrated mags?
The magnitudes there are just passed through from the input catalogs, which are SExtractor cats.
I'm not sure how that connects to flux in ADU, but that's what GalSim means by flux: the total number of ADU in the drawn image.
I see files like this, stars used for psfex, have a magnitude: ~mjarvis/work/psfex_rerun/y1a1-v11/psf_cats/DECam_00239305_psf.fits
And yes, these are the files I was referring to with the PSF information. The ones with flags==0 are the stars that passed all cuts, including B/F rejection, tape bumps, and PSFEx outlier rejection.
I see, so for ones with BF rejection we will have fewer bright stars than a real image.
Yes. Although, we could make the simulation with a full distribution of stars (including fainter ones as we discussed -- by extrapolating this distribution to fainter magnitudes) and then just select a subset to send to PSFEx/Piff for the PSF solution.
It looks like the distribution between m=14 and m=16 is pretty close to linear, so that's probably the power law that we should extrapolate in both directions.
I agree that should be extrapolated to the faint end, but I don't have a reason to assume it is right at the bright end.
I see y1a1-v05
uses the desdm psfex parameter file, does that also use the brighter stars?
https://github.com/rmjarvis/DESWL/blob/master/psfex/notes.txt
I see there are no actual outputs for that run....
I never built the psf catalogs for that run. I could do that. But I do think a power law is pretty close to right for the range we care about. (We won't want to extrapolate forever in the bright direction -- we can stop somewhere around the saturation level.)
I thought that some zeropoint was stored in the headers but I can't find it. I wonder if this was put into the sextractor parameter file
According to Robert it is 25
Extrapolation of fluxes. I need to see what the saturation point was for some images.
function is
Nperimage = p0*logflux + p1
p0: -1.09774941717 +/- 0.00555761691564
p1: 5.65553631112 +/- 0.0222397225906
Number is the number per image
looks like 10^6
might be a good number for the cutoff flux in ADU in r band
might be better to look at a bunch of your findstars diagnostic plots though
1 full exposure, all objects
that plot, with galaxies, is far steeper than the star plot.
And the star plot just does not have large enough range where objects were not removed (either too faint or too bright) to fit a proper power law (the previous fit won't work because it is not positive).
The slope seems too shallow, -0.4
I think I need to see the bright stars to get a good fit.
from looking at full catalogs, with no cut at the high flux end for BF, it seems a slope of -0.5 might be OK for log10(flux) in [4.4,6]
this produces too many bright stars. I'm not sure if the issue is units or something else
@rmjarvis I saw in an example yaml config that flux should be in ADU, is that right? I think sextractor flux
is in ADU
Yes. Fluxes in Galsim are all in ADU.
this might have been because I fit in log flux space. So an approximate fix is to increase the power law from x**-0.5
to x**-1.5
. It looks better, but need to run through SExtractor to see how the flux distribution looks
fixing to x**-1.5
results in agreement between data and the sim in terms of the true flux (from the truth file), over the range where the fit was done. We probably don't trust s/g separation at fainter mags to do a good comparision ( I just used class_star )
pick a distribution of star fluxes