asteca.synthetic#

Module Contents#

Classes#

synthetic

Define a synthetic object.

class asteca.synthetic.synthetic#

Define a synthetic object.

Use the isochrones loaded in the asteca.isochrones object to generate a asteca.synthetic object. This object is used to generate synthetic clusters given a asteca.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 a asteca.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 a asteca.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 default z values (defined when loading the isochrones via the asteca.isochrones object) will be used to generate the synthetic clusters. If float, it must represent the solar metallicity for these isochrones. The metallicity values will then be converted to [FeH] values, to be used by the synthetic.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 calibrated asteca.synthetic object.

Parameters:

fit_params (dict) – Dictionary with the values for the fundamental parameters that were not included in the fix_params dictionary when the asteca.synthetic object was calibrated (synthetic.calibrate() method).

Returns:

Return a np.array containing a synthetic cluster with the shape [mag, c1, (c2)], where mag is the magnitude dimension, and c1 and c2 (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 the asteca.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 the asteca.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.