scopesim_templates.extragalactic.galaxy_utils.sersic_profile

Contents

scopesim_templates.extragalactic.galaxy_utils.sersic_profile#

scopesim_templates.extragalactic.galaxy_utils.sersic_profile(r_eff=100, n=4, ellipticity=0.5, angle=30, normalization='total', width=1024, height=1024, x_offset=0, y_offset=0, oversample=1)#

Return a 2D array with a normalised Sersic profile.

Parameters:
  • r_eff (float) – [pixel] Effective radius

  • n (float) – Power law index. - n=1 for exponential (spiral), - n=4 for de Vaucouleurs (elliptical)

  • ellipticity (float) – Ellipticity is defined as (a - b)/a. Default = 0.5

  • angle (float) – [deg] Default = 30. Rotation anti-clockwise from the x-axis

  • normalization (str, optional) – [“half-light”, “centre”, “total”] Where the profile equals unity If normalization equals: - “half-light” : the pixels at the half-light radius are set to 1 - “centre” : the maximum values are set to 1 - “total” : the image sums to 1

  • width (int) – [pixel] Dimensions of the image

  • height (int) – [pixel] Dimensions of the image

  • x_offset (float) – [pixel] The distance between the centre of the profile and the centre of the image

  • y_offset (float) – [pixel] The distance between the centre of the profile and the centre of the image

  • oversample (int) – Factor of oversampling, default factor = 1. If > 1, the model is discretized by taking the average of an oversampled grid.

Returns:

img

Return type:

2D array

Notes

Most units are in [pixel] in this function. This differs from galaxy() where parameter units are in [arcsec] or [pc]