Synthetic module#
The asteca.Synthetic
class allows generating synthetic clusters from:
A
asteca.Isochrones
objectA dictionary of fundamental parameters
A
asteca.Cluster
object (optional, used for calibration)
The handling of a synthetic
object is explained in detail in the sub-sections
that follow.
Defining the object#
To instantiate a synthetic
object you need to pass the isochs
object previously generated, as explained in the section Isochrones module.
# Synthetic clusters object
synthcl = asteca.Synthetic(isochs)
This will perform the required initial processing and load the theoretical isochrones
into the synthcl
object. The processing involves sampling an initial
mass function (IMF), setting the distributions for the binary systems’ mass ratio,
and the differential reddening (these two last processes are optional).
The basic example above uses the default values for these three processes, but
they can be modified by the user at this stage via their arguments. These arguments
are (also see asteca.Synthetic
):
ext_law : Extinction law
DR_distribution : Distribution for the differential reddening
IMF_name : Initial mass function
max_mass : Maximum total initial mass
gamma : Distribution for the mass ratio of the binary systems
The ext_law
argument defines the extinction law as one of either CCMO
or
GAIADR3
. The first one corresponds to the model by
Cardelli, Clayton & Mathis (1989), with updated coefficients for near-UV from
O’Donnell (1994). The second one is Gaia’s (E)DR3, color-dependent law (main
sequence), only applicable to Gaia’s photometry. If this law is selected, ASteCA
assumes that the magnitude and first color used are Gaia’s G
and BP-RP
respectively.
Important
While CCMO
allows different Rv
values (which means this parameter can even
be fitted), GAIADR3
is to be used with Rv=3.1
. Please read the online
documentation and its accompanying articles to learn more about this law’s
limitations.
There are dedicated packages like dustapprox, dust_extinction or extinction that can handle this process. We chose to employ our own implementation to increase the performance. If you want to use a different extinction model, please drop me an email.
The DR_distribution
argument fixes the distribution used for the differential
reddening (assuming that the DR
parameter is different than 0, see Section
Generating). The differential reddening effect adds a random amount to the
total extinction parameter Av
, sampled from either a uniform or a normal
distribution. The DR_distribution
argument hence accepts one of two string values:
uniform
(the default) or normal
.
The IMF_name
and max_mass
arguments are used to generate random mass samples from
an IMF. To improve the performance of the code, this step is performed when the
asteca.Synthetic
object is created instead of every time a new synthetic
cluster is generated. The IMF_name
argument must be one of those available in
asteca.Synthetic
: salpeter_1955, kroupa_2001, chabrier_2014
.
Currently these are associated to the following IMFs:

as defined in Salpeter (1995), Kroupa (2001), and Chabrier et al. (2014)
(the default value). The max_mass
argument simply fixes the total mass
value to be sampled. This value should be large enough to allow generating as many
synthetic stars as those present in the observed cluster. The default value is
\(10000\;M_{\odot}\) which should be more than enough for the vast majority of
clusters.
The gamma
argument (\(\gamma\)) defines the distribution of the mass ratio for
the binary systems. The mass ratio is the ratio of secondary masses (\(m_2\))
to primary masses (\(m_1\)) in binary systems, written as
\(q=m_2/m_1\,(<=1)\). As with the IMF, the \(q\) distribution is fixed, not
fitted, to improve the performance.
We use gamma
as an argument because the \(q\) distribution is usually defined
as a power-law, where gamma
or \(\gamma\) is the exponent or power:
Here, \(f(q)\) is the distribution of \(q\) (the mass-ratio) where \(\gamma(m_1)\) means that the value of \(\gamma\) depends on the primary mass of the system (this dependence is only true for the Duchene & Kraus (2013) distribution, see below).
The default selection is gamma=D&K
, with D&K
meaning the primary mass-dependent
distribution by Duchene & Kraus (2013) (see their Table 1 and Figure 3). The user
can also select between the two distributions by Fisher et al. (2005) (stepped
and peaked, see their Table 3) and Raghavan et al. (2010) (see their Fig 16,
left). In practice they all look somewhat similar, as shown in the figure below for a
random IMF mass sampling.

The Fisher distributions (top row) favor \(q\) values closer to unity (i.e.: secondary masses that are similar to the primary masses), while the Raghavan and Duchene & Kraus distributions (bottom row) look a bit more uniform.
The user can also select a float value for gamma
, which will be used as an
exponent in the power-law function \(f(q) \approx q^{\gamma}\). The figure below
shows this distribution for three gamma
(\(\gamma\)) values, where gamma=0
means a uniform distribution.

