Dedulek commited on
Commit
5cc7653
·
verified ·
1 Parent(s): 4e346d3

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +93 -260
README.md CHANGED
@@ -1,313 +1,146 @@
1
  ---
2
- title: Gaia Eclipsing Binary Teff Datasets
3
- language:
4
- - en
5
  license: cc-by-4.0
6
- size_categories:
7
- - 1M<n<10M
8
  task_categories:
9
- - tabular-regression
10
  tags:
11
- - astronomy
12
- - astrophysics
13
- - eclipsing-binaries
14
- - stellar-parameters
15
- - photometry
16
- - gaia
17
- - effective-temperature
18
- pretty_name: Gaia Eclipsing Binary Effective Temperature Datasets
19
  ---
20
 
21
- # Gaia Eclipsing Binary Effective Temperature Datasets
22
-
23
- ## Dataset Description
24
-
25
- This dataset contains multi-survey photometry and stellar parameters for **2.18 million eclipsing binary stars** from the Gaia mission. It combines data from Gaia DR3, Pan-STARRS DR1, and 2MASS to enable machine learning prediction of effective temperatures (Teff) for stars lacking spectroscopic measurements.
26
-
27
- ### Dataset Summary
28
-
29
- - **Total objects**: 2,179,680 eclipsing binary stars
30
- - **Gaia DR3 coverage**: 100% (all sources have Gaia photometry)
31
- - **Pan-STARRS coverage**: 53.5% (1,166,000 sources)
32
- - **2MASS coverage**: Variable (J, H, K bands)
33
- - **Teff coverage**: 58% have Gaia GSP-Phot temperatures
34
- - **ML predictions**: 38.9% (847,000 stars) have ML-predicted temperatures
35
-
36
- ### Surveys Included
37
 
38
- 1. **Gaia DR3** (2023)
39
- - G, BP, RP magnitudes and colors
40
- - GSP-Phot effective temperatures
41
- - Astrometric parameters
42
 
43
- 2. **Pan-STARRS DR1** (2016)
44
- - g, r, i, z, y optical magnitudes
45
- - PSF and Kron photometry
46
 
47
- 3. **2MASS** (2003)
48
- - J, H, K near-infrared magnitudes
 
 
49
 
50
- ## Dataset Structure
51
 
52
- ### Unified Photometry Dataset
53
 
54
- **File**: `photometry/eb_unified_photometry.parquet`
55
- **Size**: 227 MB
56
- **Format**: Apache Parquet
 
57
 
58
- This is the primary dataset containing all photometry and stellar parameters.
 
 
59
 
60
- #### Key Columns
61
 
62
- **Identifiers:**
63
- - `source_id` (int64): Gaia DR3 source identifier
 
 
 
64
 
65
- **Gaia Photometry:**
66
- - `g`, `bp`, `rp` (float64): Gaia G, BP, RP magnitudes
67
- - `bp_rp`, `g_bp`, `g_rp` (float64): Gaia colors
68
- - `parallax`, `pmra`, `pmdec` (float64): Astrometry
69
 
70
- **Gaia Stellar Parameters:**
71
- - `teff_gaia` (float64): GSP-Phot effective temperature [K]
72
- - `logg_gaia` (float64): Surface gravity [log cm/s²]
73
- - `mh_gaia` (float64): Metallicity [Fe/H]
74
 
75
- **Pan-STARRS Photometry:**
76
- - `ps_gPSFMag`, `ps_rPSFMag`, `ps_iPSFMag`, `ps_zPSFMag`, `ps_yPSFMag` (float64): PSF magnitudes
77
- - `ps_gKronMag`, `ps_rKronMag`, etc. (float64): Kron magnitudes
78
- - Pan-STARRS colors: `ps_g_r`, `ps_r_i`, etc.
79
 
80
- **2MASS Photometry:**
81
- - `j_m`, `h_m`, `k_m` (float64): 2MASS magnitudes
82
- - `j_h`, `h_k`, `j_k` (float64): 2MASS colors
 
 
 
 
83
 
