bmad-sim / SimUtils.jl

Utility functions for scientific simulations.
https://bmad-sim.github.io/SimUtils.jl/
GNU Lesser General Public License v2.1
0 stars 1 forks source link

Pink Noise #10

Closed lllx125 closed 4 months ago

lllx125 commented 4 months ago

I wrote the code to generate pink noise from a given beta, where the spectrum is (1/f)^beta, and a given number of points. The algorithm is given by "Timmer, J. and Koenig, M.: On generating power law noise. Astron. Astrophys. 300, 707-710 (1995)". Test the spectrum by using plotspectrum function in PlotTimeSeries.jl

lllx125 commented 4 months ago

I couldn't make packages and modules work, so to test it, you need to write include("src/SimUtils.jl") using .SimUtils plotspectrum(gen_pinknoise(1.0))