Skip to content

Instantly share code, notes, and snippets.

@sjroe
sjroe / flatten_detector.py
Created September 16, 2023 13:23
TIGRE Flatten Detector
import math
import numpy as np
import tigre
def flatten_detector(proj, geo, arclength, oversample=1):
(num_angles, num_detector_rows, orig_num_detectors) = np.shape(proj)
pixel_arclength = arclength / orig_num_detectors
# Calculate the size of the detector projected from the arc onto the plane
# This is slightly different for odd and even detectors