DarkEnergySurvey / ugali

Ultra-faint galaxy likelihood toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Surface Brightness calculation in ugali.analysis.results.py should use azimuthally-averaged half-light radius

willcerny opened this issue · comments

mu = surfaceBrightness(Mv, size, dist)

Arguably, this line should be using the variable rsize (the azimuthally averaged half-light radius in arcmin) for the calculation (instead of size), since the SB formula is assuming a circular area.

Thanks @willcerny, I agree with this change. We dug into this some with the DES LSBG analysis, and determined that the azimuthally averaged formulation agrees with the (not quite unanimous...) convention in the community. For example, Section 2.2 of Graham & Driver (2005) defines the surface brightness for a Sersic profile in terms of R_e, which is the geometric mean effective radius (see their Footnote 3).

Since this change will likely lead to an update in all ugali-derived surface brightnesses returned in the results yaml file, I want to call it to the attention of @sidneymau @mcnanna and @bechtol.

@willcerny could you create a pull request with this change?

@willcerny also note that size and rsize are physical quantities measured in kpc not arcmin:

# Physical Size (should do this with the posteriors)
# Radially symmetric
dist_sigma = np.nan_to_num(np.array(dist_err) - dist)
size = np.arctan(np.radians(ext)) * dist
size_sigma = size * np.sqrt((ext_sigma/ext)**2 + (dist_sigma/dist)**2)
size_err = [size-size_sigma[0],size+size_sigma[1]]
results['physical_size'] = ugali.utils.stats.interval(size,size_err[0],size_err[1])
rsize = np.arctan(np.radians(rext)) * dist
rsize_sigma = rsize * np.sqrt((rext_sigma/rext)**2 + (dist_sigma/dist)**2)
rsize_err = [rsize-rsize_sigma[0],rsize+rsize_sigma[1]]
results['physical_size_radial'] = ugali.utils.stats.interval(rsize,rsize_err[0],rsize_err[1])

Sure, I can do the pull request. Do we also want to switch to using Mv_martin rather than M_v?

Mv_martin is not always calculated, so probably need a switch to use M_v if it is not available.