jennykim1016 / OM10

Tools for working with the Oguri & Marshall (2010) mock catalog of strong gravitational lenses
MIT License
0 stars 0 forks source link

u_sdss file magnitude error #13

Open jennykim1016 opened 7 years ago

jennykim1016 commented 7 years ago

Lenspop u_sdss file throws invalid input value when I tried to calculate the u magnitude for both lens and quasars. I downloaded a new SED for u_sdss but this only allows us to calculate the lens u magnitude, but not Quasar's(Quasar u magnitude calculation throws an error - invalid input value when I try to calculate the synthetic magnitude).

I think printing out the data and inspect to debug it line by line would be the best, after finishing cleaning up db.py. For now, it is just set to be 0.

jennykim1016 commented 7 years ago

Two modifications --

1) We should only put sorted array to the scipy's splev. u_sdss's second argument array was not sorted. This was the source of the first error. 2) If the redshift is over 3.9, scipy's splev again throws an error when calculating the synthetic magnitude. This is because the interpolation is impossible if the redshift is over 3.9. There are 1139 out of 15658 lenses whose redshift was greater than 3.9. Thus, I set those 1139 lenses' u magnitude to be zero while calculating the remaining 14519 lenses' u magnitude.

drphilmarshall commented 7 years ago

Nice detective work. I'm not too surprised that the AGN u-band SED does not enable us to go out beyond z=3.9. Good idea to just mask these systems out