LSSTDESC / lsstdesc-diffsky

Library for differentiable generation of synthetic skies for LSST DESC
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Validate color--redshift discreteness #33

Open aphearin opened 1 year ago

aphearin commented 1 year ago

As reported by @sidneymau the small-volume test catalog diffsky, diffsky_v0.1_p3765_vsmall, presents color--redshift discreteness effects: image

This behavior has been seen before in previous iterations of Diffsky models that populated a single healpixel, and we observed that the cause was cosmic variance since the effect entirely vanished when populating a cosmoDC2-sized sky area (see plot below). But this should be re-confirmed with future larger-volume productions of the diffsky mocks.

ri_obs_single_heapixel_vs_cosmodc2

sidneymau commented 10 months ago

Following up here. I ran this same code on the roman_rubin_2023_v1.1.1 catalog. I am still seeing some striations in the color vs redshift distributions. Here are plots for both g-r and r-i color vs redshift. Note that there are a lot of pixels (1k x 1k), so matplotlib is doing some subsampling to display the histograms, but these effects do seem consistent when zooming in to see the individual pixels. image image

aphearin commented 10 months ago

Thanks for following up on this @sidneymau. Hmmm, yes definitely still visible. Although also appears to be quite a bit less pronounced than the single-healpixel plot, don’t you think?

This could be due to the redshift table used in the calculation of the approximate magnitudes, or it could be something else. A very pure test of that would be to remake this plot using the exact photometry (remember the approximate photometry is what we write to disk and store in the columns).

sidneymau commented 10 months ago

Yes, definitely less pronounced than from the single-healpixel plot. Good point about the approximate photometry... especially given the interpolation on the grid of redshift. If the redshift grid is logarithmically spaced that would also explain how the spacing between striations seems to lengthen w.r.t. redshift.

I can try and make a version with computing the exact photometry some time in the next few days.

aphearin commented 10 months ago

So I still think the test using the exact photometry is worth doing, but after thinking about this a little more it still seems like the most plausible explanation is cosmic variance, since the effect reduces so much when going from one healpixel to many. It's worth pointing out that these vertical striations are also seen directly in observational data of small galaxy samples. See for example the left panel of Figure 5 of this paper that posted to the arXiv today: https://arxiv.org/abs/2311.10469

sidneymau commented 10 months ago

Oh, interesting—I did not realize this was a feature seen in data. Following a suggestion from Eric, here's a 1D histogram of redshift for the data. Indeed, we see the same spikiness here. This is consistent with this not being anything weird with the colors. image

evevkovacs commented 10 months ago

I convinced myself that these striations were cosmic variance by looking at distributions for successively larger areas of the catalog. You can see them smooth out as the area gets larger. For the full area of cosmoDC2 (~440 sq. deg.), the distributions showed almost none of this effect.