Only the Duchene & Kraus distribution is primary-mass dependent. The Fisher and Raghavan
distributions, as well as the distributions set by the user via a float value for
gamma
, are independent of mass values.
Calibrating#
The calibration process is applied after instantiating a asteca.Synthetic
object, named here synthcl
as described in the previous section. This process
is optional and it is aimed at collecting data from an observed cluster loaded in
a asteca.Cluster
object (which we name here my_cluster
, see
Cluster module).
The calibration is performed via the asteca.Synthetic.calibrate()
method:
# Synthetic cluster calibration
synthcl.calibrate(my_cluster)
This will extract the following information from the observed cluster:
maximum observed photometric magnitude
number of observed stars
distribution of photometric uncertainties
The algorithm employed by ASteCA is to simply transport the observed uncertainty values in magnitude and color(s) to the generated synthetic stars. This way no approximation to the distribution of photometric uncertainties is required.
As stated, this process is optional. The user can generate synthetic clusters without
calibrating the synthcl
object. In this case, the synthetic clusters will be
generated with a given number of observed stars (default value is 100 but the user can
select any other value), the maximum photometric magnitude allowed by the loaded
isochrones, and no photometric uncertainties added. The following section explains this
process in more detail.
Generating#
To generate synthetic clusters the user is required to pass a dictionary with
fundamental parameters to the asteca.Synthetic.generate()
method.
ASteCA currently requires eight parameters, related to the following intrinsic and
extrinsic cluster characteristics:
Intrinsic: metallicity (
met
), age (loga
), and binarity (alpha, beta
)Extrinsic: distance modulus (
dm
) and extinction related parameters (total extinctionAv
, differential reddeningDR
, ratio of total to selective extinctionRv
)
These eight parameters are described in more depth in the following sub-sections. ASteCA also allows estimating the cluster’s mass and binary fraction for an observed cluster. This process is optional and requires dictionaries with fitted fundamental parameters and their STDDEVS (see Mass and binarity for more details).
An example of the dictionary of parameters used for the generation of a synthetic
cluster is shown below, applied to a previously defined synthcl
object:
# Define model parameters
params = {
"met": 0.01,
"loga": 9.87,
"alpha": 0.01,
"beta": 1.,
"Rv": 3.1,
"dm": 11.3,
"Av": 0.15,
"DR": 0.2,
}
# Generate the synthetic cluster
synth_clust = synthcl.generate(params)
The returned synth_clust
variable will hold a numpy
array with the synthetic
cluster data. The notebook Generate synthetic clusters contains more information and examples
on how to generate and process synthetic clusters with ASteCA.
Important
The asteca.Synthetic
class includes a def_params
argument with
a dictionary of default values for all the fundamental parameters. This means
that the user could call synthcl.generate()
with no params
dictionary,
and the method will still generate a synthetic cluster. This also allows the
user to pass a params
dictionary with only a few parameters
(e.g.: params={"met": 0.02, "dm": 12.7}
), and the remaining parameters will
inherit the default values. More details in Generate synthetic clusters.
Intrinsic parameters#
The valid ranges for the metallicity and logarithmic age are inherited from the
theoretical isochrone(s) loaded in the asteca.Isochrones
object.
The metallicity, met
, can be modeled either as z
or (logarithmic) FeH
as
explained in section Isochrones module. The age parameter, loga
, is modeled
as the logarithmic age.
The alpha, beta
parameters determine the fraction of binary systems
in a synthetic cluster through the equation:
where \(P_b(m_1)\) is the probability that a star of (primary) mass \(m_1\) is part of a binary system. This equation comes from a fit to the multiplicity fraction presented in Offner et al. (2023) (see their Fig. 1 and Table 1). The multiplicity fraction values in this work are primary mass dependent, meaning that larger masses have much larger probabilities of being part of a binary (or higher order) system than low mass stars.
The values alpha=0.09, beta=0.94
produce a very reasonable fit to this multiplicity
fraction distribution:

