plot_sources_on_sc
- legwork.visualisation.plot_sources_on_sc(f_dom, snr, weights=None, snr_cutoff=0, t_obs='auto', instrument='LISA', custom_psd=None, L='auto', approximate_R=False, confusion_noise='auto', fig=None, ax=None, show=True, sc_vis_settings={}, **kwargs)[source]
Overlay stationary sources on the LISA sensitivity curve.
Each source is plotted at its max snr harmonic frequency such that that its height above the curve is equal to it signal-to-noise ratio. For circular sources this is frequency is simply twice the orbital frequency.
- Parameters
- f_domfloat/array
Dominant harmonic frequency (f_orb * n_dom where n_dom is the harmonic with the maximum snr). You may find the
legwork.source.Source.max_snr_harmonic()
attribute useful (which gets populated) afterlegwork.source.Source.get_snr()
.- snrfloat/array
Signal-to-noise ratio
- weightsfloat/array, optional, default=None
Statistical weights for each source, default is equal weights
- snr_cutofffloat
SNR above which to plot binaries (default is 0 such that all sources are plotted)
- instrument: {{ `LISA`, `TianQin`, `custom` }}
Instrument to use. LISA is used by default. Choosing custom uses
custom_psd
to compute PSD.- custom_psdfunction
Custom function for computing the PSD. Must take the same arguments as
legwork.psd.lisa_psd()
even if it ignores some.- t_obsfloat
Observation time (default auto)
- Lfloat
Arm length in metres
- approximate_Rboolean
Whether to approximate the response function (default: no)
- confusion_noisevarious
Galactic confusion noise. Acceptable inputs are either one of the values listed in
legwork.psd.get_confusion_noise()
, “auto” (automatically selects confusion noise based on instrument - ‘robson19’ if LISA and ‘huang20’ if TianQin), or a custom function that gives the confusion noise at each frequency for a given mission length where it would be called by running noise(f, t_obs) and return a value with units of inverse Hertz- fig: `matplotlib Figure`
A figure on which to plot the distribution. Both ax and fig must be supplied for either to be used
- ax: `matplotlib Axis`
An axis on which to plot the distribution. Both ax and fig must be supplied for either to be used
- showboolean
Whether to immediately show the plot or only return the Figure and Axis
- sc_vis_settingsdict
Dictionary of parameters to pass to
plot_sensitivity_curve()
, e.g. {“y_quantity”: “h_c”} will plot characteristic strain instead of ASD- **kwargsvarious
This function is a wrapper on
legwork.visualisation.plot_2D_dist()
and each kwarg is passed directly to this function. For example, you can write disttype=”kde” for a kde density plot instead of a scatter plot.
- Returns
- figmatplotlib Figure
The figure on which the distribution is plotted
- axmatplotlib Axis
The axis on which the distribution is plotted