pynbody.analysis.luminosity.half_light_r#
- pynbody.analysis.luminosity.half_light_r(sim, band='V', cylindrical=False)[source]#
Calculate half-light radius
Calculates entire luminosity of the provided snapshot, finds half that, sorts stars by distance from halo center, and finds out inside which radius the half luminosity is reached.
- Parameters:
sim (pynbody.SimSnap) – Halo (or other subsnap, or even a whole simulation) for which to calculate the half-light radius. Any non-star particles are ignored.
band (str) – Bandpass name. Can be any that is defined in the SSP table. See the module documentation (
pynbody.analysis.luminosity
).cylindrical (bool) – If True, the radius is calculated in the cylindrical xy-plane coordinates.