API

GWDALI.GWDALI(Detection_Dict, FreeParams, detectors, approximant='TaylorF2', fmin=1, fmax=1.e4, fsize=3000, dali_method='Fisher_Sampling', sampler_method='nestle', new_priors=None, save_fisher=True, save_cov=True, plot_corner=True, save_samples=True, hide_info=False, index=1, rcond=1.e-4, diff_order=2, step_size=1.e-6, run_sampler=True, npoints=300)

Return GW samples, Fisher and covariance matrix, parameters uncertainties, parameters recovered and signal to noise ratio (SNR).

Parameters:
  • Detection_Dict (dict) – A dictionary of GW parameters;

  • FreeParams (list) – list of free parameters among the available [‘m1’, ‘m2’, ‘RA’, ‘Dec’, ‘DL’, ‘inv_dL’, ‘ln_dL’, ‘iota’, ‘cos_iota’, ‘psi’, ‘t_coal’, ‘phi_coal’, ‘sx1’, ‘sy1’, ‘sz1’, ‘sx2’, ‘sy2’, ‘sz2’,’S1’,’theta_1’,’phi_1’,’S2’,’theta_2’,’phi_2’]

  • detectors (list) –

    list of dictionaries for each detector interferometer (for Einstein Telescope you need to specify its three interferometers configuration). Each detector dictionary needs to have the following keys:

    • name: (str) The detector name for which the Noise Power Spectral Density will be chosen. Available detectors: [‘aLIGO’, ‘aVirgo’, ‘KAGRA’, ‘ET’, ‘CE’];

    • lon: (float) The detector longitude (degrees);

    • lon: (float) The detector latitude (degrees);

    • rot: (float) X-arm detector orientation starting from North-South direction (degrees);

    • shape: (float) Opening angle between arms interferometer (degrees);

  • approximant (str) – GW approximant among the available [‘Leading_Order’, ‘TaylorF2’_py, …] (or another approximant provided by lal). To use the lal approximants you need to have installed lal/lalsuite in your machine.

  • fmin (float) – initial frequency value to the GW signal be evaluated.

  • fmax (float) – final frequency value to the GW signal be evaluated.

  • fsize (float) – number of frequency points.

  • dali_method (str) – DALI method ['Fisher_Sampling', 'Doublet', 'Triplet', 'Standard'] or only 'Fisher' for a simple numerical matrix inversion. The ‘Standard’ method use the complete GW likelihood (with no approximation).

  • sampler_method (str) – Method used for DALI (the same ones available in bilby package)

  • new_priors (dict) – Redefine your priors

  • save_fisher (bool) – Save the Fisher Matrix in a file named ‘Fisher_Matrix_<index>.txt’ where index is the integer argument bellow

  • save_cov (bool) – Save the Covariance Matrix in a file named ‘Covariance_<index>.txt’.

  • plot_corner (bool) – Make a corner plot when using DALI methods.

  • save_samples (bool) – Save GW samples in a file named ‘samples_<index>.txt’ where each column correspond to the samples of one free parameter specified above;

  • hide_info (bool) – Hide software outputs in the screen.

  • index (int) – Integer argument used in the saved .txt files.

  • rcond (float) – Same as rcond in numpy.linalg.pinv;

  • diff_order (int) – (Avalible 2 or 4) Numerical derivative precision, e.g. for a given step h, if diff_orde=2 the uncertainty is of order \(h^3\), if diff_order=4 the uncertainty is of order \(h^5\);

  • step_size (float) – Relative step size in the numerical derivative, i.e., dx = max( step_size, step_size*x ) where x is some parameter value;

  • npoints (int) –

    Same as npoints, nsteps, nwalkers in bilby package;

Returns:

Return a dictionary with the following keys

  • Samples: array_like with shape (len(FreeParams) , number of samples points)

  • Fisher: array_like with shape (len(FreeParams),len(FreeParams))

  • CovFisher: array_like with shape (len(FreeParams),len(FreeParams))

  • Covariance: array_like with shape (len(FreeParams),len(FreeParams))

  • Recovery: list of recovered parameters (when using DALI methods)

  • Error: list of parameters uncertainties (Confidence Level = 60%)

  • SNR: value of the GW source signal to noise ratio (float)

  • Tensors: Arrays of DALI Tensors (e.g. for N free parameters we have: Fisher[dim= \(N^2\)], Doublet12 [dim= \(N^3\)], Doublet22 [dim= \(N^4\)], Triplet13 [dim= \(N^4\)] , Triplet23 [dim= \(N^5\)], Triplet33 [dim= \(N^6\)] )