Applied Data Science Case Study

Ranking candidate variable stars from Rubin Observatory variability metrics.

A lightweight, reproducible workflow that converts object-level g-band variability statistics into a ranked candidate set for downstream astronomical analysis.

View Results Technical Notebook Candidate Export
5,000sampled DiaObject rows used for the demo
14object-level g-band features loaded
2primary variability metrics combined
Top 5%objects selected as candidate variable stars

Business and scientific objective

Frame: reduce a large astronomical object table into a prioritized review list.

Problem

Identify high-priority variable star candidates

Large sky-survey datasets contain many sources with limited variability signal. The task is to rank objects by evidence of non-constant brightness so analysts can focus follow-up work on the strongest candidates.

Outcome

Ranked candidate catalog

The workflow produces a candidate table with object identifiers, diagnostic variability metrics, and a composite score that can feed later validation, visualization, or classification work.

Data foundation

Rubin Observatory DiaObject summary metrics, sampled for reproducibility.

The notebook queries object-level g-band variability features from the Rubin Observatory dp1.DiaObject table, then exports a 5,000-row sample to keep the demo portable. The selected fields include coordinates, flux summary statistics, observation counts, uncertainty estimates, and variability metrics.

SELECT TOP 1000000 diaObjectId, dec, ra, g_psfFluxErrMean, g_psfFluxLinearSlope,
g_psfFluxMAD, g_psfFluxMax, g_psfFluxMean, g_psfFluxMeanErr,
g_psfFluxMin, g_psfFluxNdata, g_psfFluxSigma, g_psfFluxStetsonJ, g_psfFluxChi2
FROM dp1.DiaObject

For a public portfolio version, the authenticated Rubin query is treated as the source extraction step, while the sampled CSV is the reproducible demo input.

Workflow

A simple pipeline from raw metrics to candidate selection.

Load

Read the sampled g-band DiaObject dataset and inspect shape, columns, null values, and feature ranges.

Explore

Visualize variability distributions and the relationship between flux dispersion and Stetson J.

Filter

Retain records with positive g_psfFluxSigma and g_psfFluxStetsonJ so log-scale diagnostics are interpretable.

Score

Standardize complementary variability metrics and combine them into a single ranking index.

Select

Sort objects by the composite score and select the top 5% as candidate variable stars.

Export

Save the ranked candidate set for downstream review, validation, and modeling.

Candidate scoring method

A transparent ranking score designed for interpretability.

Metric 1

Reduced chi-square: g_psfFluxChi2

Measures deviation from constant brightness relative to photometric uncertainty. Higher values suggest stronger evidence against a constant-flux source.

Metric 2

Stetson J: g_psfFluxStetsonJ

Captures correlated variability structure across observations. Higher positive values are treated as stronger variability evidence.

Composite score

Because the two metrics live on different scales, each is standardized before summation.

VarIndex = z(g_psfFluxChi2) + z(g_psfFluxStetsonJ)

Objects with higher VarIndex values exhibit stronger and more consistent variability signals across both metrics.

Results and diagnostics

The high-variability tail becomes the candidate review set.

Histogram of g-band variability sigma

Distribution of g-band flux sigma. The right-skewed tail motivates ranked candidate selection.

Scatter plot of Stetson J versus sigma

Log-log relationship between flux sigma and Stetson J. Sparse upper-right regions indicate stronger variability signatures.

Candidate variable star selection scatter plot

Top-scoring candidates cluster in the upper-right region of variability space, consistent with stronger non-constant brightness behavior.

Top ranked candidates

First ten objects after sorting by composite variability score.

diaObjectIdg_psfFluxChi2g_psfFluxStetsonJVarIndex
579576630817594587482,363.000339.03854421.804609
628762458852426088761,798.000103.97490518.049122
61443616593988813985,812.100262.25454411.318546
5795753251475296075,817.99041.4639711.290933
6287690559221935026,432.19040.3204101.258518
6304074656865322555,544.98037.7927911.144264
6144370592930905056,958.57032.2521460.957558
5795786236824128731,250.08033.2424820.887375
5795780052071228861,736.32028.1770150.701381
628767200496320531812.24327.8233230.670210

The highest ranked objects are not asserted as confirmed variable stars. They are prioritized candidates for downstream validation.

Limitations and next steps

What this demo does and does not claim.

Limitations
  • Candidate ranking only; no confirmed classification labels are used.
  • Uses g-band summary metrics rather than full light-curve time-series modeling.
  • Threshold selection is intentionally simple and should be calibrated for production use.
  • Authentication-dependent query execution is separated from the public reproducible sample.
Next steps
  • Add multi-band variability features and color information.
  • Engineer period, amplitude, and light-curve morphology features.
  • Validate against labeled variable-star catalogs.
  • Compare threshold ranking with clustering or supervised classification models.
Portfolio positioning: This case study demonstrates applied data-science judgment: translating a domain problem into an interpretable scoring workflow, documenting assumptions, surfacing limitations, and producing reusable outputs.