CERN / TIGRE

TIGRE: Tomographic Iterative GPU-based Reconstruction Toolbox
BSD 3-Clause "New" or "Revised" License
550 stars 182 forks source link

remove unnecessary code #389

Closed pjueon closed 2 years ago

pjueon commented 2 years ago

In the demo 16 of python, the offsets were already set.

AnderBiguri commented 2 years ago

Hi! You are correct, but those lines are there more to showcase that you can do it, rather than to have functioning code. Maybe the change required is to clarify that in the comments, something like

# Offsets (Optional, the default values are zero, thus there is no need to define them if you have none).

Or a similar explanatory comment

pjueon commented 2 years ago

You mean I removed all the lines that set offsets and am using the default values of the offsets? No, what I was trying to say was that there were exactly same lines right above them.

# Offsets
geo.offOrigin = np.array([0, 0, 0])  # Offset of image from origin   (mm)
geo.offDetector = np.array([0, 0])  # Offset of Detector            (mm)
# MAKE SURE THAT THE DETECTOR PIXELS SIZE IN V IS THE SAME AS THE IMAGE!

# Offsets
geo.offOrigin = np.array([0, 0, 0])  # Offset of image from origin   (mm)
geo.offDetector = np.array([0, 0])  # Offset of Detector            (mm)
AnderBiguri commented 2 years ago

Ah, I checked the file wrong, Accidentaly oppened your modified version rather than TIGRE, you are absolutely right.