Stochastic Signals
- lisatools.stochastic.get_stock_gb_stochastic_options() List[StochasticContribution]
Get stock options for stochastic contributions.
- Returns:
List of stock stochastic options.
- lisatools.stochastic.get_default_stochastic_from_str(stochastic: str) StochasticContribution
Return a LISA stochastic from a
str
input.- Parameters:
stochastic – Stochastic contribution indicated with a
str
.- Returns:
Stochastic contribution associated to that
str
.
- lisatools.stochastic.check_stochastic(stochastic: Any) StochasticContribution
Check input stochastic contribution.
- Parameters:
stochastic – Stochastic contribution to check.
- Returns:
Stochastic contribution checked. Adjusted from
str
ifstr
input.
Stochastic Base Class
- class lisatools.stochastic.StochasticContribution
Bases:
ABC
Base Class for Stochastic Contributions to the PSD.
- classmethod get_Sh(f: float | ndarray, *params: ndarray | list, **kwargs: Any) float | ndarray
Calculate the power spectral density of the stochastic contribution.
- Parameters:
f – Frequency array.
*params – Parameters for the stochastic model.
**kwargs – Keyword arguments for the stochastic model.
- static specific_Sh_function(f: float | ndarray, *args: Any, **kwargs: Any) float | ndarray
Calculate the power spectral density contained in a stochastic signal contribution.
- Parameters:
f – Frequency array.
*args – Any arguments for the function.
**kwargs – Any keyword arguments for the function.
- Returns:
Power spectral density contained in stochastic signal.
Combinatorial Stochastic Container
- class lisatools.stochastic.StochasticContributionContainer(stochastic_contribution_dict: dict[StochasticContribution])
Bases:
object
Container for multiple Stochastic Contributions
- Parameters:
stochastic_contribution_dict – Dictionary with multiple Stochastic entries. Keys are the names and values are of type
StochasticContribution
.
- property stochastic_contribution_dict: dict[StochasticContribution]
Stochastic contribution storage.
- get_Sh(f: float | ndarray, params_dict: dict[tuple], kwargs_dict: dict[dict]) ndarray
Calculate Sh for stochastic contribution.
- Parameters:
f – Frequency array.
params_dict – Dictionary with keys equivalent to
self.stochastic_contribution_dict.keys()
. Values are the parameters for each associated model.kwargs_dict – Dictionary with keys equivalent to
self.stochastic_contribution_dict.keys()
. Values are the keyword argument dicts for each associated model.
- Returns:
Stochastic contribution.
Stock Stochastic Models
- class lisatools.stochastic.HyperbolicTangentGalacticForeground
Bases:
StochasticContribution
Hyperbolic Tangent-based foreground fitting function.
- static specific_Sh_function(f: float | ndarray, amp: float, fk: float, alpha: float, s1: float, s2: float) float | ndarray
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:
f – Frequency array.
amp – Amplitude parameter for the Galaxy.
fk – Knee frequency in Hz.
alpha – Power law parameter.
s1 – Slope parameter below knee.
s2 – Slope parameter above knee.
- Returns:
PSD of the Galaxy foreground noise
- class lisatools.stochastic.FittedHyperbolicTangentGalacticForeground
Bases:
HyperbolicTangentGalacticForeground
- classmethod specific_Sh_function(f: float | ndarray, Tobs: float) float | ndarray
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))
- Parameters:
f – Frequency array.
Tobs – Observation time in seconds.
- Returns:
PSD of the Galaxy foreground noise