Commit ·
1f1471c
1
Parent(s): 3303963
added monitor for sxr_norm progress
Browse files
data/sxr_normalization.py
CHANGED
|
@@ -7,6 +7,7 @@ import numpy as np
|
|
| 7 |
from pathlib import Path
|
| 8 |
import glob
|
| 9 |
import os
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
def compute_sxr_norm(sxr_dir):
|
|
@@ -57,7 +58,7 @@ def compute_sxr_norm(sxr_dir):
|
|
| 57 |
raise ValueError(f"No SXR files found in {sxr_dir}")
|
| 58 |
|
| 59 |
sxr_values = []
|
| 60 |
-
for f in sxr_files:
|
| 61 |
try:
|
| 62 |
sxr = np.load(f)
|
| 63 |
sxr = np.atleast_1d(sxr).flatten()[0]
|
|
|
|
| 7 |
from pathlib import Path
|
| 8 |
import glob
|
| 9 |
import os
|
| 10 |
+
from tqdm import tqdm
|
| 11 |
|
| 12 |
|
| 13 |
def compute_sxr_norm(sxr_dir):
|
|
|
|
| 58 |
raise ValueError(f"No SXR files found in {sxr_dir}")
|
| 59 |
|
| 60 |
sxr_values = []
|
| 61 |
+
for f in tqdm(sxr_files, desc="Computing SXR normalization", unit="file"):
|
| 62 |
try:
|
| 63 |
sxr = np.load(f)
|
| 64 |
sxr = np.atleast_1d(sxr).flatten()[0]
|