84
- **Missing Values:**
85
- All missing values are encoded as `-999.0` for consistency.
86
 
87
- ### Final Catalog with Predictions
88
-
89
- **File**: `catalogs/stars_types_with_best_predictions.fits`
90
- **Size**: 196 MB
91
- **Format**: FITS binary table
92
-
93
- Complete catalog of 2.1M eclipsing binaries with:
94
- - Original Gaia temperatures (where available)
95
- - ML-predicted temperatures (best-of-three ensemble)
96
- - Prediction uncertainties
97
- - Quality flags (A=Gaia, B/C/D=ML by uncertainty, X=none)
98
-
99
- **Coverage**: 97.2% of stars have Teff values (58.3% Gaia original + 38.9% ML predictions)
100
-
101
- ## Usage
102
-
103
- ### Download with Python
104
 
105
  ```python
106
- from huggingface_hub import hf_hub_download
107
- import polars as pl
108
-
109
- # Download unified photometry
110
- file_path = hf_hub_download(
111
- repo_id="Dedulek/gaia-eb-teff-datasets",
112
- filename="photometry/eb_unified_photometry.parquet",
113
- repo_type="dataset"
114
- )
115
-
116
- # Load with Polars (recommended for large datasets)
117
- df = pl.read_parquet(file_path)
118
-
119
- # Or with Pandas
120
  import pandas as pd
121
- df = pd.read_parquet(file_path)
122
-
123
- print(f"Loaded {len(df)} eclipsing binaries")
124
- print(f"Columns: {df.columns}")
125
- ```
126
-
127
- ### Download with Hugging Face CLI
128
-
129
- ```bash
130
- # Install CLI
131
- pip install huggingface_hub
132
-
133
- # Download specific file
134
- huggingface-cli download Dedulek/gaia-eb-teff-datasets \
135
- --repo-type dataset \
136
- --include "photometry/eb_unified_photometry.parquet" \
137
- --local-dir ./data
138
- ```
139
-
140
- ### Training Example
141
-
142
- ```python
143
- import polars as pl
144
- from sklearn.ensemble import RandomForestRegressor
145
- from sklearn.model_selection import train_test_split
146
-
147
- # Load data
148
- df = pl.read_parquet("eb_unified_photometry.parquet")
149
-
150
- # Filter stars with known Teff and Gaia photometry
151
- df_train = df.filter(
152
- (pl.col("teff_gaia") != -999.0) &
153
- (pl.col("bp_rp") != -999.0)
154
- )
155
-
156
- # Prepare features and target
157
- features = ["g", "bp", "rp", "bp_rp", "g_bp", "g_rp"]
158
- X = df_train[features].to_numpy()
159
- y = df_train["teff_gaia"].to_numpy()
160
-
161
- # Train model
162
- X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
163
 
164
- model = RandomForestRegressor(n_estimators=300, max_depth=20, random_state=42)
165
- model.fit(X_train, y_train)
166
 
167
- # Evaluate
168
- score = model.score(X_test, y_test)
169
- print(f"R² score: {score:.3f}")
170
- ```
171
-
172
- ## Dataset Statistics
173
-
174
- ### Photometric Coverage
175
-
176
- | Survey | Coverage | N_stars |
177
- |--------|----------|---------|
178
- | Gaia DR3 | 100% | 2,179,680 |
179
- | Pan-STARRS DR1 | 53.5% | 1,166,000 |
180
- | 2MASS (J) | ~60% | ~1,300,000 |
181
- | 2MASS (H) | ~60% | ~1,300,000 |
182
- | 2MASS (K) | ~60% | ~1,300,000 |
183
-
184
- ### Stellar Parameter Coverage
185
-
186
- | Parameter | Coverage | Mean | Std | Range |
187
- |-----------|----------|------|-----|-------|
188
- | Teff (Gaia) | 58% | 7,450 K | 3,200 K | 2,500 - 50,000 K |
189
- | log(g) | 56% | 3.8 | 0.5 | 0.5 - 5.5 |
190
- | [Fe/H] | 48% | -0.2 | 0.4 | -2.5 - +0.5 |
191
-
192
- ### Temperature Distribution
193
 
