asteca.membership
#
Module Contents#
Classes#
Define a |
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 introducedASteCA
. The method requires(RA, DEC)
data and will use any extra data dimensions stored in theCluster
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 theCluster
object. Photometry data is not employed.- Parameters:
- 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
andradius
attributes are required to be present in theCluster
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 largeDEC
values to reduce the frame’s distortion, defaults toFalse
- Raises:
AttributeError – If either the
radec_c
orradius
attributes are missing from theCluster
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)
andplx
are required.- Parameters:
fixed_centers (bool) – If
True
the center values (radec_c, pms_c, plx_c) stored in theCluster
object will be kept fixed throughout the process, defaults toFalse
N_runs (int) – Maximum number of resamples, defaults to
1000
eq_to_gal (bool) – Convert
(RA, DEC)
to(lon, lat)
. Useful for clusters with largeDEC
values to reduce the frame’s distortion, defaults toTrue
- 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