Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /DiamondLightSource_python-murfey /src /murfey /util /tomo.py
| def midpoint(angles: list[float]) -> int: | |
| """ | |
| Utility function to calculate the midpoint of the angles used in a tilt series. | |
| Used primarily in the tomography workflow. | |
| """ | |
| if not angles: | |
| return 0 | |
| if len(angles) <= 2: | |
| return round(angles[0]) | |
| sorted_angles = sorted(angles) | |
| return round( | |
| sorted_angles[len(sorted_angles) // 2] | |
| if sorted_angles[len(sorted_angles) // 2] | |
| and sorted_angles[len(sorted_angles) // 2 + 1] | |
| else 0 | |
| ) | |
Xet Storage Details
- Size:
- 508 Bytes
- Xet hash:
- 5c9ef6a5246b0ce95e3676cc2133378e22d83c2b3101111b74039b56a1aad74f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.