Decoding the Stars: Classifying RR Lyrae Variables using H-R Diagram Analysis
Decoding the Stars: Classifying RR Lyrae Variables using H-R Diagram Analysis
In the vast expanse of our galaxy, RR Lyrae variables serve as critical "standard candles," allowing astronomers to measure cosmic distances with remarkable precision. However, identifying these stars—specifically the RRab type (fundamental mode pulsators)—among millions of candidates is a daunting task.
In this post, we dive into a sophisticated empirical approach to star classification. By leveraging data from the Gaia DR2 and ASAS-SN surveys, we can implement a rule-based classifier that uses the Hertzsprung-Russell (H-R) diagram to separate true RRab stars from the cosmic noise.
The Core Intuition: The "Gold Standard" Approach
The fundamental thesis of this research is simple yet powerful: Physical characteristics cluster.
If a star is truly an RR Lyrae type ab (RRab), its absolute magnitude ($M_G$) and effective temperature ($T_{eff}$) will fall within a specific, predictable region of the H-R diagram. By establishing a "Gold Standard" sample group from trusted catalogs (GCVS and AAVSO), we can define the boundaries of this cluster and use them as a benchmark to classify "uncertain" candidates.
The Mathematical Foundation
To move from observed data to physical properties, the study relies on the distance modulus formula, which accounts for interstellar extinction (the dimming of light by cosmic dust):
$$M = m - A - 5 \log_{10}\left(\frac{d}{10}\right)$$
Where:
- $M$: Absolute Magnitude
- $m$: Apparent Magnitude
- $A$: Interstellar Extinction
- $d$: Distance in parsecs
Once $M_G$ is calculated, the classification follows a strict logic: $$\text{If } M_G < +1.2 \text{ and } T_{eff} > 5,100\text{ K} \implies \text{Subgroup 1 (Likely RRab)}$$
System Architecture
The classification pipeline transforms raw survey data into a probability assessment through a series of filtering and calculation steps.
Implementation in Python
Below is the production-ready implementation of the RRabClassifier. This code handles the physics calculations and the rule-based logic used to categorize the stars.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from typing import Tuple, List
class RRabClassifier:
"""
Implementation of the RR Lyrae type ab (RRab) classification algorithm
based on the H-R diagram approach.
"""
def __init__(self):
# Thresholds derived from empirical 'Gold Standard' analysis
self.MG_THRESHOLD = 1.2
self.TEFF_THRESHOLD = 5100.0
def calculate_absolute_magnitude(self, m_g: float, a_g: float, d_pc: float) -> float:
"""
Calculates absolute magnitude using the distance modulus formula:
M = m - 5 * log10(d / 10) - A
"""
return m_g - 5 * np.log10(d_pc) + 5 - a_g
def classify_star(self, mg: float, teff: float) -> str:
"""
Rule-based clustering logic:
Subgroup 1: Likely RRab
Subgroup 2/3: Unlikely
"""
if mg < self.MG_THRESHOLD and teff > self.TEFF_THRESHOLD:
return "Subgroup 1 (Likely RRab)"
elif mg < self.MG_THRESHOLD and teff < self.TEFF_THRESHOLD:
return "Subgroup 2 (Unlikely)"
else:
return "Subgroup 3 (Unlikely)"
def assess_probability(self, mg: float, teff: float) -> str:
"""Maps subgroup classification to qualitative assessment."""
group = self.classify_star(mg, teff)
return "Likely/Very Likely" if "Subgroup 1" in group else "Unlikely/Very Unlikely"
# --- Execution Block ---
if __name__ == '__main__':
# Data from ASAS-SN uncertain candidates
unc_rrab_data = {
'Name': [
'ASASSN-V J164146.37+172103.9', 'ASASSN-V J091010.02-680737.9',
'ASASSN-V J111550.35-622141.7', 'ASASSN-V J211849.36+321343.2',
'ASASSN-V J084042.84-455307.7', 'ASASSN-V J075537.08-330027.2',
'ASASSN-V J053827.67-021055.8'
],
'Gmag': [14.877, 13.635, 14.799, 14.309, 12.609, 15.287, 14.901],
'Teff': [6707, 6993, 5250, 6463, 5748, 5143, 5665],
'AG': [1.1673, 1.3260, 1.0108, 1.1390, 2.0180, 0.7813, 1.7165],
'd': [7623.34, 3359.43, 1311.48, 1763.77, 1931.96, 1278.63, 3853.38]
}
df_unc = pd.DataFrame(unc_rrab_data)
classifier = RRabClassifier()
results = []
for idx, row in df_unc.iterrows():
mg = classifier.calculate_absolute_magnitude(row['Gmag'], row['AG'], row['d'])
assessment = classifier.assess_probability(mg, row['Teff'])
results.append({'Name': row['Name'], 'MG': mg, 'Teff': row['Teff'], 'Assessment': assessment})
df_results = pd.DataFrame(results)
print(df_results[['Name', 'MG', 'Assessment']])
Analysis of Results
The power of this method lies in its ability to filter out "impostors." By plotting the results on an H-R diagram, we can visually confirm the classification:
- The Cluster: The majority of confirmed RRab stars form a dense cloud in the upper-left quadrant (High $T_{eff}$, Low $M_G$).
- The Outliers: Candidates that fall into Subgroup 2 or 3 are physically inconsistent with RRab variables, regardless of their light-curve appearance.
- The Verdict: This method allows astronomers to prune survey catalogs, ensuring that only the most probable candidates are targeted for expensive follow-up spectroscopic observations.
Final Thoughts
By combining the precision of Gaia's astrometry with a rule-based empirical model, we can automate the identification of RR Lyrae stars. This approach transforms a complex astrophysical problem into a manageable data science pipeline: Data Extraction $\rightarrow$ Physical Feature Engineering $\rightarrow$ Rule-Based Classification.
For those interested in stellar kinematics or galactic mapping, this methodology provides a scalable blueprint for classifying other variable star types across the Milky Way.