Model spectra (i.e. theoretically calculated spectra), as they can be obtained from the Internet, have dispersions (Angstroem/step size), which usually differ significantly from the measured ones. In order to be able to compare such theoretical spectra with the (own) measured spectra, it makes sense to fold the higher resolved spectra (mostly the theoretical ones) with the apparatus profile of the less resolved spectra (in the form of the FWHM of the narrowest lines in the measured spectrum, preferably the terrestrial lines) assumed as the Gaussian profile.
Likewise, spectra with different resolutions can be brought to a common (lower) resolution by convolution.
A simple Python3 script convol_dat_e.py (download here) is used for folding a 1d-spectrum with a Gaussian function, available in the form of a 2-column ASCII file. Preferably tab-separated and with the column headings WAVE and FLUX. If this is not the case, change the files accordingly or adapt the Python script. Enter the path/name of the ASCII file and the standard deviation of the Gaussian function to be used for folding (in multiples of the step size of the spectrum). The folded spectrum is stored as tab-separated float number pairs in two columns ‚WAVE‘ and ‚FLUX‘. The original file name is supplemented by the appendix „_convoluted“ to distinguish it from the original.