LSSTDESC / sims_GCRCatSimInterface

LSST sims interface to gcr-catalogs
BSD 3-Clause "New" or "Revised" License
1 stars 5 forks source link

nans appearing for A_v values in extinction entries for galaxies #44

Open jchiang87 opened 6 years ago

jchiang87 commented 6 years ago

@danielsf @yymao Using v0.2.0, I'm seeing nan values appearing in the extinction entries for galaxies. Here's a grep of the gunzipped (and renamed) galaxy catalog that I generated for Run1.2p visit 197356:

[cori05] grep nan galaxies.txt
object 4220010603 53.5689537 -29.257551 21.6127102 galaxySED/Exp.10E09.1Z.spec.gz 0.722363949 0.00206888001 0.006308774 0.00992357731 0 0 sersic2d 0.0101226002 0.00380061925 85.6162257 1 CCM nan 4.13309107 CCM 0.0344395093 3.1
object 4632705131 53.9253103 -27.7405037 21.4024388 galaxySED/Exp.80E08.1Z.spec.gz 0.735393405 0.0138457119 -0.00614703167 -0.00606226921 0 0 sersic2d 0.0096136836 0.00462341384 25.7594333 1 CCM nan 4.56825434 CCM 0.0373335315 3.1
object 6043956331 53.0673206 -28.31855 21.3965613 galaxySED/Burst.64E08.1Z.spec.gz 0.804616213 -0.00444172323 0.0138207907 0.0296112895 0 0 sersic2d 0.00976728516 0.0028545376 8.91078154 1 CCM nan 4.04821822 CCM 0.0231532148 3.1
object 6329588843 53.5085479 -29.0395261 21.5640718 galaxySED/Burst.64E08.1Z.spec.gz 0.856035113 -0.0144898929 0.0033259429 0.00274354219 0 0 sersic2d 0.00976728516 0.0028545376 18.1828611 1 CCM nan 4.32913665 CCM 0.0298660875 3.1
object 7526148203 53.2128769 -28.054135 21.7413039 galaxySED/Const.80E08.1Z.spec.gz 0.903070927 -0.0040857275 -0.0016055936 -0.00729513168 0 0 sersic2d 0.0131642697 0.00368692857 178.451582 1 CCM nan 1.02070265 CCM 0.0217677121 3.1
object 8013617259 52.3306247 -27.5628541 21.8042547 galaxySED/Const.80E08.1Z.spec.gz 0.924280405 0.00901748892 0.0170926582 0.00461226702 0 0 sersic2d 0.0131642697 0.00368692857 116.724339 1 CCM nan 3.82457231 CCM 0.0297897526 3.1
object 9405026411 52.5122928 -29.2421967 22.0049499 galaxySED/Const.10E09.1Z.spec.gz 0.988555074 0.0068699331 -0.0122223906 0.0029822588 0 0 sersic2d 0.0116068168 0.00519428493 147.012636 1 CCM nan 2.68738881 CCM 0.0217975554 3.1
[cori05]

This is for a full focalplane fov (~2.1 deg radius), so these are fairly rare, but they are causing imsim/galsim to crash when computing the flux for these entries. There is protection against nan values for the R_v entries here. Should we do something similar for the A_v values too?

danielsf commented 6 years ago

Yes. I suppose we should protect against A_v == NaN the same way we did with R_v. Let me check to see if this is a bug in the underlying catalog, or something sims_GCRCatSimInterface is introducing.

danielsf commented 6 years ago

I can confirm that, in protoDC2 v3, the galaxy with galaxy_id = 4121104 has A_v_disk = R_v_disk = nan, but stellar_mass_disk > 0.

@evevkovacs @abensonca

danielsf commented 6 years ago

@jchiang87 I will issue a PR against sims_GCRCatSimInterface to protect against this