Update dataset card
Browse files
README.md
CHANGED
|
@@ -34,27 +34,42 @@ pip install "sdrbench[sz3]" # sdrbench + pysz (SZ3)
|
|
| 34 |
```
|
| 35 |
|
| 36 |
```python
|
|
|
|
| 37 |
import sdrbench
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
```
|
| 41 |
|
| 42 |
-
Other variants: `sdrbench.dataset("xgc", "
|
| 43 |
|
| 44 |
Files are downloaded on first use and cached; if Hugging Face is unreachable the package falls
|
| 45 |
back to the original archive on Globus.
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
| 53 |
|
|
|
|
| 54 |
|
| 55 |
-
Other files: `xgc.3d/xgc.3d.08100.bp`, `xgc.3d/xgc.3d.08200.bp`, `xgc.3d/xgc.3d.08300.bp`, `xgc.3d/xgc.3d.08400.bp`, `xgc.3d/xgc.3d.08500.bp`, `xgc.3d/xgc.3d.08600.bp`, `xgc.3d/xgc.3d.08700.bp`, `xgc.3d/xgc.3d.08800.bp`, `xgc.3d/xgc.3d.08900.bp`, `xgc.3d/xgc.mesh.bp`
|
| 56 |
|
| 57 |
-
### `
|
| 58 |
|
| 59 |
45 files, 1.5 GB, from [xgc.zip](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/XGC/xgc.zip).
|
| 60 |
|
|
@@ -74,6 +89,13 @@ Other files: `xgc.3d/xgc.3d.08100.bp`, `xgc.3d/xgc.3d.08200.bp`, `xgc.3d/xgc.3d.
|
|
| 74 |
| `08300/potm0` | `<f8` | 20694 | `xgc/xgc.3d.08300.bp_potm0_20694_double` |
|
| 75 |
| ... 33 more | | | |
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
## Citation
|
| 78 |
|
| 79 |
If you use this dataset, please cite SDRBench:
|
|
|
|
| 34 |
```
|
| 35 |
|
| 36 |
```python
|
| 37 |
+
import numpy as np
|
| 38 |
import sdrbench
|
| 39 |
+
from pysz import sz, szConfig, szErrorBoundMode
|
| 40 |
+
|
| 41 |
+
ds = sdrbench.dataset("xgc") # default variant: raw
|
| 42 |
+
print(ds.fields)
|
| 43 |
+
x = ds["mesh/coordinates-values"] # numpy array, dtype <f8, shape (20694, 2)
|
| 44 |
+
|
| 45 |
+
# compress with SZ3 (pysz) at a 1e-3 value-range-relative error bound
|
| 46 |
+
conf = szConfig()
|
| 47 |
+
conf.errorBoundMode = szErrorBoundMode.REL
|
| 48 |
+
conf.relErrorBound = 1e-3
|
| 49 |
+
compressed, ratio = sz.compress(np.ascontiguousarray(x), conf)
|
| 50 |
+
y, _ = sz.decompress(compressed, x.dtype.type, x.shape)
|
| 51 |
+
max_err, psnr, nrmse = sz.verify(np.asarray(x), y)
|
| 52 |
+
print(f"ratio {ratio:.1f}x, PSNR {psnr:.1f} dB, max error {max_err:.3g}")
|
| 53 |
```
|
| 54 |
|
| 55 |
+
Other variants: `sdrbench.dataset("xgc", "adios")`.
|
| 56 |
|
| 57 |
Files are downloaded on first use and cached; if Hugging Face is unreachable the package falls
|
| 58 |
back to the original archive on Globus.
|
| 59 |
|
| 60 |
+
Without the package, any file can be read with `huggingface_hub` and numpy:
|
|
|
|
| 61 |
|
| 62 |
+
```python
|
| 63 |
+
from huggingface_hub import hf_hub_download
|
| 64 |
+
import numpy as np
|
| 65 |
+
p = hf_hub_download("sdrbench/xgc", "xgc/xgc.mesh.bp_coordinates-values_20694x2_double", repo_type="dataset")
|
| 66 |
+
x = np.fromfile(p, dtype="<f8").reshape((20694, 2))
|
| 67 |
+
```
|
| 68 |
|
| 69 |
+
## Contents
|
| 70 |
|
|
|
|
| 71 |
|
| 72 |
+
### `raw` (default)
|
| 73 |
|
| 74 |
45 files, 1.5 GB, from [xgc.zip](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/XGC/xgc.zip).
|
| 75 |
|
|
|
|
| 89 |
| `08300/potm0` | `<f8` | 20694 | `xgc/xgc.3d.08300.bp_potm0_20694_double` |
|
| 90 |
| ... 33 more | | | |
|
| 91 |
|
| 92 |
+
### `adios`
|
| 93 |
+
|
| 94 |
+
10 files, 1.5 GB, from [xgc.3d.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/XGC/xgc.3d.tar.gz).
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
Other files: `xgc.3d/xgc.3d.08100.bp`, `xgc.3d/xgc.3d.08200.bp`, `xgc.3d/xgc.3d.08300.bp`, `xgc.3d/xgc.3d.08400.bp`, `xgc.3d/xgc.3d.08500.bp`, `xgc.3d/xgc.3d.08600.bp`, `xgc.3d/xgc.3d.08700.bp`, `xgc.3d/xgc.3d.08800.bp`, `xgc.3d/xgc.3d.08900.bp`, `xgc.3d/xgc.mesh.bp`
|
| 98 |
+
|
| 99 |
## Citation
|
| 100 |
|
| 101 |
If you use this dataset, please cite SDRBench:
|