  Although charge density wave (CDW) correlations appear to be a ubiquitous
feature of the superconducting cuprates, their disparate properties suggest a
crucial role for coupling or pinning of the CDW to lattice deformations and
disorder. While diffraction intensities can demonstrate the occurrence of CDW
domain formation, the lack of scattering phase information has limited our
understanding of this process. Here, we report coherent resonant x-ray speckle
correlation analysis, which directly determines the reproducibility of CDW
domain patterns in La1.875Ba0.125CuO4 (LBCO 1/8) with thermal cycling. While
CDW order is only observed below 54 K, where a structural phase transition
results in equivalent Cu-O bonds, we discover remarkably reproducible CDW
domain memory upon repeated cycling to temperatures well above that transition.
That memory is only lost on cycling across the transition at 240(3) K that
restores the four-fold symmetry of the copper-oxide planes. We infer that the
structural-domain twinning pattern that develops below 240 K determines the CDW
pinning landscape below 54 K. These results open a new view into the complex
coupling between charge and lattice degrees of freedom in superconducting
cuprates.
