Skip to content

Commit 90459be

Browse files
committed
Return the first angle if midpoint can't be found
1 parent bcf52af commit 90459be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/murfey/client/contexts/tomo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def _construct_tilt_series_name(file_path: Path) -> str:
6767
def _midpoint(angles: List[float]) -> int:
6868
if not angles:
6969
return 0
70+
if len(angles) <= 2:
71+
return round(angles[0])
7072
sorted_angles = sorted(angles)
7173
return round(
7274
sorted_angles[len(sorted_angles) // 2]

0 commit comments

Comments
 (0)