194
- | Teff Range | N_stars | Percentage |
195
- |------------|---------|------------|
196
- | < 4,000 K (Cool) | 180,000 | 14% |
197
- | 4,000-6,000 K (Mid) | 520,000 | 41% |
198
- | 6,000-10,000 K (Hot) | 450,000 | 36% |
199
- | > 10,000 K (Very Hot) | 115,000 | 9% |
200
 
201
- ## Data Quality
 
202
 
203
- ### Missing Value Convention
204
-
205
- All surveys use `-999.0` to indicate missing values. Always filter these before analysis:
206
-
207
- ```python
208
- # Filter valid measurements
209
- df_clean = df.filter(
210
- (pl.col("bp_rp") != -999.0) &
211
- (pl.col("teff_gaia") != -999.0)
212
- )
213
  ```
214
 
215
- ### Known Issues
216
-
217
- 1. **Gaia GSP-Phot Bias**: Systematic underestimation of Teff for hot stars (>10,000 K)
218
- - Correction coefficients available in model repository
219
- - See: `data/teff_correction_coeffs_deg2.pkl`
220
-
221
- 2. **Pan-STARRS Coverage**: Northern hemisphere bias (Dec > -30°)
222
-
223
- 3. **2MASS Saturation**: Bright stars (J < 6) may be saturated
224
-
225
- ## Model Performance
226
 
227
- Pre-trained models achieve the following performance on held-out test sets:
 
228
 
229
- | Model | Features | MAE (K) | RMSE (K) | R² | Within 10% |
230
- |-------|----------|---------|----------|-----|------------|
231
- | Gaia Colors (Log) | 6 Gaia colors/bands | 557 | 1,021 | 0.640 | 68.5% |
232
- | Gaia + 2MASS | 5 optical+IR colors | 765 | 1,168 | 0.315 | 43.4% |
233
- | Best-of-Three Ensemble | Multiple models | 263 | - | - | - |
 
234
 
235
  ## Citation
236
 
237
  If you use this dataset, please cite:
238
 
239
  ```bibtex
240
- @dataset{gaia_eb_teff_2025,
241
- author = {Your Name},
242
- title = {Gaia Eclipsing Binary Effective Temperature Datasets},
243
- year = {2025},
244
- publisher = {HuggingFace},
245
- url = {https://huggingface.co/datasets/Dedulek/gaia-eb-teff-datasets}
246
  }
247
  ```
248
 
249
- ### Data Sources
250
 
251
- Please also cite the original surveys:
252
 
253
- **Gaia DR3:**
254
- ```bibtex
255
- @article{gaia2023,
256
- author = {{Gaia Collaboration}},
257
- title = {Gaia Data Release 3},
258
- journal = {Astronomy & Astrophysics},
259
- year = {2023},
260
- volume = {674},
261
- pages = {A1}
262
- }
263
- ```
264
-
265
- **Pan-STARRS:**
266
- ```bibtex
267
- @article{panstarrs2020,
268
- author = {Flewelling, H. A. and others},
269
- title = {The Pan-STARRS1 Database and Data Products},
270
- journal = {The Astrophysical Journal Supplement Series},
271
- year = {2020},
272
- volume = {251},
273
- pages = {7}
274
- }
275
- ```
276
-
277
- **2MASS:**
278
- ```bibtex
279
- @article{2mass2006,
280
- author = {Skrutskie, M. F. and others},
281
- title = {The Two Micron All Sky Survey (2MASS)},
282
- journal = {The Astronomical Journal},
283
- year = {2006},
284
- volume = {131},
285
- pages = {1163}
286
- }
287
- ```
288
 
289
  ## License
290
 
291
- This dataset is released under **CC BY 4.0** (Creative Commons Attribution 4.0 International).
292
 
293
- You are free to:
294
- - Share: copy and redistribute the material
295
- - Adapt: remix, transform, and build upon the material
296
 
297
- Under the following terms:
298
- - Attribution: You must give appropriate credit and indicate if changes were made
 
