ayzk commited on
Commit
2dad783
·
verified ·
1 Parent(s): 484ab4c

Update dataset card and file table

Browse files
Files changed (2) hide show
  1. README.md +34 -24
  2. files.jsonl +8 -0
README.md CHANGED
@@ -3,29 +3,33 @@ license: other
3
  license_name: sdrbench
4
  license_link: https://sdrbench.github.io/
5
  pretty_name: "SDRBench: EXAFEL"
6
- viewer: false
7
  tags:
8
  - scientific-data
9
  - lossy-compression
10
  - sdrbench
11
  - hpc
12
  - sz3
 
 
 
 
13
  ---
14
 
15
  # SDRBench — EXAFEL
16
 
17
- Images from the LCLS instrument (X-ray free-electron laser); single precision, HDF5 and binary.
18
 
19
- This repository is an **unmodified mirror** of the EXAFEL dataset from
20
- [SDRBench](https://sdrbench.github.io/datasets.html), the Scientific Data Reduction Benchmark. The originals are hosted by
21
- Argonne National Laboratory on Globus; every archive was unpacked and its files uploaded
22
- byte-for-byte (sha256 verified). `metadata/` holds the original SDRBench property and template
23
- files. The mirror is kept in sync automatically by
 
24
  [szcompressor/sdrbench](https://github.com/szcompressor/sdrbench).
25
 
26
- - **Data source:** LCLS (SLAC)
27
- - **Total size:** 10.4 GB
28
- - **Format:** raw little-endian binary, C order (slowest dimension first)
29
 
30
  ## Usage
31
 
@@ -38,7 +42,7 @@ import numpy as np
38
  import sdrbench
39
  from pysz import sz, szConfig, szErrorBoundMode
40
 
41
- ds = sdrbench.dataset("exafel") # default variant: small
42
  print(ds.fields)
43
  x = ds["dark"] # numpy array, dtype <u2, shape (10, 32, 185, 388)
44
 
@@ -52,26 +56,27 @@ 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("exafel", "large")` (all: `large`, `assembled`).
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/exafel", "10x32x185x388/smd-cxif5315-r129-dark.u16", repo_type="dataset")
66
  x = np.fromfile(p, dtype="<u2").reshape((10, 32, 185, 388))
67
  ```
68
 
69
- ## Contents
70
 
71
 
72
  ### `small` (default)
73
 
74
- 3 files, 137.8 MB, from [SDRBENCH-EXAFEL-10x32x185x388.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXAFEL/SDRBENCH-EXAFEL-10x32x185x388.tar.gz).
 
 
75
 
76
  | Field | dtype | Shape (C order) | File |
77
  |---|---|---|---|
@@ -81,7 +86,9 @@ x = np.fromfile(p, dtype="<u2").reshape((10, 32, 185, 388))
81
 
82
  ### `large`
83
 
84
- 1 files, 9.1 GB, from [SDRBENCH-EXAFEL-986x32x185x388.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXAFEL/SDRBENCH-EXAFEL-986x32x185x388.tar.gz).
 
 
85
 
86
  | Field | dtype | Shape (C order) | File |
87
  |---|---|---|---|
@@ -89,7 +96,9 @@ x = np.fromfile(p, dtype="<u2").reshape((10, 32, 185, 388))
89
 
90
  ### `assembled`
91
 
92
- 4 files, 1.2 GB, from [SDRBENCH-EXAFEL-130x1480x1552.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXAFEL/SDRBENCH-EXAFEL-130x1480x1552.tar.gz).
 
 
93
 
94
  | Field | dtype | Shape (C order) | File |
95
  |---|---|---|---|
@@ -100,7 +109,7 @@ x = np.fromfile(p, dtype="<u2").reshape((10, 32, 185, 388))
100
 
101
  ## Citation
102
 
103
- If you use this dataset, please cite SDRBench:
104
 
105
  ```bibtex
106
  @inproceedings{zhao2020sdrbench,
@@ -114,5 +123,6 @@ If you use this dataset, please cite SDRBench:
114
 
115
  ## License and terms
116
 
117
- The data are distributed under the same terms as on the [SDRBench website](https://sdrbench.github.io/datasets.html).
118
- Rights remain with the original data providers listed above.
 
 
3
  license_name: sdrbench
4
  license_link: https://sdrbench.github.io/
5
  pretty_name: "SDRBench: EXAFEL"
 
6
  tags:
7
  - scientific-data
8
  - lossy-compression
9
  - sdrbench
10
  - hpc
11
  - sz3
12
+ configs:
13
+ - config_name: files
14
+ data_files: files.jsonl
15
+ default: true
16
  ---
17
 
18
  # SDRBench — EXAFEL
19
 
20
+ X-ray free-electron laser images from the LCLS instrument (SLAC): events x detector panels x rows x columns.
21
 
22
+ > **Raw binary arrays, not an Arrow/Parquet dataset.** `datasets.load_dataset("sdrbench/exafel")` returns the table of files (`files.jsonl`: path, dtype, shape, sha256). Read the arrays with the `sdrbench` package or `hf_hub_download` + numpy as shown below.
23
+
24
+ This repository is an **unmodified mirror** of the EXAFEL data of [SDRBench](https://sdrbench.github.io/datasets.html), the
25
+ Scientific Data Reduction Benchmark. The originals are hosted by Argonne National Laboratory on Globus;
26
+ every archive was unpacked and its files uploaded byte-for-byte (sha256 verified) (revision `484ab4c6a9`). `metadata/` holds
27
+ the original SDRBench property and template files. Kept in sync automatically by
28
  [szcompressor/sdrbench](https://github.com/szcompressor/sdrbench).
29
 
30
+ - **Data provider:** LCLS (SLAC)
31
+ - **Size:** 10.4 GB in 3 variant(s)
32
+ - **Format:** raw little-endian binary, C order (slowest dimension first); dtype and shape per field below
33
 
34
  ## Usage
35
 
 
42
  import sdrbench
43
  from pysz import sz, szConfig, szErrorBoundMode
44
 
45
+ ds = sdrbench.dataset("exafel") # default variant "small"
46
  print(ds.fields)
47
  x = ds["dark"] # numpy array, dtype <u2, shape (10, 32, 185, 388)
48
 
 
56
  print(f"ratio {ratio:.1f}x, PSNR {psnr:.1f} dB, max error {max_err:.3g}")
57
  ```
58
 
59
+ Files are fetched on first use (in parallel with `ds.download("data/")`) and cached, pinned to the revision
60
+ of the installed `sdrbench` release; if Hugging Face is unreachable the package falls back to the original
61
+ archive on Globus. Existing local SDRBench copies can be used with `sdrbench.dataset("exafel", root="/path")`.
 
62
 
63
+ Without the package, with `huggingface_hub` and numpy only:
64
 
65
  ```python
66
  from huggingface_hub import hf_hub_download
67
  import numpy as np
68
+ p = hf_hub_download("sdrbench/exafel", "10x32x185x388/smd-cxif5315-r129-dark.u16", repo_type="dataset", revision="484ab4c6a935c25c8f5ad09854d71c6c1316912c")
69
  x = np.fromfile(p, dtype="<u2").reshape((10, 32, 185, 388))
70
  ```
71
 
72
+ ## Variants and fields
73
 
74
 
75
  ### `small` (default)
76
 
77
+ `sdrbench.dataset("exafel", "small")` — folder `10x32x185x388/` — 3 files, 137.8 MB, from [SDRBENCH-EXAFEL-10x32x185x388.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXAFEL/SDRBENCH-EXAFEL-10x32x185x388.tar.gz).
78
+
79
+ 10 events of the 32-panel detector as raw counts: raw, dark (background) and calib-fde frames, unsigned 16-bit.
80
 
81
  | Field | dtype | Shape (C order) | File |
82
  |---|---|---|---|
 
86
 
87
  ### `large`
88
 
89
+ `sdrbench.dataset("exafel", "large")` — folder `986x32x185x388/` — 1 files, 9.1 GB, from [SDRBENCH-EXAFEL-986x32x185x388.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXAFEL/SDRBENCH-EXAFEL-986x32x185x388.tar.gz).
90
+
91
+ 986 calibrated events of the 32-panel detector, single precision.
92
 
93
  | Field | dtype | Shape (C order) | File |
94
  |---|---|---|---|
 
96
 
97
  ### `assembled`
98
 
99
+ `sdrbench.dataset("exafel", "assembled")` — folder `130x1480x1552/` — 4 files, 1.2 GB, from [SDRBENCH-EXAFEL-130x1480x1552.tar.gz](https://g-d0cd3f.fd635.8443.data.globus.org/raw-data/EXAFEL/SDRBENCH-EXAFEL-130x1480x1552.tar.gz).
100
+
101
+ 130 assembled 1480 x 1552 detector images with Bragg peak positions and counts per event.
102
 
103
  | Field | dtype | Shape (C order) | File |
104
  |---|---|---|---|
 
109
 
110
  ## Citation
111
 
112
+ Please cite SDRBench; `sdrbench cite exafel` prints it:
113
 
114
  ```bibtex
115
  @inproceedings{zhao2020sdrbench,
 
123
 
124
  ## License and terms
125
 
126
+ The data are distributed by the SDRBench team for research use under the terms of the original
127
+ data providers listed above (see the [SDRBench website](https://sdrbench.github.io/datasets.html)); please acknowledge them as
128
+ requested. Rights remain with the data providers.
files.jsonl ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {"variant": "small", "field": "dark", "var": "dark", "step": null, "path": "10x32x185x388/smd-cxif5315-r129-dark.u16", "dtype": "<u2", "shape": [10, 32, 185, 388], "file_shape": [10, 32, 185, 388], "component": null, "transpose": null, "bytes": 45939200, "sha256": "df653846db076d2dd18a53849ef5494743cc29f353753f3a360c07edb91704da"}
2
+ {"variant": "small", "field": "calib-fde", "var": "calib-fde", "step": null, "path": "10x32x185x388/smd-cxif5315-r169-calib-fde.u16", "dtype": "<u2", "shape": [10, 32, 185, 388], "file_shape": [10, 32, 185, 388], "component": null, "transpose": null, "bytes": 45939200, "sha256": "c67bf33b0bd0f5821e2201aebbafbb6e2be54b68fec8ee2411a54c356e25e642"}
3
+ {"variant": "small", "field": "raw", "var": "raw", "step": null, "path": "10x32x185x388/smd-cxif5315-r169-raw.u16", "dtype": "<u2", "shape": [10, 32, 185, 388], "file_shape": [10, 32, 185, 388], "component": null, "transpose": null, "bytes": 45939200, "sha256": "8edaf7d6656440075d4e39e5349ee833a54edbeeae031603fb5d13daeb3db9b6"}
4
+ {"variant": "large", "field": "data", "var": "data", "step": null, "path": "986x32x185x388/EXAFEL-LCLS-986x32x185x388.f32", "dtype": "<f4", "shape": [986, 32, 185, 388], "file_shape": [986, 32, 185, 388], "component": null, "transpose": null, "bytes": 9059210240, "sha256": "177cda526a1e0f9afb9e3769c1c1f1708215d89dfa45f678419a5109fdaf8c16"}
5
+ {"variant": "assembled", "field": "data", "var": "data", "step": null, "path": "130x1480x1552/SDRBENCH-EXAFEL-data-130x1480x1552.f32", "dtype": "<f4", "shape": [130, 1480, 1552], "file_shape": [130, 1480, 1552], "component": null, "transpose": null, "bytes": 1194419200, "sha256": "e38b12da6547016cae608d7f50302bab25995506fe71f1778e397a0bfb7508b7"}
6
+ {"variant": "assembled", "field": "nPeaks", "var": "nPeaks", "step": null, "path": "130x1480x1552/SDRBENCH-EXAFEL-nPeaks.i64", "dtype": "<i8", "shape": [130], "file_shape": [130], "component": null, "transpose": null, "bytes": 1040, "sha256": "a6c3c46c103f0b1030ee425d02edb516a30a8ba2b797e1012da7890fea5c0b41"}
7
+ {"variant": "assembled", "field": "peakXPosRaw", "var": "peakXPosRaw", "step": null, "path": "130x1480x1552/SDRBENCH-EXAFEL-peakXPosRaw-130x2048.d64", "dtype": "<f8", "shape": [130, 2048], "file_shape": [130, 2048], "component": null, "transpose": null, "bytes": 2129920, "sha256": "11ca33a63898f5950d742808b5ce18a1a4b2ab0be7751baf77588feef8746a14"}
8
+ {"variant": "assembled", "field": "peakYPosRaw", "var": "peakYPosRaw", "step": null, "path": "130x1480x1552/SDRBENCH-EXAFEL-peakYPosRaw-130x2048.d64", "dtype": "<f8", "shape": [130, 2048], "file_shape": [130, 2048], "component": null, "transpose": null, "bytes": 2129920, "sha256": "4d96e57b2f2d518a1d431cf6e3c479c9ff4facc00c5801292f95f10a929deb04"}