pynbody.analysis.luminosity.calc_mags

Contents

pynbody.analysis.luminosity.calc_mags#

pynbody.analysis.luminosity.calc_mags(simstars, band='v', cmd_path=None)[source]#

Calculate the magnitude of stars in a simulation

This makes use of SSP tables, as described in the module documentation (see pynbody.analysis.luminosity).

Parameters:
  • simstars (pynbody.SimSnap) – Snapshot containing the stars (only). If you have a snapshot with non-star particles, pass sim.s to this function.

  • band (str) – Bandpass name. Can be any that is defined in the SSP table (which by default includes ‘U’, ‘B’, ‘V’, ‘R’, ‘I’, ‘J’, ‘H’, ‘K’). See the module documentation (pynbody.analysis.luminosity).

  • cmd_path (str, optional) – Path to the SSP table file. If not provided, the default table will be used. This is either the default table included with pynbody, or the table specified by use_custom_cmd().