pynbody.plot.stars.render_mollweide

pynbody.plot.stars.render_mollweide#

pynbody.plot.stars.render_mollweide(sim, r_band='I', g_band='V', b_band='U', r_scale=0.5, g_scale=1.0, b_scale=1.0, mag_range=None, dynamic_range=2.0, nside=None, with_dust=False, noplot=False, return_image=False, return_range=False, xsize=1600)[source]#

Make a 3-color all-sky image of stars in a mollweide projection, i.e. a projection of all angles around the origin.

Changed in version 2.0: For consistency with other plotting routines, the axes and clear arguments have been removed. Set up axes as needed using the standard matplotlib commands.

ret_im has been renamed to return_image for consistency with other plotting routines, and ret_range has been renamed to return_range.

The xside option has been added.

The with_dust option has been added to mirror the functionality in render(). However, see the parameter documentation below for important caveats on dust screening in this context.

Parameters:
  • sim (SimSnap) – The simulation snapshot to plot.

  • r_band (str) – The filter bands to use for R, G and B image channels. Default is ‘I’, ‘V’, ‘U’. These bands are as defined in pynbody.analysis.luminosity, or overriden using the pynbody.analysis.luminosity.use_custom_ssp_table() function.

  • g_band (str) – The filter bands to use for R, G and B image channels. Default is ‘I’, ‘V’, ‘U’. These bands are as defined in pynbody.analysis.luminosity, or overriden using the pynbody.analysis.luminosity.use_custom_ssp_table() function.

  • b_band (str) – The filter bands to use for R, G and B image channels. Default is ‘I’, ‘V’, ‘U’. These bands are as defined in pynbody.analysis.luminosity, or overriden using the pynbody.analysis.luminosity.use_custom_ssp_table() function.

  • r_scale (float, optional) – The scaling of the red, green and blue channels before they are combined.

  • g_scale (float, optional) – The scaling of the red, green and blue channels before they are combined.

  • b_scale (float, optional) – The scaling of the red, green and blue channels before they are combined.

  • mag_range (tuple, optional) – The brightest and faintest surface brightnesses in the final image, in mag arcsec^-2.

  • dynamic_range (float, optional) – The number of dex in luminosity over which the image brightness ranges, if mag_range is not provided.

  • nside (int, optional) – The healpix nside resolution to use (must be power of 2). Default is determined by pynbody config file.

  • xsize (int, default 1600) – The xsize parameter for healpy.mollview, which determines the resolution of the projection (i.e. does not affect the resolution of the actual image, but the presentation.) Default is 1600.

  • with_dust (bool, default False) – If True, the image is rendered with a simple dust screening model. See important notes on dust screening in render(). These are even more important in the case of rendering a full-sky image from within a galaxy, to the point where the results may carry little physical meaning.

  • noplot (bool, optional) – If True, the image is not plotted; most useful alongside return_image, if you want to save the image to a file.

  • return_image (bool, optional) – If True, the image is returned as an array (N x N x 3) for the RGB channels. Default is False.

  • return_range (bool, optional) – If True, a tuple with the range of the image in mag arcsec^-2 is returned. Default is False.

Returns:

  • If return_image is True, an array (N x N x 3) representing the RGB image is returned.

  • If return_range is True, a tuple with the range of the image in mag arcsec^-2 is returned.