asteca.membership#

Module Contents#

Classes#

Membership

Define a Membership object.

API#

class asteca.membership.Membership(my_field: asteca.cluster.Cluster, seed: int | None = None)#

Define a Membership object.

This object is used as a container for membership probabilities methods. Currently two methods are included:

bayesian() : The algorithm was described in detail in the article were we originally introduced ASteCA. The method requires (RA, DEC) data and will use any extra data dimensions stored in the Cluster object, i.e.: photometry, proper motions, and parallax. A minimum of two data dimensions are required.

fastmp() : The algorithm was described in detail in the article were we introduced the Unified Cluster Catalogue (UCC). The method requires proper motions, and parallax data dimensions stored in the Cluster object. Photometry data is not employed.

Parameters:
  • my_field (Cluster) – Cluster object with the loaded data for the observed field

  • seed (int | None) – Random seed. If None a random integer will be generated and used, defaults to None

Raises:

ValueError – If there are missing required attributes in the Cluster object

Methods

bayesian(N_runs: int = 1000, eq_to_gal: bool = False) numpy.ndarray#

Assign membership probabilities.

Estimate the probability of being a true cluster member for all observed stars, using a Bayesian algorithm. The radec_c and radius attributes are required to be present in the Cluster object.

Parameters:
  • N_runs (int) – Maximum number of runs, defaults to 1000

  • eq_to_gal (bool) – Convert (RA, DEC) to (lon, lat). Useful for clusters with large DEC values to reduce the frame’s distortion, defaults to False

Raises:

AttributeError – If either the radec_c or radius attributes are missing from the Cluster object

Returns:

Membership probabilities for all stars in the frame

Return type:

np.ndarray

fastmp(fixed_centers: bool = False, N_runs: int = 1000, eq_to_gal: bool = True) numpy.ndarray#

Assign membership probabilities.

Estimate the probability of being a true cluster member for all observed stars using the fastMP algorithm. The following data dimensions are required: (pmRA, pmDE, plx); photometry is not employed. Center estimates in (RA, DEC), as well as (pmRA, pmDE) and plx are required.

Parameters:
  • fixed_centers (bool) – If True the center values (radec_c, pms_c, plx_c) stored in the Cluster object will be kept fixed throughout the process, defaults to False

  • N_runs (int) – Maximum number of resamples, defaults to 1000

  • eq_to_gal (bool) – Convert (RA, DEC) to (lon, lat). Useful for clusters with large DEC values to reduce the frame’s distortion, defaults to True

Raises:

ValueError – If the Cluster object is missing a required attribute: (ra, dec, pmra, pmde, plx, e_pmra, e_pmde, e_plx, radec_c, pms_c, plx_c)

Returns:

Membership probabilities for all stars in the frame

Return type:

np.ndarray