Ram-Lak reconstruction of a synthetic phantom
The same 128 by 128 ellipse phantom and 180 noiseless parallel-beam projections are rebuilt with a pure Ram–Lak ramp, |f|, and no extra window. Edges come back sharper than with a Shepp–Logan window, and the image rings more. It is still a formula, not a scan.
Phantom
Modified Shepp–Logan

Sinogram
Radon transform, angle by detector

Reconstruction
Filtered back projection

What this page generates
The Ram–Lak filter is the discrete ramp that compensates for the 1/|f| blur of unfiltered back projection. In this bench the projection is padded to the next power of two, at least twice as long and at least 64 samples, then multiplied in frequency by the absolute value of the DFT frequency in cycles per sample. There is no sinc and no cosine on top. Inverse transforming and keeping the original length gives the filtered projection.
Without a window, high-frequency bins keep their full weight. On a noiseless sinogram that sharpens the skull rim and the small ellipses. It also produces the oscillatory overshoot people call Gibbs ringing, especially next to the bright rim. Turning noise off on this page is intentional: ringing from the filter is easier to see when it is not mixed with grain from a random sinogram. Seed 4 is recorded anyway so the file matches the other phantom pages’ noise generator if you raise the noise later.
Angles and pixel size match the Shepp–Logan route, so a pixel-wise comparison is fair. Subtract the two reconstructions and the difference is the window, not a different object and not a different set of view angles. If your own FBP code disagrees with this PNG by a global scale factor, check the π/N normalization before you hunt for a bug in the ramp. The numeric array in the npz is the unwindowed display stretch; the PNG is percentile-stretched for viewing.
Nothing about a Ram–Lak picture makes it clinical. The object is still ten ellipses. The banner on the export is the same synthetic-data line used everywhere on MockDataLab.
Generating rule
Ramp
H(f) = |f| on the padded DFT; back projection scale π / 180
Check values
Worked numbers
Noise is off, so every sinogram bin is a deterministic ray sum. The ellipse image still has a dark corner (0.0) and a mid-grid value 0.200. The Ram–Lak rebuild is the one that rings beside the rim; the static PNG is that rebuild, seed 4 stored but unused.
Parameters and defaults
| Parameter | Default | Range | Effect |
|---|---|---|---|
| size | 128 | 32 to 160 | Grid for both the ellipse image and the reconstruction. |
| angles | 180 | 12 to 360 | Views. Fewer views add streak artifacts that are not the filter’s fault. |
| filter | Ram–Lak | three named windows | Pure ramp. Switch to Shepp–Logan to see the window’s effect. |
| noise fraction | 0 | 0 to 1 | Zero so ringing is from the ramp, not from random projections. |
| seed | 4 | unsigned 32-bit | Unused while noise is zero; stored so the file still names a seed. |
Python for this seed
Full script with mulberry32() & box_muller() available via Copy Python above
# SYNTHETIC DATA - generated by MockDataLab (mockdatalab.com)
SIZE = 128
ANGLES = 180
FILTER = "ram-lak"
NOISE_FRACTION = 0
SEED = 4
phantom = shepp_logan(SIZE)
clean = radon(phantom, ANGLES)
# box_muller noise and fbp() are in the copied scriptExercises
- EXERCISE 01Compare a pure ramp with a windowed ramp on an identical phantom.
- EXERCISE 02Point at Gibbs ringing beside the bright rim in a lecture.
- EXERCISE 03Check that a student ramp is |f| and not |f|².
Questions
Why does the rim look outlined twice?
The unwindowed ramp overshoots at a sharp density step. That double edge is the filter, not a second ellipse.
Is the phantom different from the Shepp–Logan page?
No. Same ellipses, same 128 grid, same 180 angles. Only the frequency window and the noise differ.
Does zero noise mean the seed does nothing?
The noise loop is skipped, so the seed is not consumed. It is still written into the metadata.
Related
- windowed Shepp–Logan filter on this phantom
- what the ramp has to cope with once noise is added
- change the angle count yourself
- other synthetic downloads
- Static CSV for seed 4
SYNTHETIC DATA - generated by MockDataLab (mockdatalab.com). Do not present the download as a real measurement.