epoch_id int64 0 99k | bjd float64 2.46M 2.46M | obs_x float64 -1.01 1.02 | obs_y float64 -0.64 0.62 | obs_z float64 -0.01 0.01 |
|---|---|---|---|---|
0 | 2,461,447.917416 | -0.78773 | 0.61321 | 0.005062 |
1 | 2,461,448.204097 | -0.790863 | 0.6092 | 0.005066 |
2 | 2,461,448.490779 | -0.79398 | 0.605173 | 0.00507 |
3 | 2,461,449.064141 | -0.800147 | 0.59708 | 0.005074 |
4 | 2,461,449.350823 | -0.8032 | 0.59301 | 0.005076 |
5 | 2,461,449.637504 | -0.806233 | 0.588923 | 0.005077 |
6 | 2,461,449.924186 | -0.809247 | 0.584823 | 0.005078 |
7 | 2,461,450.210867 | -0.81224 | 0.580707 | 0.005078 |
8 | 2,461,450.78423 | -0.818163 | 0.572433 | 0.005077 |
9 | 2,461,451.070911 | -0.821093 | 0.568273 | 0.005075 |
10 | 2,461,451.357593 | -0.824003 | 0.5641 | 0.005073 |
11 | 2,461,451.644274 | -0.82689 | 0.559913 | 0.005071 |
12 | 2,461,451.930955 | -0.829757 | 0.555713 | 0.005068 |
13 | 2,461,452.217637 | -0.832603 | 0.551497 | 0.005064 |
14 | 2,461,452.504318 | -0.83543 | 0.547267 | 0.00506 |
15 | 2,461,452.791 | -0.838233 | 0.543023 | 0.005056 |
16 | 2,461,453.077681 | -0.841017 | 0.538767 | 0.005051 |
17 | 2,461,453.364362 | -0.843777 | 0.534497 | 0.005045 |
18 | 2,461,453.651044 | -0.846517 | 0.530213 | 0.005039 |
19 | 2,461,453.937725 | -0.849237 | 0.525917 | 0.005032 |
20 | 2,461,454.224406 | -0.851933 | 0.521607 | 0.005025 |
21 | 2,461,454.511088 | -0.854607 | 0.517283 | 0.005017 |
22 | 2,461,454.797769 | -0.857263 | 0.512947 | 0.005009 |
23 | 2,461,455.084451 | -0.859893 | 0.508597 | 0.005 |
24 | 2,461,455.371132 | -0.862503 | 0.504233 | 0.004991 |
25 | 2,461,455.657813 | -0.865093 | 0.49986 | 0.004982 |
26 | 2,461,455.944495 | -0.86766 | 0.495473 | 0.004971 |
27 | 2,461,456.231176 | -0.870203 | 0.491073 | 0.00496 |
28 | 2,461,456.517858 | -0.872727 | 0.48666 | 0.004949 |
29 | 2,461,456.804539 | -0.875227 | 0.482237 | 0.004937 |
30 | 2,461,457.09122 | -0.877703 | 0.4778 | 0.004925 |
31 | 2,461,457.377902 | -0.88016 | 0.473353 | 0.004912 |
32 | 2,461,457.664583 | -0.882593 | 0.468893 | 0.004899 |
33 | 2,461,457.951265 | -0.885007 | 0.464423 | 0.004885 |
34 | 2,461,458.237946 | -0.887397 | 0.45994 | 0.004871 |
35 | 2,461,458.524627 | -0.889763 | 0.455447 | 0.004856 |
36 | 2,461,458.811309 | -0.892107 | 0.45094 | 0.004841 |
37 | 2,461,459.09799 | -0.894427 | 0.446423 | 0.004825 |
38 | 2,461,459.384671 | -0.896727 | 0.441893 | 0.004809 |
39 | 2,461,459.671353 | -0.899003 | 0.437357 | 0.004792 |
40 | 2,461,459.958034 | -0.901257 | 0.432807 | 0.004775 |
41 | 2,461,460.244716 | -0.90349 | 0.428247 | 0.004757 |
42 | 2,461,460.531397 | -0.905697 | 0.423673 | 0.004738 |
43 | 2,461,460.818078 | -0.907883 | 0.419093 | 0.00472 |
44 | 2,461,461.10476 | -0.910043 | 0.4145 | 0.0047 |
45 | 2,461,461.391441 | -0.912183 | 0.409897 | 0.004681 |
46 | 2,461,461.678123 | -0.9143 | 0.405287 | 0.004661 |
47 | 2,461,461.964804 | -0.916393 | 0.400663 | 0.00464 |
48 | 2,461,462.251485 | -0.918463 | 0.39603 | 0.004619 |
49 | 2,461,462.538167 | -0.920513 | 0.39139 | 0.004597 |
50 | 2,461,462.824848 | -0.922537 | 0.386737 | 0.004575 |
51 | 2,461,463.11153 | -0.924537 | 0.382077 | 0.004552 |
52 | 2,461,463.398211 | -0.926513 | 0.377407 | 0.004529 |
53 | 2,461,463.684892 | -0.92847 | 0.372727 | 0.004506 |
54 | 2,461,463.971574 | -0.9304 | 0.368037 | 0.004482 |
55 | 2,461,464.258255 | -0.932307 | 0.36334 | 0.004457 |
56 | 2,461,464.544936 | -0.93419 | 0.358633 | 0.004432 |
57 | 2,461,464.831618 | -0.936053 | 0.353917 | 0.004407 |
58 | 2,461,465.118299 | -0.93789 | 0.349193 | 0.004381 |
59 | 2,461,465.404981 | -0.939703 | 0.34446 | 0.004355 |
60 | 2,461,465.691662 | -0.941493 | 0.339717 | 0.004328 |
61 | 2,461,465.978343 | -0.943257 | 0.33497 | 0.004301 |
62 | 2,461,466.265025 | -0.945 | 0.330211 | 0.004274 |
63 | 2,461,466.551706 | -0.94672 | 0.325445 | 0.004245 |
64 | 2,461,466.838388 | -0.948413 | 0.320672 | 0.004217 |
65 | 2,461,467.125069 | -0.950087 | 0.31589 | 0.004188 |
66 | 2,461,467.41175 | -0.951733 | 0.311101 | 0.004159 |
67 | 2,461,467.698432 | -0.953357 | 0.306305 | 0.004129 |
68 | 2,461,467.985113 | -0.954957 | 0.301501 | 0.004099 |
69 | 2,461,468.271795 | -0.956533 | 0.296689 | 0.004068 |
70 | 2,461,468.558476 | -0.958083 | 0.291871 | 0.004037 |
71 | 2,461,468.845157 | -0.95961 | 0.287045 | 0.004006 |
72 | 2,461,469.131839 | -0.961113 | 0.282213 | 0.003974 |
73 | 2,461,469.705201 | -0.96405 | 0.272528 | 0.003909 |
74 | 2,461,469.991883 | -0.96548 | 0.267676 | 0.003876 |
75 | 2,461,470.278564 | -0.966887 | 0.262817 | 0.003842 |
76 | 2,461,470.565246 | -0.96827 | 0.257952 | 0.003809 |
77 | 2,461,470.851927 | -0.96963 | 0.253081 | 0.003774 |
78 | 2,461,471.138608 | -0.970963 | 0.248204 | 0.00374 |
79 | 2,461,471.42529 | -0.972273 | 0.243321 | 0.003705 |
80 | 2,461,471.711971 | -0.97356 | 0.238432 | 0.003669 |
81 | 2,461,471.998653 | -0.974823 | 0.233537 | 0.003633 |
82 | 2,461,472.285334 | -0.97606 | 0.228637 | 0.003597 |
83 | 2,461,472.572015 | -0.977273 | 0.223732 | 0.003561 |
84 | 2,461,472.858697 | -0.97846 | 0.218821 | 0.003524 |
85 | 2,461,473.145378 | -0.979623 | 0.213905 | 0.003487 |
86 | 2,461,473.43206 | -0.980763 | 0.208984 | 0.003449 |
87 | 2,461,473.718741 | -0.98188 | 0.204059 | 0.003411 |
88 | 2,461,474.005422 | -0.98297 | 0.199128 | 0.003373 |
89 | 2,461,474.292104 | -0.984037 | 0.194193 | 0.003334 |
90 | 2,461,474.578785 | -0.985077 | 0.189253 | 0.003295 |
91 | 2,461,474.865466 | -0.986093 | 0.184309 | 0.003256 |
92 | 2,461,475.152148 | -0.987087 | 0.179361 | 0.003216 |
93 | 2,461,475.438829 | -0.988057 | 0.174409 | 0.003176 |
94 | 2,461,475.725511 | -0.989 | 0.169452 | 0.003136 |
95 | 2,461,476.012192 | -0.989917 | 0.164492 | 0.003095 |
96 | 2,461,476.298873 | -0.99081 | 0.159528 | 0.003054 |
97 | 2,461,476.585555 | -0.99168 | 0.15456 | 0.003013 |
98 | 2,461,476.872236 | -0.992527 | 0.149589 | 0.002971 |
99 | 2,461,477.158918 | -0.993347 | 0.144614 | 0.002929 |
Machine Learning Tier
This dataset is a collection of synthetic microlensing light curves from the Nancy Grace Roman Space Telescope Galactic Bulge Time Domain Survey. It is intended for the training and benchmarking of machine learning models for microlensing event classification, parameter estimation, and anomaly detection.
The raw distribution of event properties is not representative of what Roman will see, but should span a statistically larger set of events. More representative samples can be drawn using the final_weight column, which is roughly proportional to the rate at which events occur relative to others in their class.
The machine learning tier data is provided as a set of normalized tables in Parquet format: RMDC26_ML_Data_obs.parquet, RMDC26_ML_Data_meta.parquet, and RMDC26_ML_Data_epoch.parquet.
Entity-Relationship Diagram
βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ
β metadata β β observations β β epochs β
βββββββββββββββββββββ€ βββββββββββββββββββββ€ βββββββββββββββββββββ€
β event_id (PK) ββββββββββ event_id (FK) β ββββΊβ epoch_id (PK) β
β name β β epoch_id (FK) βββββΌβββββ β bjd β
β sim_label β β filt β β obs_x β
β tE_helio β β flux_uJy β β obs_y β
β u0lens1 β β flux_err_uJy β β obs_z β
β β¦(physical params)β β true_flux_uJy β βββββββββββββββββββββ
βββββββββββββββββββββ β saturation_flag β
βββββββββββββββββββββ
Relationships:
- observations β metadata: many-to-one on
event_id(each event has one metadata record) - observations β epochs: many-to-one on
epoch_id(each epoch has many observations) - To reconstruct a full lightcurve: join all three tables on
event_idandepoch_id
Tables
1. Observations Table (_obs.parquet)
Contains the primary time-series data for all events.
| Column Name | Data Type | Description |
|---|---|---|
event_id |
int64 | Unique event identifier. |
epoch_id |
int64 | Identifier for the specific observation epoch. |
filt |
string | Filter used for the observation. Values: F087, F146, F213. |
flux_uJy |
float64 | Measured flux in microjanskys (ΞΌJy). |
flux_err_uJy |
float64 | Uncertainty in the measured flux in ΞΌJy. |
true_flux_uJy |
float64 | True flux in microjanskys (ΞΌJy). |
saturation_flag |
float64 | Saturation flag: 0 = unsaturated, 1 = saturated. |
2. Metadata Table (_meta.parquet)
Contains the simulated physical parameters and lensing variables for each event.
| Column Name | Data Type | Description |
|---|---|---|
name |
string | Unique event identifier (e.g., RMDC26_XXXXXX). |
event_id |
int64 | Integer ID matching the observations table. |
sim_label |
string | Simulation category (e.g., RMDC26_1S1L_ML). |
SubRun |
float64 | Sub-run identifier. |
Field |
float64 | Field identifier. |
EventID |
float64 | Event ID. |
final_weight |
float64 | Population weight for the event. |
ObsGroup_0_chi2 |
float64 | For binary events, the $\Delta\chi^2$ between the best-fitting single-lens (PSPL) model and the true simulated model ($\chi^2_{\text{PSPL_fit}} - \chi^2_{\text{true}}$). For single-source single-lens events, this instead stores the $\Delta\chi^2$ of the true simulated model vs a flat baseline fit ($\chi^2_{\text{flat}} - \chi^2_{\text{true}}$). |
is_out_of_season |
boolean | Flag indicating whether the event peak ($t_0$) falls in a seasonal gap (when Roman cannot observe the bulge). |
t0lens1 |
float64 | Time of closest approach for the primary lens. |
tE_ref |
float64 | Einstein timescale (observer reference frame). |
tE_helio |
float64 | Einstein timescale (barycentric frame). |
u0lens1 |
float64 | Impact parameter. |
rho |
float64 | Ratio of source radius to the Einstein ring radius. |
piE |
float64 | Microlens parallax magnitude. |
piEE |
float64 | Parallax-East term. In ecliptic coordinates. |
piEN |
float64 | Parallax-North term. In ecliptic coordinates. |
piEll |
float64 | Parallax-component parallel to solar acceleration. |
piErp |
float64 | Parallax-component perpendicular to solar acceleration. |
rE |
float64 | Einstein radius of the primary lens mass (AU). |
thetaE |
float64 | Einstein angular radius of the primary lens mass (mas). |
ra_deg |
float64 | Event right ascension in degrees. |
dec_deg |
float64 | Event declination in degrees. |
galactic_l |
float64 | Galactic longitude (degrees). |
galactic_b |
float64 | Galactic latitude (degrees). |
fs_F146 |
float64 | Source flux fraction in F146. |
fs_F087 |
float64 | Source flux fraction in F087. |
fs_F213 |
float64 | Source flux fraction in F213. |
fs2_F146 |
float64 | Second source flux fraction in F146. |
fs2_F087 |
float64 | Second source flux fraction in F087. |
fs2_F213 |
float64 | Second source flux fraction in F213. |
Lens_F146 |
float64 | Lens magnitude in F146. |
Lens_F087 |
float64 | Lens magnitude in F087. |
Lens_F213 |
float64 | Lens magnitude in F213. |
Source_F146 |
float64 | Source magnitude in F146. |
Source_F087 |
float64 | Source magnitude in F087. |
Source_F213 |
float64 | Source magnitude in F213. |
Source2_F146 |
float64 | Second source magnitude in F146. |
Source2_F087 |
float64 | Second source magnitude in F087. |
Source2_F213 |
float64 | Second source magnitude in F213. |
Source_Is_Binary |
float64 | Flag indicating if the source is binary. |
Source_q |
float64 | Mass ratio of the binary source. |
Source_combined_logP |
float64 | log period/days of binary source. |
Source_total_mass |
float64 | Total mass of binary source (MSun). |
Source2_rho |
float64 | Ratio of second source radius to the Einstein ring radius. |
Source2_s |
float64 | Projected separation of second source. |
Source2_alpha |
float64 | Angle of second source. |
Source2_inc |
float64 | Inclination of second source. |
Source2_phase |
float64 | Phase of second source. |
Planet_mass |
float64 | Mass of the planet (if present). |
Planet_q |
float64 | Planet-to-star mass ratio. |
Planet_s |
float64 | Projected separation of the planet. |
alpha |
float64 | Trajectory angle (degrees) |
Planet_period |
float64 | Orbital period of the planet (years). |
Planet_semimajoraxis |
float64 | Semimajor axis of the planet (AU). |
Planet_orbphase |
float64 | Orbital phase of the planet (degrees). |
Planet_inclination |
float64 | Inclination of the planet (degrees). |
Lens_Mass |
float64 | Mass of the lens (MSun). |
Lens_Dist |
float64 | Distance to the lens (kpc). |
Lens_Teff |
float64 | Effective temperature of the lens (K). |
Lens_logg |
float64 | Surface gravity of the lens (cgs). |
Lens_Fe_H |
float64 | Metallicity of the lens. |
Source_Mass |
float64 | Mass of the source (MSun). |
Source_Dist |
float64 | Distance to the source (kpc). |
Source_Teff |
float64 | Effective temperature of the source (K). |
Source_logg |
float64 | Surface gravity of the source (cgs). |
Source_Fe_H |
float64 | Metallicity of the source. |
Source2_Mass |
float64 | Mass of the second source (MSun). |
Source2_Dist |
float64 | Distance to the second source (kpc). |
Source2_Teff |
float64 | Effective temperature of the second source (K). |
Source2_logg |
float64 | Surface gravity of the second source (cgs). |
Source2_Fe_H |
float64 | Metallicity of the second source. |
extinction_F146 |
float64 | Extinction in F146. |
extinction_F087 |
float64 | Extinction in F087. |
extinction_F213 |
float64 | Extinction in F213. |
3. Epochs Table (_epoch.parquet)
Maps each unique observation time (BJD) and corresponding telescope coordinates (X, Y, Z relative to the Solar System Barycenter) to a unique epoch ID.
| Column Name | Data Type | Description |
|---|---|---|
epoch_id |
int64 | Unique identifier for the epoch. |
bjd |
float64 | Barycentric Julian Date. |
obs_x |
float64 | Observatory X-coordinate in AU. |
obs_y |
float64 | Observatory Y-coordinate in AU. |
obs_z |
float64 | Observatory Z-coordinate in AU. |
Simulation Details & Disclaimer
Simulation Engine: All events have been generated using the gulls simulator. More information is available at gulls-microlensing.github.io.
Stellar Populations: The input stellar population catalogs used for the source and lens stars were generated using synthpop (github.com/synthpop-galaxy/synthpop).
Event Complexity:
- There are three simulations included in this dataset:
RMDC26_1S1L_ML: Single lens and single source events.RMDC26_1S2L_ML: One star - one planet lens and single source events.RMDC26_2S2L_ML: One star - one planet lens and potentially binary source events without source orbital motion.
- Note that not all lenses and sources are necessarily involved in the microlensing event.
ObsGroup_0_chi2> 160 for events from the binary lens simulations indicates that an anomaly may be present in the light curve. The anomalies may be planetary perturbations and caustic crossings, finite source effects, or parallax effects.
Representativeness & Weighting:
- This data set only includes potentially detectable microlensing events where the chi-squared difference between the best fit flat model and the true model is greater than 60, i.e. $\chi^2_{\text{flat}} - \chi^2_{\text{true}} > 60$.
- The full set of events is not directly representative of the raw astrophysical population due to detection significance cuts and GULLS coordinate transformations (e.g. in
croincaustic-relative coordinates, the host star $t_0$ and $u_0$ are often transformed far outside of normal ranges or observing seasons, even though the planetary anomaly itself is actively observed in-season). - To make the dataset more representative of the true underlying Galactic population, you can apply the population weights stored in the
final_weightcolumn directly during training and analysis, or use them to draw a resampled, less biased dataset. - The
is_out_of_seasonflag indicates whether the closest approach time of the primary lens (t0lens1) falls in a seasonal gap when the Galactic Bulge is unobservable. While the lightcurves of these events still show signature features of the microlensing event, their peak stellar magnification is not covered by observations. As a result, these events might be difficult for machine learning models to classify correctly, and you may want to filter them out depending on your specific modeling goals.
Dataset Structure:
- The dataset is split into observations, metadata, and epochs.
- To reconstruct a full lightcurve for an event, join the
obstable with themetatable onevent_idand theepochtable onepoch_id.
Disclaimer: This dataset is intended for testing and development purposes and should be used with the understanding of the biases inherent in the simulation sampling.
Sample Light Curves
Here are normalized light curves for 9 sample events from the dataset (3 from each simulation type: 1S1L, 1S2L, 2S2L), colored by filter band. Each filter's flux is divided by its median value (per event) so all bands appear on the same relative scale β the dashed gray line marks the baseline (ratio = 1). The time axis is zoomed to $t_0 \pm 5 \cdot t_E$.
Code Examples
The dataset is hosted on Hugging Face as RGES-PIT/MachineLearning with three configs: observations, metadata, and epochs. Below are examples for loading and working with the data.
Prerequisites
To load the metadata and epochs tables directly from Hugging Face, install the datasets and pandas libraries:
pip install datasets pandas pyarrow duckdb huggingface_hub
Set your Hugging Face access token:
export HF_TOKEN="hf_your_token_here"
1. Load the metadata and epochs tables
from datasets import load_dataset
import os
token = os.environ.get("HF_TOKEN")
assert token, "Set HF_TOKEN environment variable first"
dataset_name = "RGES-PIT/MachineLearning"
# Load metadata and epochs tables (which fit easily in RAM)
meta_df = load_dataset(dataset_name, "metadata", split="train", token=token).to_pandas()
epochs_df = load_dataset(dataset_name, "epochs", split="train", token=token).to_pandas()
print(f"Metadata : {meta_df.shape[0]:,} rows")
print(f"Epochs : {epochs_df.shape[0]:,} rows")
Expected output:
Observations : 18,441,855,367 rows
Metadata : 372,655 rows
Epochs : 98,974 rows
2. Reconstruct a single event's lightcurve
Because the observations table is extremely large (~160 GB in total), loading it in full is not recommended for local machines. Instead, we use DuckDB's remote hf:// protocol to fetch observations for a single event without downloading the entire table:
import duckdb
from huggingface_hub import HfFileSystem
import os
token = os.environ.get("HF_TOKEN")
con = duckdb.connect()
con.register_filesystem(HfFileSystem(token=token))
obs_p = "hf://datasets/RGES-PIT/MachineLearning/RMDC26_ML_Data_obs.parquet"
meta_p = "hf://datasets/RGES-PIT/MachineLearning/RMDC26_ML_Data_meta.parquet"
epoch_p = "hf://datasets/RGES-PIT/MachineLearning/RMDC26_ML_Data_epoch.parquet"
event_id = 3000
# Reconstruct a single event's lightcurve
event_obs = con.execute(f"""
SELECT
o.event_id,
m.name,
e.bjd,
o.filt,
o.flux_uJy,
m.tE_helio,
m.sim_label
FROM '{obs_p}' o
JOIN '{epoch_p}' e ON o.epoch_id = e.epoch_id
JOIN '{meta_p}' m ON o.event_id = m.event_id
WHERE o.event_id = {event_id}
ORDER BY e.bjd
""").df()
print(f"Event {event_id}: {event_obs['name'].iloc[0]} ({event_obs['sim_label'].iloc[0]})")
print(f" {len(event_obs):,} observations")
print(f" Einstein timescale tE_helio = {abs(event_obs['tE_helio'].iloc[0]):.2f} days")
Expected output:
Event 3000: RMDC26_003000 (RMDC26_1S1L_ML)
49,488 observations
Einstein timescale tE_helio = 3.55 days
3. Filter events by metadata constraints
You can perform filtering on the metadata table first, and then fetch observations for matched events. To run this efficiently over the network without full-table scans, query observations only for the target event IDs:
from datasets import load_dataset
import os
import duckdb
from huggingface_hub import HfFileSystem
token = os.environ.get("HF_TOKEN")
meta_df = load_dataset("RGES-PIT/MachineLearning", "metadata", split="train", token=token).to_pandas()
# Select low-significance single-lens events (chi2 <= 160)
good_events = meta_df[
(meta_df["sim_label"] == "RMDC26_1S1L_ML") &
(meta_df["ObsGroup_0_chi2"] <= 160)
]
print(f"{len(good_events)} events matched filters")
# Query observations count for matched events via DuckDB filter pushdown
con = duckdb.connect()
con.register_filesystem(HfFileSystem(token=token))
obs_p = "hf://datasets/RGES-PIT/MachineLearning/RMDC26_ML_Data_obs.parquet"
event_ids_str = ", ".join(map(str, good_events["event_id"].tolist()))
good_obs_count = con.execute(f"SELECT COUNT(*) FROM '{obs_p}' WHERE event_id IN ({event_ids_str})").fetchone()[0]
print(f"{good_obs_count:,} corresponding observations")
Expected output:
59222 events matched filters
2,930,778,336 corresponding observations
4. Sum final_weight per simulation
To verify the population representation or check the total astrophysical weights of each simulation, you can sum the final_weight column grouped by simulation label:
# Sum weights and count events per simulation
weights_summary = meta_df.groupby("sim_label").agg(
total_weight=("final_weight", "sum"),
event_count=("final_weight", "count")
).reset_index()
print(weights_summary.to_string(index=False))
Expected output:
sim_label total_weight event_count
RMDC26_1S1L_ML 60411.874322 299466
RMDC26_1S2L_ML 1588.290136 31633
RMDC26_2S2L_ML 1940.221485 41556
- Downloads last month
- 2,294
