Spaces:
Sleeping
Sleeping
Set npx to nt - not sure why
Browse files
app.py
CHANGED
@@ -11,13 +11,14 @@ def compute_radon_fn(image,
|
|
11 |
else:
|
12 |
image_gray = image
|
13 |
|
14 |
-
|
15 |
# Define axes centered around zero.
|
16 |
-
taxis = np.linspace(-
|
17 |
-
haxis = np.linspace(-
|
18 |
# Set detector axis (pxaxis) to cover the full image diagonal.
|
19 |
-
L = int(np.ceil(np.sqrt(M**2 + N**2)))
|
20 |
-
|
|
|
21 |
|
22 |
print(f"Shapes:\n taxis:{taxis.shape}, haxis:{haxis.shape}, pxaxis:{pxaxis.shape}")
|
23 |
|
|
|
11 |
else:
|
12 |
image_gray = image
|
13 |
|
14 |
+
nt, nh = image_gray.shape
|
15 |
# Define axes centered around zero.
|
16 |
+
taxis = np.linspace(-nt/2, nt/2, nt) # time axis (rows)
|
17 |
+
haxis = np.linspace(-nh/2, nh/2, nh) # spatial axis (columns)
|
18 |
# Set detector axis (pxaxis) to cover the full image diagonal.
|
19 |
+
# L = int(np.ceil(np.sqrt(M**2 + N**2)))
|
20 |
+
npx = nt # why?
|
21 |
+
pxaxis = np.linspace(-npx/2, npx/2, npx)
|
22 |
|
23 |
print(f"Shapes:\n taxis:{taxis.shape}, haxis:{haxis.shape}, pxaxis:{pxaxis.shape}")
|
24 |
|