Membership#
- class asteca.Membership(my_field: Cluster, seed: int | None = None, verbose: int = 1)#
Bases:
objectDefine a
Membershipobject.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 introducedASteCA. The method requires(RA, DEC)data and will use any extra data dimensions stored in theClusterobject, 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 theClusterobject. Photometry data is not employed.- Parameters:
- Raises:
ValueError – If there are missing required attributes in the
Clusterobject
Methods Summary
bayesian([N_runs, eq_to_gal])Assign membership probabilities.
fastmp([fixed_centers, N_runs, eq_to_gal])Assign membership probabilities.
Methods Documentation
- bayesian(N_runs: int = 1000, eq_to_gal: bool = False) ndarray#
Assign membership probabilities.
Estimate the probability of being a true cluster member for all observed stars, using a Bayesian algorithm. The
radec_candradiusattributes are required to be present in theClusterobject.- Parameters:
N_runs (int) – Maximum number of runs, defaults to
1000eq_to_gal (bool) – Convert
(RA, DEC)to(lon, lat). Useful for clusters with largeDECvalues to reduce the frame’s distortion, defaults toFalse
- Raises:
- 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) 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)andplxare required.- Parameters:
fixed_centers (bool) – If
Truethe center values (radec_c, pms_c, plx_c) stored in theClusterobject will be kept fixed throughout the process, defaults toFalseN_runs (int) – Maximum number of resamples, defaults to
1000eq_to_gal (bool) – Convert
(RA, DEC)to(lon, lat). Useful for clusters with largeDECvalues to reduce the frame’s distortion, defaults toTrue
- Raises:
AttributeError – If the
Clusterobject is missing a required attribute:(ra, dec, pmra, pmde, plx, e_pmra, e_pmde, e_plx, radec_c, pms_c, plx_c)ValueError – If the
N_runsparameter is less than 10
- Returns:
Membership probabilities for all stars in the frame
- Return type:
np.ndarray