299
 
300
- ## Contact
301
-
302
- For questions or issues with this dataset:
303
- - Open an issue on the [GitHub repository](https://github.com/YOUR_USERNAME/gaia-eb-teff)
304
- - Contact: your.email@example.com
305
 
306
- ## Acknowledgments
 
307
 
308
- This work has made use of data from:
309
- - ESA mission Gaia (https://www.cosmos.esa.int/gaia)
310
- - Pan-STARRS (https://panstarrs.stsci.edu/)
311
- - 2MASS (https://www.ipac.caltech.edu/2mass/)
312
 
313
- Special thanks to the astronomical community for making these datasets publicly available.
 
1
  ---
 
 
 
2
  license: cc-by-4.0
 
 
3
  task_categories:
4
+ - tabular-regression
5
  tags:
6
+ - astronomy
7
+ - astrophysics
8
+ - eclipsing-binaries
9
+ - gaia
10
+ - stellar-parameters
11
+ - temperature-prediction
12
+ size_categories:
13
+ - 1M<n<10M
14
  ---
15
 
16
+ # Gaia Eclipsing Binary Effective Temperature Dataset
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ This dataset provides effective temperature (Teff) predictions for 2.1 million eclipsing binary stars using a best-of-four ensemble approach combining Random Forest models trained on Gaia DR3 photometry.
 
 
 
19
 
20
+ ## Dataset Summary
 
 
21
 
22
+ **Total Objects**: 2,145,310 eclipsing binaries
23
+ **Teff Coverage**: 97.2% (2,085,712 objects with temperature estimates)
24
+ **High Quality (A+B flags)**: 92.7% (1,933,634 objects)
25
+ **Data Sources**: Gaia DR3, Pan-STARRS, 2MASS
26
 
27
+ ## Best-of-Four Ensemble
28
 
29
+ The dataset uses a best-of-four ensemble that selects the prediction with the **lowest Random Forest uncertainty** for each object from four models:
30
 
31
+ 1. **Teff-only model** (colors only, corrected Gaia temperatures)
32
+ 2. **Teff+logg model** (colors + surface gravity)
33
+ 3. **Teff+clustering model** (colors + cluster features)
34
+ 4. **Flag 1 model** (trained on highest quality Gaia sources)
35
 
36
+ **Performance**:
37
+ - Mean uncertainty: **203 K** (22.8% improvement over single best model)
38
+ - Model selection: 29.2% flag 1, 25.6% colors-only, 23.8% +logg, 21.4% +clustering
39
 
40
+ ## Files
41
 
42
+ ### Main Catalog
43
+ - **`catalogs/stars_types_with_best4_predictions.fits`** (206 MB)
44
+ - Complete catalog with best-of-four Teff predictions
45
+ - Columns: `source_id`, `ra`, `dec`, `teff_final`, `teff_uncertainty`, `quality_flag`, `best_model`
46
+ - See accompanying `_DESCRIPTION.txt` for full schema
47
 
48
+ ### Photometry
49
+ - **`photometry/eb_unified_photometry.parquet`** (69 MB)
50
+ - Gaia DR3 + Pan-STARRS + 2MASS photometry for all eclipsing binaries
51
+ - Includes magnitudes, colors, and photometric uncertainties
52
 
53
+ ### Correction Coefficients
54
+ - **`correction/teff_correction_coeffs_deg2.pkl`**
55
+ - Polynomial coefficients for correcting Gaia GSP-Phot temperatures (>10,000K)
56
+ - Used during model training to correct systematic underestimation
57
 
58
+ ## Quality Flags
 
 
 
59
 
60
+ | Flag | Description | Uncertainty | Count | Percentage |
61
+ |------|-------------|-------------|-------|------------|
62
+ | **A** | Gaia GSP-Phot original | N/A | 1,249,946 | 58.3% |
63
+ | **B** | ML prediction (< 300K) | < 300K | 683,688 | 31.9% |
64
+ | **C** | ML prediction (300-500K) | 300-500K | 152,078 | 7.1% |
65
+ | **D** | ML prediction (≥ 500K) | ≥ 500K | 6,000 | 0.3% |
66
+ | **X** | No temperature available | N/A | 53,598 | 2.5% |
67
 
68
+ **High Quality (A+B)**: 92.7% of catalog
69
+ **ML Predictions (B+C+D)**: 39.2% (841,766 objects)
70
 
71
+ ## Usage Example
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
  ```python
74
+ from astropy.table import Table
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  import pandas as pd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
+ # Load FITS catalog
78
+ catalog = Table.read('stars_types_with_best4_predictions.fits')
79
 
80
+ # Convert to pandas for analysis
81
+ df = catalog.to_pandas()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
+ # Filter high-quality predictions
84
+ high_quality = df[df['quality_flag'].isin(['A', 'B'])]
 
 
 
 
85
 
86
+ # Get objects with low uncertainty ML predictions
87
+ low_unc_ml = df[(df['quality_flag'] == 'B') & (df['teff_uncertainty'] < 200)]
88
 
89
+ print(f"High quality sources: {len(high_quality):,}")
90
+ print(f"Low uncertainty ML predictions: {len(low_unc_ml):,}")
 
 
 
 
 
 
 
 
91
  ```
92
 
93
+ ## Model Information
 
 
 
 
 
 
 
 
 
 
94
 
95
+ Pre-trained models are available in the companion repository:
96
+ **[Dedulek/gaia-eb-teff-models](https://huggingface.co/Dedulek/gaia-eb-teff-models)**
97
 
98
+ ### Flag 1 Model (Primary contributor to ensemble)
99
+ - **Model**: `rf_gaia_colors_flag1_20251218_094937.pkl`
100
+ - **Training**: 711,666 high-quality Gaia sources (flag 1)
101
+ - **Features**: 6 Gaia colors + bands (g, bp, rp, bp_rp, g_rp, g_bp)
102
+ - **Performance**: MAE 195K, 0.9126
103
+ - **Contribution**: Selected for 29.2% of ML predictions
104
 
105
  ## Citation
106
 
107
  If you use this dataset, please cite:
108
 
109
  ```bibtex
110
+ @dataset{gaia_eb_teff_2024,
111
+ title={Gaia Eclipsing Binary Effective Temperature Dataset},
112
+ author={Your Name/Team},
113
+ year={2024},
114
+ publisher={Hugging Face},
115
+ howpublished={\url{https://huggingface.co/datasets/Dedulek/gaia-eb-teff-datasets}}
116
  }
117
  ```
118
 
119
+ ## Data Processing
120
 
121
+ This dataset was created using a configurable ML pipeline:
122
 
123
+ 1. **Training Data**: Gaia DR3 GSP-Phot temperatures with polynomial correction (>10,000K)
124
+ 2. **Features**: Gaia photometry (g, bp, rp bands) + derived colors
125
+ 3. **Model**: Random Forest with full tree uncertainty estimation
126
+ 4. **Ensemble**: Best-of-four selection based on RF uncertainty
127
+ 5. **Quality Control**: Systematic validation against spectroscopic surveys
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
 
129
  ## License
130
 
131
+ This dataset is released under **CC BY 4.0**. You are free to share and adapt with attribution.
132
 
133
+ ## Related Resources
 
 
134
 
135
+ - **Models**: [Dedulek/gaia-eb-teff-models](https://huggingface.co/Dedulek/gaia-eb-teff-models)
136
+ - **Gaia Archive**: [https://gea.esac.esa.int/archive/](https://gea.esac.esa.int/archive/)
137
+ - **Pan-STARRS**: [https://panstarrs.stsci.edu/](https://panstarrs.stsci.edu/)
138
 
139
+ ## Updates
 
 
 
 
140
 
141
+ - **2024-12-18**: Updated to best-of-four ensemble (mean uncertainty: 203K)
142
+ - Previous: best-of-three ensemble (mean uncertainty: 263K)
143
 
144
+ ## Contact
 
 
 
145
 
146
+ For questions or issues, please open an issue in the dataset repository or contact the authors.