asteca.synthetic
#
Module Contents#
Classes#
Define a |
- class asteca.synthetic.synthetic#
Define a
synthetic
object.Use the isochrones loaded in the
asteca.isochrones
object to generate aasteca.synthetic
object. This object is used to generate synthetic clusters given aasteca.cluster
object and a set of input fundamental parameters (metallicity, age, distance, extinction, etc.).See the Synthetic clusters section for more details.
- Parameters:
isochs (
isochrones
) –asteca.isochrones
object with the loaded files for the theoretical isochrones.IMF_name (str, {"salpeter_1955", "kroupa_2001", "chabrier_2014"}, default="chabrier_2014") – Name of the initial mass function used to populate the isochrones.
max_mass (int, default=100_000) – Maximum total initial mass. Should be large enough to allow generating as many synthetic stars as observed stars.
gamma (str, float, {"D&K", "fisher_stepped", "fisher_peaked", "raghavan"}, default="D&K") – Distribution function for the mass ratio of the binary systems.
DR_distribution (str, {"uniform", "normal"}, default="uniform") – Distribution function for the differential reddening.
seed (int, optional, default=None) – Random seed. If
None
a random integer will be generated and used.
- calibrate(cluster, fix_params: dict = {}, z_to_FeH: float | None = None)#
Calibrate a
asteca.synthetic
object based on aasteca.cluster
object and a dictionary of fixed fundamental parameters (fix_params
).Use the data obtained from your observed cluster stored in the
asteca.cluster
object, to calibrate aasteca.synthetic
object. Additionally, a dictionary of fixed fundamental parameters (metallicity, age, distance, extinction, etc.) can be passed.See the Synthetic clusters section for more details.
- Parameters:
cluster (
cluster
) –asteca.cluster
object with the processed data from your observed cluster.fix_params (dict, optional, default={}) – Dictionary with the values for the fixed parameters (if any).
z_to_FeH (float, optional, default=None) – If
None
, the defaultz
values (defined when loading the isochrones via theasteca.isochrones
object) will be used to generate the synthetic clusters. Iffloat
, it must represent the solar metallicity for these isochrones. The metallicity values will then be converted to[FeH]
values, to be used by thesynthetic.generate()
method.
- min_max() tuple[float] #
Return the minimum and maximum values for the metallicity and age defined in the theoretical isochrones.
- Returns:
Tuple of (minimum_metallicity, maximum_metallicity, minimum_age, maximum_age)
- Return type:
tuple[float]
- generate(fit_params: dict) numpy.ndarray #
Generate a synthetic cluster.
The synthetic cluster is generated according to the parameters given in the
fit_params
dictionary and the already calibratedasteca.synthetic
object.- Parameters:
fit_params (dict) – Dictionary with the values for the fundamental parameters that were not included in the
fix_params
dictionary when theasteca.synthetic
object was calibrated (synthetic.calibrate()
method).- Returns:
Return a
np.array
containing a synthetic cluster with the shape[mag, c1, (c2)]
, wheremag
is the magnitude dimension, andc1
andc2
(last one is optional) are the color dimension(s).- Return type:
array[mag, c1, (c2)]
- synthplot(fit_params, ax=None, isochplot=False)#
Generate a color-magnitude plot for a synthetic cluster.
The synthetic cluster is generated using the fundamental parameter values given in the
fit_params
dictionary.- Parameters:
fit_params (dict) – Dictionary with the values for the fundamental parameters that were not included in the
fix_params
dictionary when theasteca.synthetic
object was calibrated (synthetic.calibrate()
method).ax (matplotlib.axis, optional, default=None) – Matplotlib axis where to draw the plot.
isochplot (bool, default=False) – If
True
, the accompanying isochrone will be plotted.
- Returns:
Matplotlib axis object
- Return type:
matplotlib.axis
- masses_binary_probs(model, model_std)#
Estimate individual masses for the observed stars, along with their binary probabilities (if binarity was estimated).
- Parameters:
model (dict) – Dictionary with the values for the fundamental parameters that were not included in the
fix_params
dictionary when theasteca.synthetic
object was calibrated (synthetic.calibrate()
method).model_std (dict) – Dictionary with the standard deviations for the fundamental parameters in the
model
argument.
- Returns:
pandas.DataFrame – Data frame containing per-star primary and secondary masses along with their uncertainties, and their probability of being a binary system.
numpy.array – Distribution of total binary fraction values for the cluster.