File size: 9,959 Bytes
bf6a619
 
743203a
1d89039
 
 
743203a
 
 
d7db747
743203a
 
 
 
bf6a619
 
 
 
319225e
 
 
bf6a619
 
 
42cc2f1
bf6a619
37aeb5e
bf6a619
 
 
 
 
 
423195f
 
bf6a619
 
 
943736b
bf6a619
42cc2f1
 
 
f012c2e
 
 
 
 
 
 
 
42cc2f1
 
 
4587d81
42cc2f1
4587d81
42cc2f1
578e0b2
 
 
 
 
 
 
 
42cc2f1
4587d81
42cc2f1
 
 
 
 
 
 
 
 
 
 
410c3e6
 
abfe003
 
921fed4
 
 
e833543
abfe003
 
 
 
 
 
 
 
 
 
 
 
fe96f18
abfe003
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27f1e77
 
 
abfe003
527991c
fe96f18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410c3e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3b818db
410c3e6
3b818db
410c3e6
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
---
license: cc-by-4.0
tags:
- image
- video
- timeseries
- forecasting
- astrophysics
- heliophysics
- physics
- scientific-data
- climate
- weather
- space-weather
pretty_name: SDOML-lite
size_categories:
- 100K<n<1M
---
<div align="left">
  <img width="100%" src="assets/ar1520.png">
</div>

# SDOML-lite

