GID Class ========= The ``GID`` class provides a framework for analyzing Grazing Incidence Diffraction data taken with a linear detector and Soller collimator. The class manages data loading, normalization, and transformation into reciprocal space, providing an interface for simple analysis. This is complimented by a simple peak fitting procedure to quickly estimate peak parameters. Overview -------- Grazing Incidence Diffraction (GID) involves directing X-rays at a surface at a very shallow angle, typically below the critical angle for total external reflection. This configuration maximizes surface sensitivity and minimizes background signal from the bulk substrate. The scattered intensity is recorded as a function of the in-plane scattering angle and the out-of-plane angle, providing information about the lateral organization of molecules or atoms at the interface. The ``GID`` class is designed to facilitate analysis of these measurements at the ID10-SURF beamline at ESRF. It automates the following steps: * **Data Loading:** Reads raw data from HDF5 files generated by the beamline control system. It handles single or multiple scans, concatenating them as needed. * **Normalization:** Corrects raw counts for monitor intensity and filter transmission. * **Reciprocal Space Conversion:** Converts detector pixel coordinates and motor angles into scattering vectors (:math:`q_{xy}` and :math:`q_z`). This conversion takes into account a gap between two modules of the Mythen detector, typically used for these experiments. * **Visualization:** Provides built-in methods to plot 2D maps of intensity in reciprocal space, as well as 1D cuts (profiles) along specific directions (:math:`q_{xy}` or :math:`q_z`). * **Analysis:** Includes methods for fitting peaks using various lineshapes (Gaussian, Lorentzian, Voigt) to extract structural parameters like lattice spacing and coherence length. Key Features ------------ * **Flexible ROI Integration:** Easily extract 1D intensity profiles by integrating over a region of interest (ROI) in the q-space. * **Automated Plotting:** Quick "standard analysis" plots allow for immediate data inspection during or after an experiment. * **Data Export:** Save processed data (cuts, 2D maps) in standard formats (ASCII .dat, HDF5, images) for publication or further analysis with external tools. .. autoclass:: ESRF_ID10_SURF.GID.GID :members: :undoc-members: :show-inheritance: