def generate_random_phase_field(diffracted_pattern):
    pha_tmp = np.random.uniform(0, 2*np.pi, diffracted_pattern.shape)
    sample_obj = (np.fft.ifftn(diffracted_pattern * np.exp(1j*pha_tmp)) *
                  np.sqrt(np.size(diffracted_pattern)))
    return sample_obj
Convert AsciiDoc source file to a backend output file using the global
dataset/ETHPy150Open scikit-beam/scikit-beam/skbeam/core/cdi.py/generate_random_phase_field--crossover with--dataset/ETHPy150Open FooBarWidget/mizuho/asciidoc/a2x.py/A2X.to_backend