Skip to content

Commit

Permalink
Take log of amplitude before min-max computation.
Browse files Browse the repository at this point in the history
  • Loading branch information
tibuch committed Jan 11, 2021
1 parent 0b89fb2 commit 1c86adf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fit/datamodules/tomo_rec/FCDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def __init__(self, ds, mag_min, mag_max, part='train', img_shape=42):

tmp_sinos = torch.stack(tmp_sinos)
tmp_sinos = torch.fft.rfftn(tmp_sinos, dim=[1,2]).abs()
tmp_sinos[tmp_sinos == 0] = 1.
tmp_sinos = torch.log(tmp_sinos)
self.mag_min = tmp_sinos.min()
self.mag_max = tmp_sinos.max()
else:
Expand Down

0 comments on commit 1c86adf

Please sign in to comment.