add quantized seismic
3 changed files+25−3
.github/workflows/benchmark.ymlmodified+2−0View file
@@ -9,6 +9,8 @@ on:
99 workflow_dispatch: # Manual trigger
1010 push:
1111 branches: [ main ] # Run on main branch pushes
12+ paths:
13+ - 'benchcompress/**' # Run only if benchmarks are updated
1214
1315 permissions:
1416 contents: write
benchcompress/src/benchcompress/datasets/seismic/__init__.pymodified+20−3View file
@@ -5,7 +5,9 @@ import requests
55
66 SOURCE_FILE = "seismic/__init__.py"
77
8-tags = ["real", "seismic", "float", "continuous", "timeseries", "2d"]
8+tags = ["real", "seismic", "continuous", "timeseries", "1d"]
9+tags_float = tags + ["float"]
10+tags_integer = tags + ["integer"]
911
1012
1113 def _load_seismic_data() -> np.ndarray:
@@ -42,6 +44,13 @@ def _load_seismic_data() -> np.ndarray:
4244 # print(np.max(first_nonzero_indices)) # 1607
4345 X = X[:, 1700:]
4446
47+ return X.ravel()
48+
49+
50+def _load_quantized_seismic_data():
51+ X = _load_seismic_data()
52+ step = 10000
53+ X = np.round(X / step).astype(np.int32)
4554 return X
4655
4756
@@ -51,7 +60,15 @@ datasets = [
5160 "version": "1",
5261 "description": "Seismic data from Roger Revelle voyage RR1508.",
5362 "create": lambda: _load_seismic_data(),
54- "tags": tags,
63+ "tags": tags_float,
64+ "source_file": SOURCE_FILE,
65+ },
66+ {
67+ "name": "seismic-04A-04B-quantized",
68+ "version": "1",
69+ "description": "Seismic data from Roger Revelle voyage RR1508, quantized.",
70+ "create": lambda: _load_quantized_seismic_data(),
71+ "tags": tags_integer,
5572 "source_file": SOURCE_FILE,
56- }
73+ },
5774 ]
benchcompress/src/benchcompress/datasets/seismic/explore_seismic.pymodified+3−0View file
@@ -36,6 +36,9 @@ for j in range(X.shape[0]):
3636 print(np.max(first_nonzero_indices)) # 1607
3737 X = X[:, 1700:]
3838 # %%
39+plt.figure(figsize=(10, 5))
40+plt.plot(X.ravel()[:12000])
41+# %%
3942 print(X.shape) # (4101, 2051)
4043 print(X[0, :5]) # [-2891.2651 -2550.8093 -2744.9373 -111.93254 6441.383 ]
4144 # %%