colorednoise
Python package to generate Gaussian (1/f)**beta noise (e.g. pink noise)
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 5 committers (40.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.4%) to scientific vocabulary
Keywords
correlations
noise-generator
power-laws
python
python2
python3
time-series
Last synced: 6 months ago
·
JSON representation
Repository
Python package to generate Gaussian (1/f)**beta noise (e.g. pink noise)
Basic Info
- Host: GitHub
- Owner: felixpatzelt
- License: mit
- Language: Python
- Default Branch: master
- Size: 2.48 MB
Statistics
- Stars: 212
- Watchers: 3
- Forks: 22
- Open Issues: 2
- Releases: 7
Topics
correlations
noise-generator
power-laws
python
python2
python3
time-series
Created over 8 years ago
· Last pushed over 2 years ago
Metadata Files
Readme
Changelog
License
README.rst
colorednoise.py
===============
Generate Gaussian distributed noise with a power law spectrum with arbitrary
exponents.
An exponent of two corresponds to brownian noise. Smaller exponents
yield long-range correlations, i.e. pink noise for an exponent of 1 (also
called 1/f noise or flicker noise).
Based on the algorithm in:
Timmer, J. and Koenig, M.:
On generating power law noise.
Astron. Astrophys. 300, 707-710 (1995)
Further reading:
`Colors of noise on Wikipedia /en.wikipedia.org/wiki/Colors_of_noise>`_
Installation
------------
pip install colorednoise
Dependencies
------------
- Python >= 3.6.15
- NumPy >= 1.17.0
Older Python 3 versions were not tested, but are likely to work.
For Python 2 please use colorednoise version 1.x.
Examples
--------
.. code:: python
import colorednoise as cn
beta = 1 # the exponent
samples = 2**18 # number of samples to generate
y = cn.powerlaw_psd_gaussian(beta, samples)
# optionally plot the Power Spectral Density with Matplotlib
#from matplotlib import mlab
#from matplotlib import pylab as plt
#s, f = mlab.psd(y, NFFT=2**13)
#plt.loglog(f,s)
#plt.grid(True)
#plt.show()
.. code:: python
# generate several time series of independent indentically distributed variables
# repeat the simulation of each variable multiple times
import colorednoise as cn
n_repeats = 10 # repeat simulatons
n_variables = 5 # independent variables in each simulation
timesteps = 1000 # number of timesteps for each variable
y = cn.powerlaw_psd_gaussian(1, (n_repeats, n_variables, timesteps))
# the expected variance of for each variable is 1, but each realisation is different
print(y.std(axis=-1))
.. code:: python
# generate a broken power law spectrum: white below a frequency of
import colorednoise as cn
y = cn.powerlaw_psd_gaussian(1, 10**5, fmin=.05)
s, f = mlab.psd(y, NFFT=2**9)
#plt.loglog(f,s)
#plt.grid(True)
#plt.show()
Owner
- Name: Felix Patzelt
- Login: felixpatzelt
- Kind: user
- Company: @moia-dev
- Website: felixpatzelt.com
- Repositories: 5
- Profile: https://github.com/felixpatzelt
Data Science and Interdisciplinary Physics - Socioeconomic and Neural Systems
GitHub Events
Total
- Watch event: 17
- Fork event: 2
Last Year
- Watch event: 17
- Fork event: 2
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Felix Patzelt | f****x@n****e | 32 |
| Alex Spaeth | a****h@u****u | 4 |
| charles | c****s@a****o | 1 |
| Rudolf A Braun | r****4@g****m | 1 |
| Onno Eberhard | o****d | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 7
- Total pull requests: 12
- Average time to close issues: 11 days
- Average time to close pull requests: 10 days
- Total issue authors: 7
- Total pull request authors: 6
- Average comments per issue: 4.14
- Average comments per pull request: 1.67
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- vbschettino (1)
- rbracco (1)
- richgumy (1)
- tomato18463 (1)
- yxiao1996 (1)
- terrytykuo (1)
- paulbrodersen (1)
Pull Request Authors
- felixpatzelt (5)
- i-aki-y (1)
- onnoeberhard (1)
- atspaeth (1)
- charlesincharge (1)
- RuABraun (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 16,458 last-month
- Total docker downloads: 10
- Total dependent packages: 9
- Total dependent repositories: 21
- Total versions: 7
- Total maintainers: 1
pypi.org: colorednoise
Generate Gaussian (1/f)**beta noise (e.g. pink noise)
- Homepage: http://github.com/felixpatzelt/colorednoise
- Documentation: https://colorednoise.readthedocs.io/
- License: MIT
-
Latest release: 2.2.0
published over 2 years ago
Rankings
Dependent packages count: 1.6%
Dependent repos count: 3.2%
Docker downloads count: 3.8%
Average: 4.7%
Downloads: 5.3%
Stargazers count: 5.6%
Forks count: 8.9%
Maintainers (1)
Last synced:
6 months ago
Dependencies
setup.py
pypi
- numpy >=1.17.0