SphericalShell#
- class agabpylib.simulation.starclusters.spacedistributions.SphericalShell(r)#
Bases:
SpaceDistribution
Stars are distributed in a spherical shell around the cluster centre (of mass) the shell has zero thickness.
This space distribution is useful for investigating the correct simulation of kinematics (for example).
- radius#
Radius of the shell in pc.
- Type:
astropy.units.Quantity
Methods Summary
addinfo
()- returns:
info -- String with specific information about the space distribution.
generate_positions
(n, rng)Generate the positions of the stars randomly according to the prescribed space distribution.
getmeta
()- returns:
meta -- Metadata on the space distribution of the cluster stars.
Methods Documentation
- addinfo()#
- Returns:
info – String with specific information about the space distribution.
- Return type:
str
- generate_positions(n, rng)#
Generate the positions of the stars randomly according to the prescribed space distribution.
- Parameters:
n (int) – Number of star positions to generate.
rng (numpy.random.Generator) – Random number generator. This is provided separately to enable user control over the random number sequence.
- Returns:
x, y, z – The x, y, z positions of the stars in units of pc.
- Return type:
astropy.units.Quantity arrays
- getmeta()#
- Returns:
meta – Metadata on the space distribution of the cluster stars.
- Return type:
dict