DarkEnergySurvey / ugali

Ultra-faint galaxy likelihood toolkit
MIT License
14 stars 15 forks source link

Update magnitude limits for Martin absolute magnitude calculation in results.py #97

Open willcerny opened 1 year ago

willcerny commented 1 year ago

Update Martin absolute magnitude calculation to use magnitude limits specified in config file (rather than hardcoded values of 16 and 23.0)

kadrlica commented 2 months ago

I suspect that there was a reason this wasn't done before. I'll need to take a look at it to remember/figure out why.

kadrlica commented 2 weeks ago

Ok, so I think the reason that I didn't pass in the config magnitude limits is because absolute_magnitude_martin doesn't actually deal with these limits self-consistently, and I didn't want to make things seem more rigorous than they actually were. What actually happens in absolute_magnitude_martin is that a new isochrone is created with the same age, metallicity, distnace, but in the SDSS bandpass. Then stars are sampled from that isochrone and their V-band magnitude is calculated using the Jester et al. 2005 equations. The bright and faint magnitude limits are applied to the SDSS g-band magnitude of the stars drawn from the SDSS isochrone. This is not so bad when you are translating from DES g,r to SDSS g,r, but if you are working in DES r,i, then the magnitude limit should clearly be transformed.

Here is the code for reference: https://github.com/DarkEnergySurvey/ugali/blob/e4f0a62527855dbe202bb48cf50a5edeaa17d189/ugali/isochrone/model.py#L369

The original motivation for doing things this way was the fact that we only had the Jester et al. 2005 transformation to get to V-band, and so we wanted to work in the SDSS frame. I think I probably did a similar set of studies to you and concluded similarly that the exact magnitude limits didn't really matter. We now have transformations directly from DES g,r to V-band using Eqn B.8 of the DES DR2 Paper. So I think that really we should try to clean up the entire Martin magnitude calculation. Since I'm not sure anyone is really happy with the Martin magnitude calculation, this will probably mean thinking a bit about what we actually want out of this...

kadrlica commented 2 weeks ago

Also see #16, #56, #57, #95. I think that probably we should take this opportunity to resolve all these issues at once, but it will take a little thought to do it "right".