Power spectra-generating code