The main subject of this manuscript is the X-ray diffraction of charge density wave (CDW) materials. We studied the quasi-1D NbSe3 crystal and the quasi-2D TbTe3. Several large instruments facilities were used for this study, the ESRF synchrotron in Grenoble on the ID01 line and the LCLS free electron laser in Stanford. First, thanks to the coherence of the X-beam at LCLS, we were able to observe a loss of transverse coherence in NbSe3 when applying an electrical current above a certain threshold as well as a longitudinal compression of the CDW. Then, at the ESRF, we used an X-ray beam focused on the micrometer scale by a Fresnel zone plate to scan the CDW locally by diffraction on NbSe3 and on TbTe3. When a current is applied to the sampl...