Sensitivity Information
The sensitivity code is heavily based on an original code by Stas Babak, Antoine Petiteau for the LDC team.
- References for noise models:
‘Proposal’: LISA Consortium Proposal for L3 mission: LISA_L3_20170120 (https://atrium.in2p3.fr/13414ec1-c9ac-44b4-bace-7004468f684c)
‘SciRDv1’: Science Requirement Document: ESA-L3-EST-SCI-RS-001 14/05/2018 (https://atrium.in2p3.fr/f5a78d3e-9e19-47a5-aa11-51c81d370f5f)
‘MRDv1’: Mission Requirement Document: ESA-L3-EST-MIS-RS-001 08/12/2017
‘sangria’: Model used for LDC2A data generation.
- lisatools.sensitivity.get_sensitivity(f, *args, sens_fn=<class 'lisatools.sensitivity.LISASens'>, return_type='PSD', **kwargs)[source]
Generic sensitivity generator
Same interface to many sensitivity curves.
- Parameters:
f (
float
|ndarray
) – Frequency array.*args (
tuple
) – Any additional arguments for the sensitivity functionget_Sn
method.sens_fn (
Union
[Sensitivity
,str
,None
], default:<class 'lisatools.sensitivity.LISASens'>
) – String or class that represents the name of the desired PSD function.return_type (default:
'PSD'
) – Described the desired output. Choices are ASD, PSD, or char_strain (characteristic strain). Default is ASD.**kwargs – Keyword arguments to pass to sensitivity function
get_Sn
method.
- Return type:
float
|ndarray
- Returns:
Sensitivity values.
- lisatools.sensitivity.get_stock_sensitivity_options()[source]
Get stock options for sensitivity curves.
- Return type:
- Returns:
List of stock sensitivity options.
- lisatools.sensitivity.get_stock_sensitivity_matrix_options()[source]
Get stock options for sensitivity matrix.
- Return type:
- Returns:
List of stock sensitivity matrix options.
Sensitivity Matrix
The sensitivity matrix is designed to house sensitivity information that will enter into the Likelihood function.
It is a matrix because the 3 channels in LISA will be correlated. Therefore, in XYZ channels, this is a 3x3 matrix that includes correlated cross-terms between the channels.
When working with AET channels (uncorrelated in idealized noise situations), then the sensitivity matrix will be an array of length 2 for AE or 3 for AET.
The lisatools.diagnostic.inner_product()
will adjust its computation based on the shape of the sensitivity matrix input.
The user does not have to do anything special for this change to work. It happens under the hood.
- class lisatools.sensitivity.SensitivityMatrix(f, sens_mat, *sens_args, **sens_kwargs)[source]
Bases:
object
Container to hold sensitivity information.
- Parameters:
f (
ndarray
) – Frequency array.sens_mat (
Union
[List
[List
[ndarray
|Sensitivity
]],List
[ndarray
|Sensitivity
],ndarray
,Sensitivity
]) – Input sensitivity list. The shape of the nested lists should represent the shape of the desired matrix. Each entry in the list must be an array,Sensitivity
-derived object, or a string corresponding to theSensitivity
object.**sens_kwargs (
dict
) – Keyword arguments to pass toSensitivity.get_Sn()
.
- property frequency_arr: ndarray
- update_frequency_arr(frequency_arr)[source]
Update class with new frequency array.
- Parameters:
frequency_arr (
ndarray
) – Frequency array.- Return type:
- update_stochastic(**kwargs)[source]
Update class with new stochastic function.
- Parameters:
**kwargs (
dict
) – Keyword arguments update forlisatools.sensitivity.Sensitivity.get_stochastic_contribution()
. This operation will combine the new and old kwarg dictionaries, updating any old information with any added corresponding new information. Note: any old information that is not updated will remain in place.- Return type:
- property sens_mat: ndarray
Get sensitivity matrix.
- loglog(ax=None, fig=None, inds=None, char_strain=False, **kwargs)[source]
Produce a log-log plot of the sensitivity.
- Parameters:
ax (
Optional
[Axes
], default:None
) – Matplotlib Axes objects to add plots. Either a list of Axes objects or a single Axes object.fig (
Optional
[Figure
], default:None
) – Matplotlib figure object.inds (
Union
[int
,tuple
,None
], default:None
) – Integer index to select out which data to add to a single access. A list can be provided if ax is a list. They must be the same length.char_strain (
Optional
[bool
], default:False
) – IfTrue
, plot in characteristic strain representation. Note: assumes the sensitivity is input as power spectral density.**kwargs (
dict
) – Keyword arguments to be passed tologlog
function in matplotlib.
- Return type:
- Returns:
Matplotlib figure and axes objects in a 2-tuple.
Stock Sensitivity Matrices
- class lisatools.sensitivity.XYZ1SensitivityMatrix(f, **sens_kwargs)[source]
Bases:
SensitivityMatrix
Default sensitivity matrix for XYZ (TDI 1)
This is 3x3 symmetric matrix.
- Parameters:
f (
ndarray
) – Frequency array.**sens_kwargs (
dict
) – Keyword arguments to pass toSensitivity.get_Sn()
.
- class lisatools.sensitivity.AET1SensitivityMatrix(f, **sens_kwargs)[source]
Bases:
SensitivityMatrix
Default sensitivity matrix for AET (TDI 1)
This is just an array because no cross-terms.
- Parameters:
f (
ndarray
) – Frequency array.**sens_kwargs (
dict
) – Keyword arguments to pass toSensitivity.get_Sn()
.
- class lisatools.sensitivity.AE1SensitivityMatrix(f, **sens_kwargs)[source]
Bases:
SensitivityMatrix
Default sensitivity matrix for AE (no T) (TDI 1)
- Parameters:
f (
ndarray
) – Frequency array.**sens_kwargs (
dict
) – Keyword arguments to pass toSensitivity.get_Sn()
.
- class lisatools.sensitivity.LISASensSensitivityMatrix(f, nchannels, **sens_kwargs)[source]
Bases:
SensitivityMatrix
Default sensitivity matrix adding
LISASens
for the specified number of channels.- Parameters:
f (
ndarray
) – Frequency array.nchannels (
int
) – Number of channels.**sens_kwargs (
dict
) – Keyword arguments to pass toSensitivity.get_Sn()
.
Sensitivity Base Class
- class lisatools.sensitivity.Sensitivity[source]
Bases:
ABC
Base Class for PSD information.
The initialization function is only needed if using a file input.
- static transform(f, Spm, Sop, **kwargs)[source]
Transform from the base sensitivity functions to the TDI PSDs.
- classmethod get_Sn(f, model=LISAModel(Soms_d=2.25e-22, Sa_a=9e-30, orbits=<lisatools.detector.DefaultOrbits object>, name='scirdv1'), **kwargs)[source]
Calculate the PSD
- Parameters:
f (
float
|ndarray
) – Frequency array.model (
Union
[LISAModel
,str
,None
], default:LISAModel(Soms_d=2.25e-22, Sa_a=9e-30, orbits=<lisatools.detector.DefaultOrbits object at 0x1525caba0>, name='scirdv1')
) –Noise model. Object of type
lisa_models.LISAModel
. It can also be a string corresponding to one of the stock models. The model object must include attributes forSoms_d
(shot noise) andSa_a
(acceleration noise) or a spline as attributeSn_spl
. In the case of a spline, this must be a dictionary with channel names as keys and callable PSD splines. For example, if usingscipy.interpolate.CubicSpline
, an input option can be:``` noise_model.Sn_spl = {
”A”: CubicSpline(f, Sn_A)), “E”: CubicSpline(f, Sn_E)), “T”: CubicSpline(f, Sn_T))
**kwargs (
dict
) – For interoperability.
- Return type:
float
|ndarray
- Returns:
PSD values.
- classmethod get_stochastic_contribution(f, stochastic_params=(), stochastic_kwargs={}, stochastic_function=None)[source]
Calculate contribution from stochastic signal.
This function directs and wraps the calculation of and returns the stochastic signal. The
stochastic_function
calculates the sensitivity contribution. Thetransform_factor
can transform that output to the correct TDI contribution.- Parameters:
f (
float
|ndarray
) – Frequency array.stochastic_params (
Optional
[tuple
], default:()
) – Parameters (arguments) to feed tostochastic_function
.stochastic_kwargs (
Optional
[dict
], default:{}
) – Keyword arguments to feeed tostochastic_function
.stochastic_function (
Union
[StochasticContribution
,str
,None
], default:None
) – Stochastic class or string name of stochastic class. Takesstochastic_args
andstochastic_kwargs
. IfNone
, it usesFittedHyperbolicTangentGalacticForeground
.
- Return type:
float
|ndarray
- Returns:
Contribution from stochastic signal.
Stock Sensitivity Models
- class lisatools.sensitivity.LISASens[source]
Bases:
Sensitivity
- classmethod get_Sn(f, model=LISAModel(Soms_d=2.25e-22, Sa_a=9e-30, orbits=<lisatools.detector.DefaultOrbits object>, name='scirdv1'), average=True, **kwargs)[source]
Compute the base LISA sensitivity function.
- Parameters:
f (
float
|ndarray
) – Frequency array.model (
Union
[LISAModel
,str
,None
], default:LISAModel(Soms_d=2.25e-22, Sa_a=9e-30, orbits=<lisatools.detector.DefaultOrbits object at 0x1525caba0>, name='scirdv1')
) – Noise model. Object of typelisa_models.LISAModel
. It can also be a string corresponding to one of the stock models.average (
bool
, default:True
) – Whether to apply averaging factors to sensitivity curve. Antenna response:av_resp = np.sqrt(5) if average else 1.0
Projection effect:Proj = 2.0 / np.sqrt(3) if average else 1.0
**kwargs (
dict
) – Keyword arguments to pass toget_stochastic_contribution()
. # TODO: fix
- Return type:
float
|ndarray
- Returns:
Sensitivity array.
- class lisatools.sensitivity.CornishLISASens[source]
Bases:
LISASens
PSD from https://arxiv.org/pdf/1803.01944.pdf
Power Spectral Density for the LISA detector assuming it has been active for a year. I found an analytic version in one of Niel Cornish’s paper which he submitted to the arXiv in 2018. I evaluate the PSD at the frequency bins found in the signal FFT.
PSD obtained from: https://arxiv.org/pdf/1803.01944.pdf
- static get_Sn(f, average=True, **kwargs)[source]
Compute the base LISA sensitivity function.
- Parameters:
f (
float
|ndarray
) – Frequency array.model – Noise model. Object of type
lisa_models.LISAModel
. It can also be a string corresponding to one of the stock models.average (
bool
, default:True
) – Whether to apply averaging factors to sensitivity curve. Antenna response:av_resp = np.sqrt(5) if average else 1.0
Projection effect:Proj = 2.0 / np.sqrt(3) if average else 1.0
**kwargs (
dict
) – Keyword arguments to pass toget_stochastic_contribution()
. # TODO: fix
- Return type:
float
|ndarray
- Returns:
Sensitivity array.
- class lisatools.sensitivity.FlatPSDFunction[source]
Bases:
LISASens
White Noise PSD function.
- static get_Sn(f, val, **kwargs)[source]
Compute the base LISA sensitivity function.
- Parameters:
f (
float
|ndarray
) – Frequency array.model – Noise model. Object of type
lisa_models.LISAModel
. It can also be a string corresponding to one of the stock models.average – Whether to apply averaging factors to sensitivity curve. Antenna response:
av_resp = np.sqrt(5) if average else 1.0
Projection effect:Proj = 2.0 / np.sqrt(3) if average else 1.0
**kwargs (
dict
) – Keyword arguments to pass toget_stochastic_contribution()
. # TODO: fix
- Return type:
float
|ndarray
- Returns:
Sensitivity array.
- class lisatools.sensitivity.X1TDISens[source]
Bases:
Sensitivity
- static transform(f, Spm, Sop, **kwargs)[source]
Transform from the base sensitivity functions to the TDI PSDs.
- class lisatools.sensitivity.XY1TDISens[source]
Bases:
Sensitivity
- static transform(f, Spm, Sop, **kwargs)[source]
Transform from the base sensitivity functions to the TDI PSDs.
- class lisatools.sensitivity.YZ1TDISens[source]
Bases:
XY1TDISens
- class lisatools.sensitivity.ZX1TDISens[source]
Bases:
XY1TDISens
- class lisatools.sensitivity.A1TDISens[source]
Bases:
Sensitivity
- static transform(f, Spm, Sop, **kwargs)[source]
Transform from the base sensitivity functions to the TDI PSDs.
- class lisatools.sensitivity.T1TDISens[source]
Bases:
Sensitivity
- static transform(f, Spm, Sop, **kwargs)[source]
Transform from the base sensitivity functions to the TDI PSDs.
- class lisatools.sensitivity.X2TDISens[source]
Bases:
Sensitivity
- static transform(f, Spm, Sop, **kwargs)[source]
Transform from the base sensitivity functions to the TDI PSDs.