LogSpiral

class gammapy.astro.population.LogSpiral[source]

Bases: object

Logarithmic spiral.

Reference: http://en.wikipedia.org/wiki/Logarithmic_spiral

Methods Summary

radius(theta, spiralarm_index) Radius for a given angle.
theta(radius, spiralarm_index) Angle for a given radius.
xy_position([theta, radius, spiralarm_index]) Compute (x, y) position for a given angle or radius.

Methods Documentation

radius(theta, spiralarm_index)[source]

Radius for a given angle.

Parameters:

theta : array_like

Angle (deg)

spiralarm_index : int

Spiral arm index

Returns:

radius : array_like

Radius (kpc)

theta(radius, spiralarm_index)[source]

Angle for a given radius.

Parameters:

radius : array_like

Radius (kpc)

spiralarm_index : int

Spiral arm index

Returns:

theta : array_like

Angle (deg)

xy_position(theta=None, radius=None, spiralarm_index=0)[source]

Compute (x, y) position for a given angle or radius.

Parameters:

theta : array_like

Angle (deg)

radius : array_like

Radius (kpc)

spiralarm_index : int

Spiral arm index

Returns:

x, y : array_like

Position (x, y)