def crop_frequencies(self, low=None, high=None, copy=False):
if low is not None:<EOL><INDENT>low = units.Quantity(low, self._default_yunit)<EOL><DEDENT>if high is not None:<EOL><INDENT>high = units.Quantity(high, self._default_yunit)<EOL><DEDENT>if low is not None and low == self.f0:<EOL><INDENT>low = None<EOL><DEDENT>elif low is not None and low < self.f0:<EOL><INDENT>warnings.warn('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if high is not None and high.value == self.band[<NUM_LIT:1>]:<EOL><INDENT>high = None<EOL><DEDENT>elif high is not None and high.value > self.band[<NUM_LIT:1>]:<EOL><INDENT>warnings.warn('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if low is None:<EOL><INDENT>idx0 = None<EOL><DEDENT>else:<EOL><INDENT>idx0 = int(float(low.value - self.f0.value) // self.df.value)<EOL><DEDENT>if high is None:<EOL><INDENT>idx1 = None<EOL><DEDENT>else:<EOL><INDENT>idx1 = int(float(high.value - self.f0.value) // self.df.value)<EOL><DEDENT>if copy:<EOL><INDENT>return self[:, idx0:idx1].copy()<EOL><DEDENT>return self[:, idx0:idx1]<EOL>
Crop this `Spectrogram` to the specified frequencies

        Parameters
        ----------
        low : `float`
            lower frequency bound for cropped `Spectrogram`
        high : `float`
            upper frequency bound for cropped `Spectrogram`
        copy : `bool`
            if `False` return a view of the original data, otherwise create
            a fresh memory copy

        Returns
        -------
        spec : `Spectrogram`
            A new `Spectrogram` with a subset of data from the frequency
            axis