BLIP’s command-line tools

The main one is run_blip, but there are a few more scripts:

SetRandomState

blip.tools.SetRandomState.SetRandomState(seed)[source]

lisaPSD

blip.tools.lisaPSD.lisaPSD(L=2500000000.0, channel='TDI', fmin=5e-06, fmax=1.0, delf=1e-06, doPlot=False)[source]

This script calcualtes the power spectrum of LISA channels. It assumes an equal arm staionary LISA. If channel flag is ‘M’, then the michelson channels are given.

If the channels flag is TDI, we implement TDI as described in http://iopscience.iop.org/article/10.1088/0264-9381/18/17/308

The noise levels are taken from the 2017 LISA proposal. The other input is the arm length of IFO, the default is 2.5 million km

makeGaussianData

blip.tools.makeGaussianData.gaussianData(Sh, freqs, fs=1, dur=100000.0)[source]

Script for generation time series data of a given spectral density.

Input: Sh : desired spectral density freqs : corresponding frequencies fs : sampleRate in Hz dur : duration in seconds

Output: Random time series data of duration dur with the prescribed spectrum

Adapted from gaussian_noise.m from stamp

plotmaker

blip.tools.plotmaker.cornermaker(post, params, parameters, inj, Model, Injection=None, split_by=None, saveto=None, histcolor='teal', smooth=0.75, mpl_settings={}, maxticks=3)[source]

Make posterior plots from the samples generated by tge mcmc/nested sampling algorithm.

Parameters:
  • post (array) – Collection of posterior samples.

  • params (dictionary) – Dictionary of config params

  • parameters (string or dict) – Dictionary or list of strings with names of the parameters

  • inj (dictionary) – Dictionary of injection config params

  • Model (Model() object) – BLIP class with all information about the statistical model

  • Injection (Injection() object) – BLIP class with all information about the simulated data, if it is BLIP-generated

  • split_by (str) – How to divvy up the parameters into corner plots. Default (None) places all parameters on the same plot. This can get unweildy for high model dimensionality, so this can also be set to “submodel” (makes an individual corner plot for each submodel’s parameters) or “type” (makes one corner plot for all spectral parameters and one for all spatial parameters).

  • saveto (str) – Path to save directory. Default None (will save to params[‘out_dir’])

  • histcolor (str) – Matplotlib color for the corner plot histograms.

  • smooth (float or bool) – Smoothing parameter of the 2D contours to pass to corner.corner. Default 0.75. Set to False for no smoothing.

  • mpl_settings (dict) – Dictionary of matplotlib rcParams, in the usual format.

blip.tools.plotmaker.fitmaker(post, params, parameters, inj, Model, Injection=None, saveto=None, plot_convolved=True, astro_kwargs={}, det_kwargs={}, plot_data_path=None)[source]

Make a plot of the spectral fit from the samples generated by the mcmc/nested sampling algorithm.

Parameters:
  • post (array) – Posterior samples

  • params (dictionary) – Dictionary of config params

  • parameters (string) – Array or list of strings with names of the parameters

  • inj (dictionary) – Dictionary of injection params

  • Model (Model object) – The federated Model used for the analysis

  • Injection (Injection object) – The federated Injection used to create the data.

  • *_kwargs (dict) –

    Keyword argument dictionaries for tweaking the astrophysical/detector plots. Limited number of attributes are supported. Supported attributes: figsize, dpi, color_dict, title, title_fontsize, xlabel, xlabel_fontsize, ylabel, ylabel_fontsize, xmin, xmax, ymin, ymax. Most of the above are the associated matplotlib argument. The exception is ‘color_dict’, which should be of the form {‘submodel_name’:’colorname’}

    and can be used to specify the desired plotting color for specific submodels.

  • (str) (plot_data_path) – Will create the file if it does not exist; otherwise will modify the existing file. Defaults to params[‘out_dir’]/plot_data.pickle

blip.tools.plotmaker.mapmaker(post, params, parameters, Model, saveto=None, coord=None, cmap=None, post_map_kwargs={}, med_map_kwargs={}, plot_data_path=None)[source]

Function to create skymaps from the anisotropic search posteriors.

Parameters:
  • (array) (post)

  • (dict) (med_map_kwargs)

  • (dict)

  • object) (Model (Model)

  • (str) (plot_data_path)

  • (str)

  • colormap) (cmap (matplolib)

  • (dict)

  • (dict)

  • (str) – Will create the file if it does not exist; otherwise will modify the existing file. Defaults to params[‘out_dir’]/plot_data.pickle

printmap

blip.tools.printmap.printmap(map, xvals, yvals, xlab, ylab, clabel, crange, saveas)[source]

Auxially function for making a spectrogram map

stochasticSensitivity

blip.tools.stochasticSensitivity.stochasticSensitivity(L)[source]

This script calcualtes the sensititvity of LISA to an isotropic SGWB. It assumes an equal arm staionary LISA. Nevertheless we implement TDI as described in http://iopscience.iop.org/article/10.1088/0264-9381/18/17/308

The noise levels are taken from the 2017 LISA proposal. The only input is the arm length of IFO, the default is 2.5 million km