Map calculators

class schnell.mapping.MapCalculator(det_array, f_pivot=63.0, spectral_index=0.6666666666666666, corr_matrix=None, h=0.67)[source]

Map calculators compute map-level quantities for a given network of detectors.

Parameters:
  • det_array – list of Detector objects.
  • f_pivot – pivot frequency in Hz (default: 63 Hz)
  • spectral_index – power-law spectral index. This should correspond to the index in units of Omega_GW, not intensity.
  • corr_matrix – noise correlation matrix for the array. If None the identity is assumed. If a constant, this will be assumed to be the correlation coefficient between pairs of different detectors. If a 2D array, it will be the frequency-independent correlation matrix. Otherwise, pass a NoiseCorrelationBase object.
  • h – value of the Hubble constant in units of 100 km/s/Mpc (default: 0.67).
get_G_ell(t, f, nside, no_autos=False, deltaOmega_norm=True, proj=None)[source]

Computes \(G_\ell\) in Eq. 37 of the companion paper.

Parameters:
  • t – array of N_t time values (in s).
  • f – array of N_f frequency values (in Hz).
  • nside – HEALPix resolution parameter used to compute spherical harmonic transforms.
  • no_autos (bool, or array_like) – if a single True value, all detector auto-correlations will be removed. If a 1D array, only the auto-correlations for which the array element is True will be removed. If a 2D array, all autos and cross- correlations for which the array element is True will be removed.
  • deltaOmega_norm – if True, the quantity being mapped is \(\delta\Omega = (\Omega/\bar{\Omega}-1)/4\pi\). Otherwise the \(4\pi\) factor is omitted. (Default: True).
  • proj (dictionary or None) – if you want to project the data onto a set of linear combinations of the detectors, pass the linear coefficients of those here. proj should be a dictionary with two items: ‘vectors’ containing a 2D array (or a single vector) with the linear coefficients as rows and ‘deproj’. If ‘deproj’ is True, then those linear combinations will actually be projeted out. If proj is None, then no projection or de-projection will happen.
Returns:

array of shape [N_f, N_t, N_l], where

N_l = 3 * nside, containing \(G_\ell\) at each frequency and time.

Return type:

array_like

get_N_ell(t, f, nside, is_fspacing_log=False, no_autos=False, deltaOmega_norm=True, proj=None)[source]

Computes \(N_\ell\) for this network.

Parameters:
  • t (float or array_like) – N_t time values (in s). If a single number is passed, then the “rigid network” approximation is used, and this time is interpreted as the total observing time. Otherwise, an integral over time is performed.
  • f – array of N_f frequency values (in Hz).
  • nside – HEALPix resolution parameter used to compute spherical harmonic transforms.
  • is_fspacing_log – if True, f is log-spaced (linearly-spaced otherwise). (Default: False).
  • no_autos (bool, or array_like) – if a single True value, all detector auto-correlations will be removed. If a 1D array, only the auto-correlations for which the array element is True will be removed. If a 2D array, all autos and cross- correlations for which the array element is True will be removed.
  • deltaOmega_norm – if True, the quantity being mapped is \(\delta\Omega = (\Omega/\bar{\Omega}-1)/4\pi\). Otherwise the \(4\pi\) factor is omitted. (Default: True).
  • proj (dictionary or None) – if you want to project the data onto a set of linear combinations of the detectors, pass the linear coefficients of those here. proj should be a dictionary with two items: ‘vectors’ containing a 2D array (or a single vector) with the linear coefficients as rows and ‘deproj’. If ‘deproj’ is True, then those linear combinations will actually be projeted out. If proj is None, then no projection or de-projection will happen.
Returns:

array of size N_l = 3 * nside containing the noise

power spectrum.

Return type:

array_like

get_Ninv_t(t, f, nside, is_fspacing_log=False, no_autos=False, deltaOmega_norm=True, proj=None)[source]

Computes inverse noise variance map for a set of timeframes integrated over frequency.