These are thus suggested as fixed values for the alpha, beta
parameters. The user
can of course choose to fit either or both of them, or fix them to different values. For
example, fixing alpha=0.5, beta=0.0
would produce a synthetic cluster with
approximately 50% of binary systems, distributed uniformly across masses
(i.e.: not primary mass dependent).
Extrinsic parameters#
The extrinsic parameters are related to two external processes affecting stellar
clusters: their distance and the extinction associated to their line of sight. The
distance is measured by the distance modulus dm
, which is the amount added to the
photometric magnitude to position the cluster at the proper distance from us.
The three remaining parameters are linked to the extinction process: the total
extinction Av
, the ratio of total to selective extinction Rv
, and the
differential reddening DR
.
The first two are related through the equation:
Finally, the differential reddening parameter DR
adds random scatter to the cluster
stars affected by Av
. The distribution for this scatter is controlled setting the
argument DR_distribution
when the synthetic
object is instantiated (as
explained in Defining the object), which can currently be either a uniform or a
normal distribution.
Mass and binarity#
Using methods available in the asteca.Synthetic
class, we can estimate
for an observed cluster:
The individual stellar masses and their probability of being binary systems,
the total binary fraction of the cluster, and
the different masses associated to the cluster
The Masses and binary fraction tutorial contains more details and examples on how to perform these analyses.
Regarding the cluster masses, ASteCA estimates several different masses for the cluster, as explained below.
The total initial mass of a cluster can be split in several parts, as follows:
where \(M_{i}\) is the initial mass, \(M_{a}\) is the actual mass, \(M_{evol}\) is the mass lost via stellar evolution, and \(M_{dyn}\) is the mass lost through dynamical effects (or dissolution). The actual mass \(M_{a}\) can be further split as:
where \(M_{obs}\) is the observed mass (e.g.: the sum of individual stellar masses in the observed CMD) and \(M_{phot}\) is the mass unobserved due to photometric effects (i.e: the low mass stars beyond the maximum magnitude cut). The total initial mass can thus be written as the sum of all of its components as:
The actual mass \(M_{a}\) is estimated by ASteCA combining the observed and photometric masses. The observed mass \(M_{obs}\) is approximated as the sum of the individual stellar masses of many synthetic clusters, sampled with parameters matching those of the observed cluster. The photometric mass \(M_{phot}\) is inferred by summing the mass that exists below the mass value associated to the maximum observed magnitude in the cluster. This requires sampling an IMF with a very large mass, and obtaining the ratio of \(M_{obs}\) to total mass; this ratio is the applied to the sum of masses below the mass cut in the IMF to estimate \(M_{phot}\). As stated above, the sum of these two masses is equivalent to \(M_{a}\).
Following Lamers et al. (2005) Eq. 7, the initial mass can be estimated via:
where \(M_{a}\) is the actual mass, \(t\) is the cluster’s age, \(\mu_{\text{evol}}(Z, t)\) is the “fraction of the initial mass of the cluster that would have remained at age t, if stellar evolution would have been the only mass loss mechanism”, \({\gamma}\) is a constant, and \(t_{0}\) is “a constant that depends on the tidal field of the particular galaxy in which the cluster moves and on the ellipticity of its orbit”.
The \(\gamma\) constant is usually set to 0.62 and the \(\mu_{\text{evol}}(Z, t)\) parameter can be estimated using a 3rd degree polynomial as shown in Lamers, Baumgardt & Gieles (2010), Table B2.
The dissolution parameter \(t_0\) of a cluster is the hypothetical dissolution time-scale of a cluster of 1 \(M_{\odot}\) and is related to the disruption time \(t_{dis}\) (defined as the time when 5% of the initial number of stars remain in the cluster) via:
Furthermore, \(t_0\) is expected to depend on the ambient density \(\rho_{amb}\) at the location of the clusters in the Galaxy as:
where \(C_{env}\) is a constant set to 810 Myr (Lamers, Gieles & Zwart 2005), \(\epsilon\) is the eccentricity of the orbit, and \(\rho_{amb}\) is the ambient density which depends on the adopted gravitational potential field.
Following Angelo et al. (2023), ASteCA uses by default \(\epsilon=0.08\) and estimates \(\rho_{amb}\) as:
where \(\phi_B(r),\, \phi_D(\rho, z),\, \phi_H(r)\) are the bulge, disc and halo potentials, respectively (see Eqs 8, 9 and 10 of the Angelo et al. article to see how these are modeled). The user can also use a custom \(\rho_{\text{amb}}\) value, bypassing this estimation.
Plugging these values into Eq (2), we can obtain an estimate of \(M_{i}\). With this value we can then obtain \(M_{evol}\) through the \(\mu_{\text{evol}}(Z, t)\) parameter as:
Finally, the last remaining mass is the dynamical mass which we estimate simply using Eq (1) as:
The distributions for these masses are obtained through a bootstrap process that takes the uncertainties in the fundamental parameters into account.