LSSTDESC / SSim_DC1

Configuration, production, validation specifications and tools for the DC1 Data Set.
4 stars 2 forks source link

Ingest simulation truth info on DC1 objects in db tables #34

Closed jchiang87 closed 7 years ago

jchiang87 commented 7 years ago

The object (~instance) catalogs that were used by the imsim simulation runs contain the input truth information for each simulated object, i.e., ICRS coordinates, SEDs, and Galactic extinction for stars, plus redshifts, sersic2d parameters and intrinsic reddening for galaxies. I plan to use sims_photUtils to compute ugrizy apparent magnitudes and will put all this info into tables in the DESC_DC1_Level_2 db.

Draft schema for separate star and galaxy tables are in the pserv repo:

https://github.com/LSSTDESC/pserv/blob/u/jchiang/add_imsim_truth/sql/create_StarTruth.sql https://github.com/LSSTDESC/pserv/blob/u/jchiang/add_imsim_truth/sql/create_GalaxyTruth.sql

and the code to compute the magnitudes is at this imSim PR:

https://github.com/LSSTDESC/imSim/pull/61/files

Comments/suggestions welcome.

fjaviersanchez commented 7 years ago

This sounds good to me. Don't know if @slosar, @damonge or @egawiser can think of any other parameters that might be interesting.

jchiang87 commented 7 years ago

The ingest of the StarTruth table for DC1 is finished, and I'm in the process of doing the magnitude calculations for the galaxies.

As a check, I used a KDTree to do a simple sky position match of the imsim coadd point-like objects to the input star truth. Imposing a cut on the nearest match offset of <0.2arcsec, I plotted measured r magnitude from the Level 2 pipeline vs true magnitude. Here are the results for the imsim undithered and dithered data (for the first 100000 point-like objects from the db queries matched against the full 1.8M true star positions): dc1_imsim_undithered_star_offsets dc1_imsim_undithered_r_mag_comparison dc1_imsim_dithered_star_offsets dc1_imsim_dithered_r_mag_comparison

Here is the script I used to make these plots.

jchiang87 commented 7 years ago

The ingest into the "GalaxyTruth" table is finished. Here are some plots of interest: dc1_imsim_dithered_galaxy_offsets dc1_imsim_dithered_galaxy_r_mag_dists dc1_imsim_dithered_r_mag_galaxy_comparison The r mag (true) values are derived from the modelfit_CModel_flux values.