Commit 601e8376 authored by jansen31's avatar jansen31
Browse files


parent 5a79d4e4
import numpy as np
import matplotlib.pyplot as plt
import numpy as np
from proxtoolbox.experiments.orbitaltomography.planar_molecule import PlanarMolecule
from proxtoolbox.utils.orbitaltomog import shifted_fft, fourier_interpolate
from proxtoolbox.utils.visualization.complex_field_visualization import complex_to_rgb
from proxtoolbox.utils.orbitaltomog import bin_array, shifted_fft, shifted_ifft, fourier_interpolate, roll_to_pos
class DegenerateOrbital(PlanarMolecule):
......@@ -143,11 +143,13 @@ class DegenerateOrbital(PlanarMolecule):
def plot_guess(self, u, name=None, show=True, interpolate_and_zoom=False, figsize=(12,3)):
""""Given a list of fields, plot the individual fields and the combined intensity"""
prop = self.propagator(self)
prop = self.propagator(self) # This is not a string but the indicated class itself, to be instanciated
u_hat = prop.eval(u)
fourier_intensity = np.sqrt(np.sum(abs(u_hat) ** 2, axis=0))
if interpolate_and_zoom:
u_show = self.interp_zoom_field(u)
u_show = u
fig, ax = plt.subplots(1, len(u) + 2, figsize=figsize, num=name)
for ii in range(self.degeneracy):
im = ax[ii].imshow(complex_to_rgb(u_show[ii]))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment