In [36]:
%matplotlib inline
import matplotlib.pyplot as plt
from astropy.table import Table
import numpy as np
In [27]:
data = Table.read("tc-apogee-dr12-regularized-release.fits.gz")
In [37]:
from collections import Counter
fields = np.array([each.strip() for each in data["FIELD"]])
counter_fields = Counter(fields)
cluster_candidate_fields = {}
for k, v in counter_fields.items():
if k.startswith(("M", "N", "P")):
cluster_candidate_fields[k] = v
print(k, v)
print("Sum: {}".format(sum(cluster_candidate_fields.values())))
In [44]:
# Plot and cull.
for cluster_name, num_candidates in cluster_candidate_fields.items():
candidate = (fields == cluster_name) * np.isfinite(data["TEFF"])
fig, axes = plt.subplots(1, 2)
axes[0].set_title(cluster_name)
scat = axes[0].scatter(data["TEFF"][candidate], data["LOGG"][candidate], c=data["FE_H"][candidate],
alpha=0.5)
axes[0].set_xlim(6000, 3000)
axes[0].set_ylim(4.5, 0)
axes[0].text(0.05, 0.95, "{} candidates".format(candidate.sum()), transform=ax.transAxes)
axes[1].scatter(data["VHELIO_AVG"][candidate], data["FE_H"][candidate], alpha=0.5)
cbar = plt.colorbar(scat)
In [ ]:
membership_criteria = {
# Cluster: (low_vel, upper_vel, low_feh, upper_feh)
"M54SGRC1": (100, 200, None, None),
"N6229": (-125, -175, -0.76, -1.5),
"M2": (-50, +50, -1.25, -1.75),
"M5PAL5": (25, 75, -0.75, -1.5),
"M3": (-125, -175, -1, -2),
"M53": (-25, -125, -1.5, -2),
"M92": (-50, -200, -1.75, -2),
"M15": (-250, 0, -1.75, -2),
"M67": (None, None, -0.5, 0.5),
"M71": (-30, -15, -0.5, -1.0),
"N5466": (100, 200, None, None),
"M13": (-225, -275, -1.0, -2.0)
}