Spaces:
Paused
Paused
Update dissector.py
Browse files- dissector.py +6 -2
dissector.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
from scipy.ndimage import median_filter
|
| 2 |
import json
|
| 3 |
import numpy as np
|
|
|
|
| 4 |
|
| 5 |
LOW = 250
|
| 6 |
HIGH = 4000
|
|
@@ -176,7 +177,10 @@ def process(specs, struct, name):
|
|
| 176 |
return filename
|
| 177 |
|
| 178 |
def generate_dissector_data(name):
|
| 179 |
-
|
| 180 |
-
|
|
|
|
|
|
|
|
|
|
| 181 |
struct = json.load(f)
|
| 182 |
return process(specs, struct, name)
|
|
|
|
| 1 |
from scipy.ndimage import median_filter
|
| 2 |
import json
|
| 3 |
import numpy as np
|
| 4 |
+
from pathlib import Path
|
| 5 |
|
| 6 |
LOW = 250
|
| 7 |
HIGH = 4000
|
|
|
|
| 177 |
return filename
|
| 178 |
|
| 179 |
def generate_dissector_data(name):
|
| 180 |
+
spec_path = Path(f'./spec/{name}.npy').resolve().as_posix()
|
| 181 |
+
struct_path = Path(f'./struct/{name}.json').resolve().as_posix()
|
| 182 |
+
|
| 183 |
+
specs = np.load(spec_path)
|
| 184 |
+
with open(struct_path) as f:
|
| 185 |
struct = json.load(f)
|
| 186 |
return process(specs, struct, name)
|