SNR calulation with PhenomDWaveforms

    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__`.
        phenomdwave (obj): Initialized class of
            :class:`gwsnrcalc.utils.waveforms.PhenomDWaveforms`.
        signal_type (list of str): List with types of SNR to calculate.
            Options are `all` for full wavefrom,
            `ins` for inspiral, `mrg` for merger, and/or `rd` for ringdown.
        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.

def parallel_snr_func(num, binary_args, phenomdwave, signal_type,
                      noise_interpolants, prefactor, verbose):
    """SNR calulation with PhenomDWaveforms

    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__`.
        phenomdwave (obj): Initialized class of
            :class:`gwsnrcalc.utils.waveforms.PhenomDWaveforms`.
        signal_type (list of str): List with types of SNR to calculate.
            Options are `all` for full wavefrom,
            `ins` for inspiral, `mrg` for merger, and/or `rd` for ringdown.
        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 = phenomdwave(*binary_args)

    out_vals = {}

    for key in noise_interpolants:
        hn_vals = noise_interpolants[key](wave.freqs)
        snr_out = csnr(wave.freqs, wave.hc, hn_vals,
                       wave.fmrg, wave.fpeak, prefactor=prefactor)

        if len(signal_type) == 1:
            out_vals[key + '_' + signal_type[0]] = snr_out[signal_type[0]]
        else:
            for phase in signal_type:
                out_vals[key + '_' + phase] = snr_out[phase]
    if verbose > 0 and (num+1) % verbose == 0:
        print('Process ', (num+1), 'is finished.')

    return out_vals