Skip to content

Instantly share code, notes, and snippets.

@bmorris3
Created October 13, 2015 23:51
Show Gist options
  • Save bmorris3/929b5748c1f40d3c4a40 to your computer and use it in GitHub Desktop.
Save bmorris3/929b5748c1f40d3c4a40 to your computer and use it in GitHub Desktop.
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from shampoo.reconstruction import Hologram
import matplotlib.pyplot as plt
hologram_path = 'data/Hologram.tif'
propagation_distance = 0.0369 # m
# Full res: 2 s, Rebin 2x2: 0.5 s, 4x4: 0.125
binning = 1
if binning == 1:
n = 1024
interval = 4
import numpy as np
h = Hologram(hologram_path, background_interval=interval)
waveform = h.reconstruct(propagation_distance,
plot_aberration_correction=False)
elif binning == 2:
import numpy as np
n = 512
interval = 2
h = Hologram(hologram_path, rebin_factor=2, background_interval=interval)
waveform = h.reconstruct(propagation_distance,
plot_aberration_correction=False)
fig, ax = waveform.plot(all=True)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment