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:
thetaQuantity

Angle (deg).

spiralarm_indexint

Spiral arm index.

Returns:
radiusndarray

Radius (kpc).

theta(radius, spiralarm_index)[source]#

Angle for a given radius.

Parameters:
radiusQuantity

Radius (kpc).

spiralarm_indexint

Spiral arm index.

Returns:
thetandarray

Angle (deg).

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

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

Parameters:
thetaQuantity, optional

Angle (deg). Default is None.

radiusQuantity, optional

Radius (kpc). Default is None.

spiralarm_indexint, optional

Spiral arm index. Default is 0.

Returns:
x, yndarray

Position (x, y).