SpaceDistribution#
- class agabpylib.simulation.starclusters.spacedistributions.SpaceDistribution#
Bases:
ABC
Abstract base class for classes representing the space distribution of stars in a cluster.
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.
getinfo
()- returns:
info -- String with information about the space distribution.
getmeta
()- returns:
meta -- Metadata on the space distribution of the cluster stars.
Methods Documentation
- abstract addinfo()#
- Returns:
info – String with specific information about the space distribution.
- Return type:
str
- abstract 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
- getinfo()#
- Returns:
info – String with information about the space distribution.
- Return type:
str
- abstract getmeta()#
- Returns:
meta – Metadata on the space distribution of the cluster stars.
- Return type:
dict