Commit 1563ab5c authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Use [0, 360] default angles for half tomo when no info on angles was provided

parent c04d7f14
......@@ -37,8 +37,21 @@ class CORFinder:
dataset_angles = self.dataset_info.rotation_angles
if dataset_angles is None:
if angles is None: # should not happen with hdf5
print("Warning: no information on angles was found for this dataset. Using default [0, 180[ range.")
angles = np.linspace(0, np.pi, len(self.dataset_info.projections), False)
theta_min = 0
theta_max = np.pi
msg = "Warning: no information on angles was found for this dataset. Using default range "
endpoint = False
if self.halftomo:
theta_max *= 2
endpoint = True
msg += "[0, 360]"
else:
msg += "[0, 180["
print(msg)
angles = np.linspace(
theta_min, theta_max, len(self.dataset_info.projections),
endpoint=endpoint
)
dataset_angles = angles
self.angles = dataset_angles
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment