report compression ratio in dropdown
2 changed files+29−1
python/ephys_compression_tests/datasets/aind_compression/__init__.pymodified+27−0View file
@@ -123,5 +123,32 @@ for d in dataset_dicts_base:
123123 }
124124 )
125125
126+# Add common-mode corrected versions
127+# Oddly enough, this didn't seem to help compression much, so leave it commented out for now
128+# for d in dataset_dicts_base:
129+# if "multi-channel" in d["tags"]:
130+# def create1(d=d) -> np.ndarray:
131+# data = d["create"]()
132+# median_signal = np.median(data, axis=1)
133+# # now create a new array where the first channel is the median
134+# # and the rest are the original channels minus the median
135+# # but we exclude the last channel because it can be recovered
136+# new_data = np.zeros_like(data)
137+# new_data[:, 0] = median_signal
138+# for ch in range(1, data.shape[1]):
139+# new_data[:, ch] = data[:, ch] - median_signal
140+# return new_data
141+# dataset_dicts.append(
142+# {
143+# "name": f'{d["name"]}-cmc',
144+# "version": "1",
145+# "description": f'{d["description"]} (common-mode corrected)',
146+# "create": create1,
147+# "tags": d["tags"] + ["common-mode-corrected"],
148+# "source_file": SOURCE_FILE,
149+# "long_description": LONG_DESCRIPTION,
150+# }
151+# )
152+
126153
127154 datasets = [Dataset(**a) for a in dataset_dicts]
web-ui/src/components/dataset/LossyAlgorithmSelector.tsxmodified+2−1View file
@@ -78,7 +78,8 @@ export const LossyAlgorithmSelector = ({
7878 {lossyResults.map((result) => (
7979 <option key={result.algorithm} value={result.algorithm}>
8080 {result.algorithm} (RMSE: {result.rmse?.toFixed(3)}, Max Error:{" "}
81- {result.max_error?.toFixed(3)})
81+ {result.max_error?.toFixed(3)}, Ratio:{" "}
82+ {result.compression_ratio?.toFixed(2)})
8283 </option>
8384 ))}
8485 </select>