LSSTDESC / descwl-shear-sims

simple simulations for testing weak lensing shear measurement
BSD 3-Clause "New" or "Revised" License
10 stars 9 forks source link

Return "truth catalog" info / save truth catalog #129

Open NiallMac opened 3 years ago

NiallMac commented 3 years ago

For analysis of the sims, we'll want to know what exactly was drawn where. So I think for each exposure we'd want to return this information as well as (or as part of) seobs. At a minimum, we'd want, for each object drawn,

Also add tools for saving this stuff to file.

Let me know thoughts/preferences about how we set this stuff up, and whether I should take a crack at this or @esheldon or @beckermr you'd rather do it.

esheldon commented 3 years ago

Thanks Niall. Can you please list the primary use cases for this catalog? It will help to understand what is needed and how to implement it.

We don't do i/o in this library, so we would rather provide the ability to get the catalog and then the user can do the i/o

NiallMac commented 3 years ago

Good question. So my particular use case was for the n_gamma(z) calculations we've discussed. Specifically - I want to get an estimate of the redshift distribution of objects detected in a given simulation. It doesn't need to be perfect (because what does that mean with blending anyway), so being able to position-match the output catalog to the inputs, and then grab the corresponding redshifts, would be a sufficient and the most straightforward way to do this.

I imagine this would also be useful generally for testing that the simulation code is doing what we expect. Especially in simplified sims e.g. without blending, comparing input and output objects is a decent approach to doing so I think, but for that we need to keep track of what input objects we simulated and where.

beckermr commented 3 years ago

Yes. My student is adding this same set of analysis steps to the old mdet code as well. The positions and redshifts of each object should be sufficient to start. Estimates of the object's size might be useful for helping to differentiate things that are very blended versus not.

esheldon commented 2 years ago

Note we now do return bright_info, we could extend this to all objects

NiallMac commented 2 years ago

Sounds good - I can have a go at this - I'll just copy the way this is done for bright_info unless you have alternative suggestions?

esheldon commented 2 years ago

that sounds fine, add a new entry to the output dictionary, e.g. truth_catalog or whatever.