TruncatedPlummerSphere#

class agabpylib.simulation.starclusters.spacedistributions.TruncatedPlummerSphere(a, t)#

Bases: SpaceDistribution

Truncated Plummer density distribution. A Plummer sphere truncated at a certain radius.

core_radius#

Core radius in pc.

Type:

astropy.units.Quantity

truncation_radius#

Truncation radius 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