Parameters:
  • t – array of N_t time values (in s).
  • f – array of frequency values that will be integrated over.
  • nside – HEALPix resolution parameter.
  • is_fspacing_log – if True, f is log-spaced (linearly-spaced otherwise). (Default: False).
  • no_autos (bool, or array_like) – if a single True value, all detector auto-correlations will be removed. If a 1D array, only the auto-correlations for which the array element is True will be removed. If a 2D array, all autos and cross- correlations for which the array element is True will be removed.
  • deltaOmega_norm – if True, the quantity being mapped is \(\delta\Omega = (\Omega/\bar{\Omega}-1)/4\pi\). Otherwise the \(4\pi\) factor is omitted. (Default: True).
  • proj (dictionary or None) – if you want to project the data onto a set of linear combinations of the detectors, pass the linear coefficients of those here. proj should be a dictionary with two items: ‘vectors’ containing a 2D array (or a single vector) with the linear coefficients as rows and ‘deproj’. If ‘deproj’ is True, then those linear combinations will actually be projeted out. If proj is None, then no projection or de-projection will happen.
Returns:

array of shape [N_t, N_pix] containing the inverse noise variance map sampled at the N_pix pixel positions corresponding to the input HEALPix resolution parameter (in RING ordering).

Return type:

array_like

get_antenna(i, j, t, f, theta, phi, pol=False, inc_baseline=True)[source]

Returns antenna pattern for a detector pair as a function of time, frequency and sky position.

Parameters:
  • i – index of first detector
  • j – index of second detector
  • t – array of N_t times (in s).
  • f – array of N_f times (in Hz).
  • theta – array of N_pix colatitude values (in radians).
  • phi – array of N_pix azimuth values (in radians).
  • pol (bool) – compute all polarized components? (default: False).
  • inc_baseline – include baseline-related phase. Otherwise only the \(\gamma\) overlap function in Eq. 22 of the companion paper will be returned. (default: True).
get_dsigm2_dnu_t(t, f, nside, no_autos=False, proj=None)[source]

Computes \(d\sigma^{-2}/df\,dt\) for a set of frequencies and times.

Parameters:
  • t – array of N_t time values (in s).
  • f – array of N_f frequency values (in Hz).
  • nside – HEALPix resolution parameter. Used to create maps of the antenna pattern and computes its sky average.
  • no_autos (bool, or array_like) – if a single True value, all detector auto-correlations will be removed. If a 1D array, only the auto-correlations for which the array element is True will be removed. If a 2D array, all autos and cross- correlations for which the array element is True will be removed.
  • proj (dictionary or None) – if you want to project the data onto a set of linear combinations of the detectors, pass the linear coefficients of those here. proj should be a dictionary with two items: ‘vectors’ containing a 2D array (or a single vector) with the linear coefficients as rows and ‘deproj’. If ‘deproj’ is True, then those linear combinations will actually be projeted out. If proj is None, then no projection or de-projection will happen.
Returns:

array of shape [N_t, N_f].

Return type:

array_like

get_pi_curve(t, f, nside, is_fspacing_log=False, no_autos=False, beta_range=[-10, 10], nsigma=1, proj=None)[source]

Computes the power-law-integrated (PI) sensitivity curve for this network (see arXiv:1310.5300).

Parameters:
  • t (float or array_like) – N_t time values (in s). If a single number is passed, then the “rigid network” approximation is used, and this time is interpreted as the total observing time. Otherwise, an integral over time is performed.
  • f – array of N_f frequency values (in Hz). This will be the frequencies at which the PI curve will be sampled, and also the frequencies used for numerical integration.
  • nside – HEALPix resolution parameter. Used to create maps of the antenna pattern and computes its sky average.
  • no_autos (bool, or array_like) – if a single True value, all detector auto-correlations will be removed. If a 1D array, only the auto-correlations for which the array element is True will be removed. If a 2D array, all autos and cross- correlations for which the array element is True will be removed.
  • beta_range – a list containing the range of power law indices for which the PI curve will be computed.
  • nsigma – S/N of the PI curve (default: 1-sigma).
  • proj (dictionary or None) – if you want to project the data onto a set of linear combinations of the detectors, pass the linear coefficients of those here. proj should be a dictionary with two items: ‘vectors’ containing a 2D array (or a single vector) with the linear coefficients as rows and ‘deproj’. If ‘deproj’ is True, then those linear combinations will actually be projeted out. If proj is None, then no projection or de-projection will happen.
Returns:

array of size N_f.

Return type:

array_like