Skip to content

Commit

Permalink
Update demo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mao114 authored Sep 1, 2021
1 parent 706ca14 commit 4ef39c6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
# Uncomment the following line to generate correlation matrix
# corr_mat(-0.1,'./data/')

# Generate correlation matrix for tilt. Do this once for each different turbulence parameter.
tilt_mat(x.shape[1], 0.1, 0.05, 3000)

# Load image, permute axis if color
x = plt.imread('./images/color.png')

if len(x.shape) == 3:
x = x.transpose((2,0,1))
x = torch.tensor(x, device = device, dtype=torch.float32)

# Generate correlation matrix for tilt. Do this once for each different turbulence parameter.
tilt_mat(x.shape[1], 0.1, 0.05, 3000)

# Simulate
simulator = Simulator(2, 512).to(device, dtype=torch.float32)

Expand Down

0 comments on commit 4ef39c6

Please sign in to comment.