@_preformat_psd<EOL>def burst_range_spectrum(psd, snr=<NUM_LIT:8>, energy=<NUM_LIT>):
<EOL>a = (constants.G * energy * constants.M_sun * <NUM_LIT> /<EOL>(pi**<NUM_LIT:2> * constants.c))**(<NUM_LIT:1>/<NUM_LIT>)<EOL>dspec = psd ** (-<NUM_LIT:1>/<NUM_LIT>) * a / (snr * psd.frequencies)<EOL>rspec = dspec.to('<STR_LIT>')<EOL>if rspec.f0.value == <NUM_LIT:0.0>:<EOL><INDENT>rspec[<NUM_LIT:0>] = <NUM_LIT:0.0><EOL><DEDENT>return rspec<EOL>
Calculate the frequency-dependent GW burst range from a strain PSD

    Parameters
    ----------
    psd : `~gwpy.frequencyseries.FrequencySeries`
        the instrumental power-spectral-density data

    snr : `float`, optional
        the signal-to-noise ratio for which to calculate range,
        default: `8`

    energy : `float`, optional
        the relative energy output of the GW burst,
        default: `0.01` (GRB-like burst)

    Returns
    -------
    rangespec : `~gwpy.frequencyseries.FrequencySeries`
        the burst range `FrequencySeries` [Mpc (default)]