SDOML-lite is a lightweight alternative to the [SDOML](https://registry.opendata.aws/sdoml-fdl/) dataset specifically designed for machine learning applications in solar physics, providing continuous full-disk images of the Sun with magnetic field and extreme ultraviolet data in several wavelengths. The data source is the [Solar Dynamics Observatory (SDO)](https://sdo.gsfc.nasa.gov/) space telescope, a NASA mission that has been in operation since 2010.

NASA’s SDO mission has generated over 20 petabytes of high-resolution solar imagery since its launch in 2010, representing one of the most comprehensive records of science data ever collected. This dataset offers an extraordinary opportunity for scientific discovery and machine learning, enabling advances in space weather forecasting, climate modeling, solar flare and coronal mass ejection (CME) prediction, image-to-image translation, and unsupervised representation learning of solar dynamics. Yet, the sheer scale and complexity of the raw archive have made it largely inaccessible to the broader ML community. SDOML-lite bridges this gap by delivering a curated, normalized, and temporally consistent subset of SDO data, specifically designed for seamless integration into large-scale machine learning pipelines.

_IMPORTANT: SDOML and SDOML-lite datasets are different in structure and data distributions. SDOML-lite is inspired by SDOML, but it is not based on SDOML data and there is no compatibility between the two formats._

* **Temporal Coverage:** 13 May 2010 - 31 July 2024
* **Data Source:** NASA SDO/AIA (Level 1 FITS files) and SDO/HMI (`hmi.M_720s` series data)
* **Format:** WebDataset (one TAR file per day, `sdoml-lite-xxxx.tar`)
* **Total samples:** ~ 500,000 timestamps
* **Total Size:** ~ 3 TB
* **Number of Chunks (Days):** 5194
* **Image Resolution:** 512x512 pixels for all channels
* **Data Type:** `float32` (NumPy `.npy` files)
- **Channels per sample**: 6 (separate `.npy` files per channel). AIA: 131 Å, 171 Å, 193 Å, 211 Å, 1600 Å (`aia_0131`, `aia_0171`, `aia_0193`, `aia_211`, `aia_1600`). HMI: Line-of-sight magnetogram (`hmi_m`)
* **Cadence:** Images are provided every 15 minutes within each daily TAR file. Each TAR file contains up to 96 observation sets.

## Intended Uses

This dataset is designed for machine learning research at the intersection of solar physics, space weather, and climate science. Potential applications include:

* Generative and self-supervised modeling of solar dynamics.
* Spatiotemporal forecasting of solar flares and coronal mass ejections (CMEs).
* Real-time space weather nowcasting from full-disk EUV and magnetic imagery.
* Tracking and modeling the evolution of active regions and magnetic flux.
* Learning data-driven proxies for solar irradiance for use in climate models.
* Cross-channel image translation and modality alignment.

## Dataset Structure

The dataset is organized into 5194 `.tar` files, with one `.tar` file per day within the temporal coverage period. Each daily `.tar` file contains multiple observation sets, one for every 15-minute interval of that day (up to 96 observation sets per day). An observation set consists of 6 NumPy (`.npy`) files, one for each specified channel.

Each `.tar` file corresponds to one day of data and contains one `.npy` file per channel, per 15-minute timestamp. For each timestamp, the internal file path has the following structure.

```
YYYY/MM/DD/HHMM.aia_131.npy
YYYY/MM/DD/HHMM.aia_171.npy
YYYY/MM/DD/HHMM.aia_193.npy
YYYY/MM/DD/HHMM.aia_211.npy
YYYY/MM/DD/HHMM.aia_1600.npy
YYYY/MM/DD/HHMM.hmi_m.npy
```

In WebDataset convention, the `YYYY/MM/DD/HHMM` substring of the path becomes the key for each data sample, and the `aia_0131.npy`, `aia_0171.npy`, `aia_0193.npy`, `aia_0211.npy`, `aia_1600.npy`, `hmi_m.npy` substrings become the names of the features for a given sample. Each `.npy` file stores a single-channel 512×512 image.

### Features

Each sample obtained by iterating through the WebDataset corresponds to one solar observation (with 15-minute cadence) and contains:

* `__key__`: (string) The base name YYYY/MM/DD/HHMM (e.g., 2010/05/13/0000).
* `aia_0131.npy`: (numpy.ndarray) Image data for AIA 131 Å. Shape: (512, 512). Dtype: float32.
* `aia_0171.npy`: (numpy.ndarray) Image data for AIA 171 Å. Shape: (512, 512). Dtype: float32.
* `aia_0193.npy`: (numpy.ndarray) Image data for AIA 193 Å. Shape: (512, 512). Dtype: float32.
* `aia_0211.npy`: (numpy.ndarray) Image data for AIA 211 Å. Shape: (512, 512). Dtype: float32.
* `aia_1600.npy`: (numpy.ndarray) Image data for AIA 1600 Å. Shape: (512, 512). Dtype: float32.
* `hmi_m.npy`: (numpy.ndarray) Line-of-sight magnetogram data from HMI. Shape: (512, 512). Dtype: float32.

## Usage Example

In the [SDOML-lite GitHub repository](https://github.com/oxai4science/sdoml-lite) you can find a well-tested PyTorch dataset implementation that is designed to work with a local copy of the dataset. 

The following is a minimal code example of how to read data from a streaming version of the dataset.

```python
from datasets import load_dataset
from datetime import datetime
import numpy as np
import matplotlib.pyplot as plt

dataset = load_dataset("oxai4science/sdoml-lite", streaming=True)
```
```python
channels = ['hmi_m', 'aia_0131', 'aia_0171', 'aia_0193', 'aia_0211', 'aia_1600']

def process(data):
    timestamp = data['__key__']
    d = []
    for c in map(lambda x: x+'.npy', channels):
        d.append(np.array(data[c]) if c in data else np.zeros((512, 512)))
    return timestamp, np.stack(d, axis=0)

def plot(timestamp, data):
    import matplotlib.pyplot as plt
    _, axs = plt.subplots(2, 3, figsize=(15, 10))
    axs = axs.flatten()
    for i, c in enumerate(channels):
        axs[i].imshow(data[i], cmap='gray')
        axs[i].set_title(c)
        axs[i].axis('off')
    plt.tight_layout()
    plt.suptitle(timestamp)
    plt.subplots_adjust(top=0.94)
    plt.show()
```
```python
sample  = next(iter(dataset['train']))
timestamp, data = process(sample)
plot(timestamp, data)
```
<div align="left">
  <img src="https://huggingface.co/datasets/oxai4science/sdoml-lite/resolve/main/assets/usage_example_1.png">
</div>

The following is another example showing how to put together a minimal PyTorch dataset and dataloader to train with SDOML-lite.

```python
import torch
from torch.utils.data import IterableDataset, DataLoader

# PyTorch dataset
class SDOMLlite(IterableDataset):
    def __init__(self, dataset_iter):
        self.dataset_iter = dataset_iter

    def __iter__(self):
        for sample in self.dataset_iter:
            t, d = process(sample)
            yield t, torch.tensor(d, dtype=torch.float32)

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
batch_size = 8

# Create DataLoader
dataset_iter = iter(dataset['train'])
torch_dataset = SDOMLlite(dataset_iter)
loader = DataLoader(torch_dataset, batch_size=batch_size)

# Training loop
num_epochs = 1
for epoch in range(num_epochs):
    for batch in loader:
        times = batch[0]  # Timestamps
        images = batch[1].to(device) # Images with shape (batch_size, 6, 512, 512)
        print(f"Batch with shape: {images.shape}")
        # ...
        # training code
        # ...
        break
    break
```

## Data Generation and Processing

The SDOML-lite dataset is generated using the pipeline detailed in the [sdoml-lite GitHub repository](https://github.com/oxai4science/sdoml-lite). The download and processing scripts were run in July 2024 using distributed computing resources provided by Google Cloud for FDL-X Heliolab 2024, which is a public-private partnership AI research initiative with NASA, Google Cloud and Nvidia and other leading research organizations.

## Data Splits

This dataset is provided as a collection of daily `.tar` files. No predefined training, validation, or test splits are provided. Users are encouraged to define their own splits according to their specific research requirements, such as by date ranges (e.g., specific years or months of year for training/validation/testing) or by solar events.

## Data normalization

The data comes normalized within each image channel such that the pixel values are in the range [0, 1], making it ready for machine learning use out of the box. 

The HMI source we use is already normalized in the range [0, 1]. We normalize the AIA data based on the statistics of the actual AIA data processed during the generation of the dataset, in a two-phase processing pipeline where the first phase computes data statistics and the second phase applies normalization.

## A note on data quality

The primary motivation for SDOML-lite is to provide a lightweight dataset suitable for use in machine learning pipelines, for example, as input to models that predict Sun-dependent quantities in domains such as space weather, thermospheric density, or radiation exposure.

We believe the dataset is of sufficient quality to serve as input for a broad range of machine learning applications. However, it is not intended for detailed scientific analysis of the HMI or AIA instruments, for which users should consult the original calibrated data products.

## Acknowledgments

This work is supported by NASA under award #80NSSC24M0122 and is the research product of FDL-X Heliolab a public/private partnership between NASA, Trillium Technologies Inc (trillium.tech) and commercial AI partners Google Cloud, NVIDIA and Pasteur Labs & ISI, developing open science for all Humankind.

## License

[Creative Commons Attribution 4.0 International (CC BY 4.0)](https://choosealicense.com/licenses/cc-by-4.0/)