Skip to content
Snippets Groups Projects
Commit e52e1711 authored by Olaf Hartwig's avatar Olaf Hartwig
Browse files

Remove default arguments from noises.py

parent 4702ed27
No related branches found
No related tags found
1 merge request!125Resolve "Laser noise parameters sometimes inconsistent between instrument.py and noises.py"
......@@ -134,7 +134,7 @@ def infrared(fs, size, asd):
return np.cumsum(red_noise) * (2 * pi / fs)
def laser(fs, size, asd=30, fknee=2E-3, shape='white+infrared'):
def laser(fs, size, asd, shape):
"""Generate laser noise [Hz].
This is a white noise with an infrared relaxation towards low frequencies,
......@@ -153,6 +153,7 @@ def laser(fs, size, asd=30, fknee=2E-3, shape='white+infrared'):
fknee: cutoff frequency [Hz]
shape: spectral shape, either 'white' or 'white+infrared'
"""
fknee = 2E-3
logger.debug(
"Generating laser noise (fs=%s Hz, size=%s, asd=%s "
"Hz/sqrt(Hz), fknee=%s Hz, shape=%s)",
......@@ -165,7 +166,7 @@ def laser(fs, size, asd=30, fknee=2E-3, shape='white+infrared'):
raise ValueError(f"invalid laser noise spectral shape '{shape}'")
def clock(fs, size, asd=6.32E-14):
def clock(fs, size, asd):
"""Generate clock noise fluctuations [ffd].
The power spectral density in fractional frequency deviations is a pink noise,
......@@ -179,7 +180,7 @@ def clock(fs, size, asd=6.32E-14):
return pink(fs, size, asd)
def modulation(fs, size, asd=5.2E-14):
def modulation(fs, size, asd):
"""Generate modulation noise [ffd].
The power spectral density as fractional frequency deviations reads
......@@ -195,7 +196,7 @@ def modulation(fs, size, asd=5.2E-14):
return powerlaw(fs, size, asd, 1/3)
def backlink(fs, size, asd=3E-12, fknee=2E-3):
def backlink(fs, size, asd, fknee):
"""Generate backlink noise as fractional frequency deviation [ffd].
The power spectral density in displacement is given by
......@@ -220,7 +221,7 @@ def backlink(fs, size, asd=3E-12, fknee=2E-3):
+ red(fs, size, 2 * pi * asd * fknee**2 / c)
def ranging(fs, size, asd=3E-9):
def ranging(fs, size, asd):
"""Generate stochastic ranging noise [s].
This is a white noise as a timing jitter,
......@@ -234,7 +235,7 @@ def ranging(fs, size, asd=3E-9):
return white(fs, size, asd)
def testmass(fs, size, asd=2.4E-15, fknee=0.4E-3):
def testmass(fs, size, asd, fknee):
"""Generate test-mass acceleration noise [m/s].
Expressed in acceleration, the noise power spectrum reads
......@@ -299,7 +300,7 @@ def jitter(fs, size, asd):
logger.debug("Generating jitter (fs=%s Hz, size=%s, asd=%s rad/sqrt(Hz))", fs, size, asd)
return violet(fs, size, 2 * pi * asd)
def dws(fs, size, asd=7E-8/335):
def dws(fs, size, asd):
"""Generate DWS measurement noise.
The power spectral density in angle is given by
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment