def parallel_ecc_snr_func(num, binary_args, eccwave, signal_type,
                          noise_interpolants, prefactor, verbose):
    """SNR calulation with eccentric waveforms

    Generate PhenomDWaveforms and calculate their SNR against sensitivity curves.

    Args:
        num (int): Process number. If only a single process, num=0.
        binary_args (tuple): Binary arguments for
            :meth:`gwsnrcalc.utils.waveforms.EccentricBinaries.__call__`.
        eccwave (obj): Initialized class of
            :class:`gwsnrcalc.utils.waveforms.EccentricBinaries`.
        signal_type (list of str): List with types of SNR to calculate.
            `all` for quadrature sum of modes or `modes` for SNR from each mode.
            This must be `all` if generating contour data with
            :mod:`gwsnrcalc.generate_contour_data`.
        noise_interpolants (dict): All the noise noise interpolants generated by
            :mod:`gwsnrcalc.utils.sensitivity`.
        prefactor (float): Prefactor to multiply SNR by (not SNR^2).
        verbose (int): Notify each time ``verbose`` processes finish. If -1, then no notification.

    Returns:
        (dict): Dictionary with the SNR output from the calculation.

    """
    wave = eccwave(*binary_args)

    out_vals = {}

    for key in noise_interpolants:
        hn_vals = noise_interpolants[key](wave.freqs)
        integrand = 1./wave.freqs * (wave.hc**2/hn_vals**2)
        snr_squared_out = np.trapz(integrand, x=wave.freqs)

        if 'modes' in signal_type:
            out_vals[key + '_' + 'modes'] = prefactor*np.sqrt(snr_squared_out)

        if 'all' in signal_type:
            out_vals[key + '_' + 'all'] = prefactor*np.sqrt(np.sum(snr_squared_out, axis=-1))

    if verbose > 0 and (num+1) % verbose == 0:
        print('Process ', (num+1), 'is finished.')

    return out_vals
def parallel_ecc_snr_func ( num , binary_args , eccwave , signal_type , noise_interpolants , prefactor , verbose ) : wave = eccwave ( * binary_args ) out_vals = { } for key in noise_interpolants : hn_vals = noise_interpolants [ key ] ( wave . freqs ) integrand = 1. / wave . freqs * ( wave . hc ** 2 / hn_vals ** 2 ) snr_squared_out = np . trapz ( integrand , x = wave . freqs ) if 'modes' in signal_type : out_vals [ key + '_' + 'modes' ] = prefactor * np . sqrt ( snr_squared_out ) if 'all' in signal_type : out_vals [ key + '_' + 'all' ] = prefactor * np . sqrt ( np . sum ( snr_squared_out , axis = - 1 ) ) if verbose > 0 and ( num + 1 ) % verbose == 0 : print ( 'Process ' , ( num + 1 ) , 'is finished.' ) return out_vals
SNR calulation with eccentric waveforms

    Generate PhenomDWaveforms and calculate their SNR against sensitivity curves.

    Args:
        num (int): Process number. If only a single process, num=0.
        binary_args (tuple): Binary arguments for
            :meth:`gwsnrcalc.utils.waveforms.EccentricBinaries.__call__`.
        eccwave (obj): Initialized class of
            :class:`gwsnrcalc.utils.waveforms.EccentricBinaries`.
        signal_type (list of str): List with types of SNR to calculate.
            `all` for quadrature sum of modes or `modes` for SNR from each mode.
            This must be `all` if generating contour data with
            :mod:`gwsnrcalc.generate_contour_data`.
        noise_interpolants (dict): All the noise noise interpolants generated by
            :mod:`gwsnrcalc.utils.sensitivity`.
        prefactor (float): Prefactor to multiply SNR by (not SNR^2).
        verbose (int): Notify each time ``verbose`` processes finish. If -1, then no notification.

    Returns:
        (dict): Dictionary with the SNR output from the calculation.