scopesim_templates.extragalactic.exgal_models.GalaxyBase#

class scopesim_templates.extragalactic.exgal_models.GalaxyBase(x: ndarray, y: ndarray, x_0: int, y_0: int, amplitude: float, r_eff: float, ellip: float, theta: float, n: int = 4, vmax: float = 0.0, sigma: float = 0.0, q: float = 0.2, e_in: float = 0.04, e_out: float = -0.42)#

Bases: object

Class to define a galaxy.

It takes a set of parameters and creates the different moments for

__init__(x: ndarray, y: ndarray, x_0: int, y_0: int, amplitude: float, r_eff: float, ellip: float, theta: float, n: int = 4, vmax: float = 0.0, sigma: float = 0.0, q: float = 0.2, e_in: float = 0.04, e_out: float = -0.42) None#

Methods

__init__(x, y, x_0, y_0, amplitude, r_eff, ...)

get_masks([ngrid])

Return a generator of numpy masks from the regrided regions.

regrid([ngrid])

Regrid the smooth velocity field.

Attributes

dispersion

Velocity dispersion map according to the supplied parameters.

e_in

e_out

intensity

2D light distribution following a Sersic2D profile.

n

q

sigma

velocity

Velocity field according to the supplied parameters.

vmax

x

y

x_0

y_0

amplitude

r_eff

ellip

theta

property dispersion: ndarray#

Velocity dispersion map according to the supplied parameters.

Returns:

result – Velocity dispersion map.

Return type:

numpy.ndarray

get_masks(ngrid: int = 10) Generator[ndarray]#

Return a generator of numpy masks from the regrided regions.

Parameters:

ngrid (TYPE, optional) – Griding factor, passed to GalaxyBase.regrid(). The default is 10.

Yields:

mask (numpy.ndarray) – Boolean array constructed from regrided regions.

property intensity: ndarray#

2D light distribution following a Sersic2D profile.

Returns:

result – Light distribution map.

Return type:

numpy.ndarray

regrid(ngrid: int = 10) ndarray#

Regrid the smooth velocity field.

Regrid to regions with similar velocity and velocity dispersion.

Parameters:

ngrid (int, optional) – Griding factor. The default is 10.

Returns:

  • sectors (numpy.ndarray) – A numpy array with sectors numbered.

  • uniques (set) – Set of sector IDs.

property velocity: ndarray#

Velocity field according to the supplied parameters.

Returns:

result – Velocity map.

Return type:

numpy.ndarray