LogSpiral

class gammapy.astro.population.LogSpiral[source]

Bases: object

Logarithmic spiral.

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

Methods Summary

radius(self, theta, spiralarm_index)

Radius for a given angle.

theta(self, radius, spiralarm_index)

Angle for a given radius.

xy_position(self[, theta, radius, …])

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

Methods Documentation

radius(self, theta, spiralarm_index)[source]

Radius for a given angle.

Parameters
thetaarray_like

Angle (deg)

spiralarm_indexint

Spiral arm index

Returns
radiusarray_like

Radius (kpc)

theta(self, radius, spiralarm_index)[source]

Angle for a given radius.

Parameters
radiusarray_like

Radius (kpc)

spiralarm_indexint

Spiral arm index

Returns
thetaarray_like

Angle (deg)

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

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

Parameters
thetaarray_like

Angle (deg)

radiusarray_like

Radius (kpc)

spiralarm_indexint

Spiral arm index

Returns
x, yarray_like

Position (x, y)