Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -75,6 +75,45 @@ Each sample obtained by iterating through the WebDataset corresponds to one sola
|
|
75 |
* `aia_1600.npy`: (numpy.ndarray) Image data for AIA 1600 Å. Shape: (512, 512). Dtype: float32.
|
76 |
* `hmi_m.npy`: (numpy.ndarray) Line-of-sight magnetogram data from HMI. Shape: (512, 512). Dtype: float32.
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
## Data Generation and Processing
|
79 |
|
80 |
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.
|
|
|
75 |
* `aia_1600.npy`: (numpy.ndarray) Image data for AIA 1600 Å. Shape: (512, 512). Dtype: float32.
|
76 |
* `hmi_m.npy`: (numpy.ndarray) Line-of-sight magnetogram data from HMI. Shape: (512, 512). Dtype: float32.
|
77 |
|
78 |
+
## Usage Example
|
79 |
+
|
80 |
+
```python
|
81 |
+
from datasets import load_dataset
|
82 |
+
from datetime import datetime
|
83 |
+
import numpy as np
|
84 |
+
import matplotlib.pyplot as plt
|
85 |
+
|
86 |
+
dataset = load_dataset("oxai4science/sdoml-lite", streaming=True)
|
87 |
+
```
|
88 |
+
```python
|
89 |
+
channels = ['hmi_m', 'aia_0131', 'aia_0171', 'aia_0193', 'aia_0211', 'aia_1600']
|
90 |
+
|
91 |
+
def process(data):
|
92 |
+
timestamp = datetime.strptime(data['__key__'], "%Y/%m/%d/%H%M")
|
93 |
+
d = []
|
94 |
+
for c in map(lambda x: x+'.npy', channels):
|
95 |
+
d.append(np.array(data[c]) if c in data else np.zeros((512, 512)))
|
96 |
+
return timestamp, np.stack(d, axis=0)
|
97 |
+
|
98 |
+
def plot(timestamp, data):
|
99 |
+
import matplotlib.pyplot as plt
|
100 |
+
_, axs = plt.subplots(2, 3, figsize=(15, 10))
|
101 |
+
axs = axs.flatten()
|
102 |
+
for i, c in enumerate(channels):
|
103 |
+
axs[i].imshow(data[i], cmap='gray')
|
104 |
+
axs[i].set_title(c)
|
105 |
+
axs[i].axis('off')
|
106 |
+
plt.tight_layout()
|
107 |
+
plt.suptitle(timestamp)
|
108 |
+
plt.subplots_adjust(top=0.94)
|
109 |
+
plt.show()
|
110 |
+
```
|
111 |
+
```python
|
112 |
+
sample = next(iter(dataset['train']))
|
113 |
+
timestamp, data = process(sample)
|
114 |
+
plot(timestamp, data)
|
115 |
+
```
|
116 |
+
|
117 |
## Data Generation and Processing
|
118 |
|
119 |
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.
|