code: def load_field(path):
      '''Load QPI data using *_phase.txt files'''
      path = pathlib.Path(path)
      phase = load_file(path)
      inten = load_file(path.parent / (path.name[:-10] + "_intensity.txt"))
      ampli = np.sqrt(inten)
      return ampli * np.exp(1j * phasef load_field(path):
      '''Load QPI data using *_phase.txt files'''
      path = pathlib.Path(path)
      phase = load_file(path)
      inten = load_file(path.parent / (path.name[:-10] + "_intensity.txt"))
      ampli = np.sqrt(inten)
      return ampli * np.exp(1j * phase)
docs: Load QPI data using *_phase.txt files