Stochastic Signals
Stochastic Base Class
- class lisatools.stochastic.StochasticContribution[source]
Bases:
ABC
Base Class for Stochastic Contributions to the PSD.
- ndim = None
- added_stochastic_list = []
- classmethod get_Sh(f, *params, **kwargs)[source]
Calculate the power spectral density of the stochastic contribution.
Combinatorial Stochastic Container
- class lisatools.stochastic.StochasticContributionContainer(stochastic_contribution_dict)[source]
Bases:
object
Container for multiple Stochastic Contributions
- Parameters:
stochastic_contribution_dict (
dict
[StochasticContribution
]) – Dictionary with multiple Stochastic entries. Keys are the names and values are of typeStochasticContribution
.
- property stochastic_contribution_dict: dict[StochasticContribution]
Stochastic contribution storage.
- get_Sh(f, params_dict, kwargs_dict)[source]
Calculate Sh for stochastic contribution.
- Parameters:
f (
float
|ndarray
) – Frequency array.params_dict (
dict
[tuple
]) – Dictionary with keys equivalent toself.stochastic_contribution_dict.keys()
. Values are the parameters for each associated model.kwargs_dict (
dict
[dict
]) – Dictionary with keys equivalent toself.stochastic_contribution_dict.keys()
. Values are the keyword argument dicts for each associated model.
- Return type:
ndarray
- Returns:
Stochastic contribution.
Stock Stochastic Models
- class lisatools.stochastic.HyperbolicTangentGalacticForeground[source]
Bases:
StochasticContribution
Hyperbolic Tangent-based foreground fitting function.
- ndim = 5
- static specific_Sh_function(f, amp, fk, alpha, s1, s2)[source]
Hyperbolic tangent model 1 for the Galaxy foreground noise
This model for the PSD contribution from the Galactic foreground noise is given by
\[S_\text{gal} = \frac{A_\text{gal}}{2}e^{-s_1f^\alpha}f^{-7/3}\left[ 1 + \tanh{\left(-s_2 (f - f_k)\right)} \right],\]where \(A_\text{gal}\) is the amplitude of the stochastic signal, \(f_k\) is the knee frequency at which a bend occurs, math:alpha is a power law parameter, \(s_1\) is a slope parameter below the knee, and \(s_2\) is a slope parameter after the knee.:
- Parameters:
- Return type:
float
|ndarray
- Returns:
PSD of the Galaxy foreground noise
- class lisatools.stochastic.FittedHyperbolicTangentGalacticForeground[source]
Bases:
HyperbolicTangentGalacticForeground
- ndim = 1
- amp = 3.26651613e-44
- alpha = 1.18300266
- day = 86400.0
- month = 2635200.0
- year = 31557600.0
- Xobs = [86400.0, 7905600.0, 15811200.0, 31557600.0, 63115200.0, 126230400.0, 315576000.0]
- knee = [0.0115120924, 0.00401884128, 0.00347302482, 0.00277606177, 0.00241178384, 0.00209278117, 0.00157362626]
- Slope1 = [941.315118, 1368.87568, 1687.29474, 1763.27234, 2326.78814, 3014.30978, 3749.70124]
- Slope2 = [103.239773, 1033.51646, 1622.04855, 1686.31844, 2068.21665, 2957.74596, 3151.99454]
- Tmax = 315581497.635456
- classmethod specific_Sh_function(f, Tobs)[source]
Fitted hyperbolic tangent model 1 for the Galaxy foreground noise.
This class fits the parameters for
HyperbolicTangentGalacticForeground
using analytic estimates from (# TODO). The fit is a function of time, so the user inputsTobs
.# Sgal_1d = 2.2e-44*np.exp(-(fr**1.2)*0.9e3)*(fr**(-7./3.))*0.5*(1.0 + np.tanh(-(fr-1.4e-2)*0.7e2)) # Sgal_3m = 2.2e-44*np.exp(-(fr**1.2)*1.7e3)*(fr**(-7./3.))*0.5*(1.0 + np.tanh(-(fr-4.8e-3)*5.4e2)) # Sgal_1y = 2.2e-44*np.exp(-(fr**1.2)*2.2e3)*(fr**(-7./3.))*0.5*(1.0 + np.tanh(-(fr-3.1e-3)*1.3e3)) # Sgal_2y = 2.2e-44*np.exp(-(fr**1.2)*2.2e3)*(fr**(-7./3.))*0.5*(1.0 + np.tanh(-(fr-2.3e-3)*1.8e3)) # Sgal_4y = 2.2e-44*np.exp(-(fr**1.2)*2.9e3)*(fr**(-7./3.))*0.5*(1.0 + np.tanh(-(fr-2.0e-3)*1.9e3))