xpecgen is a python package to calculate x-ray spectra generated in tungsten anodes using the model of Med. Phys. 43, 4655. It includes a Graphical User Interface and allows calculation of half-value-layers, norms, and attenuation. It can also export the calculations in XLSX and CSV formats.
For more information check the GitHub repository.