Datasets:
metadata
license: cc-by-4.0
task_categories:
- feature-extraction
tags:
- astronomy
- spectroscopy
- gaia
- lamost
- stellar-spectra
pretty_name: SpecCLIP Test Data
size_categories:
- 1K<n<10K
SpecCLIP Test Data
Test data for SpecCLIP - Cross-modal stellar spectral analysis.
Dataset Description
This dataset contains paired Gaia XP and LAMOST LRS spectra for testing cross-modal retrieval and embedding analysis.
Files
- gaia_lamost_test_only.h5: HDF5 file containing paired spectra
test/source_ids: Gaia source identifierstest/gaia_spectra: Gaia XP spectra (N, 343)test/lamost_spectra: LAMOST LRS spectra (N, 1462)
Usage
Download
from huggingface_hub import hf_hub_download
# Download test data
test_data_path = hf_hub_download(
repo_id="astroshawn/SpecCLIP-TestData-Small",
filename="gaia_lamost_test_only.h5",
repo_type="dataset",
local_dir="./test_data"
)
Or using CLI:
huggingface-cli download astroshawn/SpecCLIP-TestData-Small --local-dir ./test_data --repo-type dataset
Load Data
import h5py
import numpy as np
with h5py.File(test_data_path, 'r') as f:
source_ids = np.array(f['test/source_ids'][:])
gaia_spectra = np.array(f['test/gaia_spectra'][:])
lamost_spectra = np.array(f['test/lamost_spectra'][:])
print(f"Number of test samples: {len(source_ids)}")
print(f"Gaia XP spectra shape: {gaia_spectra.shape}")
print(f"LAMOST LRS spectra shape: {lamost_spectra.shape}")
Use with SpecCLIP
This test data is used for:
- Building embedding databases for spectral retrieval
- Cross-modal spectrum prediction
- In-modal and cross-modal similarity search
See the SpecCLIP model repository for usage examples.
Citation
If you use this data, please cite the SpecCLIP paper.