FaucherSpiral¶
-
class
gammapy.astro.population.
FaucherSpiral
[source]¶ Bases:
gammapy.astro.population.LogSpiral
Milky way spiral arm used in Faucher et al (2006).
Reference: https://ui.adsabs.harvard.edu/abs/2006ApJ…643..332F
Attributes Summary
Methods Summary
__call__
(self, radius[, blur, random_state])Draw random position from spiral arm distribution.
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.
Attributes Documentation
-
k
= <Quantity [4.25, 4.25, 4.89, 4.89] rad>¶
-
r_0
= <Quantity [3.48, 3.48, 4.9 , 4.9 ] kpc>¶
-
spiralarms
= array(['Norma', 'Carina Sagittarius', 'Perseus', 'Crux Scutum'], dtype='<U18')¶
-
theta_0
= <Quantity [1.57, 4.71, 4.09, 0.95] rad>¶
Methods Documentation
-
__call__
(self, radius, blur=True, random_state='random-seed')[source]¶ Draw random position from spiral arm distribution.
Returns the corresponding angle theta[rad] to a given radius[kpc] and number of spiralarm. Possible numbers are:
Norma = 0,
Carina Sagittarius = 1,
Perseus = 2
Crux Scutum = 3.
- Parameters
- random_state{int, ‘random-seed’, ‘global-rng’,
RandomState
} Defines random number generator initialisation. Passed to
get_random_state
.
- random_state{int, ‘random-seed’, ‘global-rng’,
- Returns
- Returns dx and dy, if blurring= true.
-
radius
(self, theta, spiralarm_index)¶ 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)¶ 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)¶ 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)
-