@classmethod<EOL><INDENT>def from_spectra(cls, *spectra, **kwargs):<DEDENT>
data = numpy.vstack([s.value for s in spectra])<EOL>spec1 = list(spectra)[<NUM_LIT:0>]<EOL>if not all(s.f0 == spec1.f0 for s in spectra):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if not all(s.df == spec1.df for s in spectra):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>kwargs.setdefault('<STR_LIT:name>', spec1.name)<EOL>kwargs.setdefault('<STR_LIT>', spec1.channel)<EOL>kwargs.setdefault('<STR_LIT>', spec1.epoch)<EOL>kwargs.setdefault('<STR_LIT>', spec1.f0)<EOL>kwargs.setdefault('<STR_LIT>', spec1.df)<EOL>kwargs.setdefault('<STR_LIT>', spec1.unit)<EOL>if not ('<STR_LIT>' in kwargs or '<STR_LIT>' in kwargs):<EOL><INDENT>try:<EOL><INDENT>kwargs.setdefault('<STR_LIT>', spectra[<NUM_LIT:1>].epoch.gps - spec1.epoch.gps)<EOL><DEDENT>except (AttributeError, IndexError):<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT><DEDENT>return Spectrogram(data, **kwargs)<EOL>
Build a new `Spectrogram` from a list of spectra.

        Parameters
        ----------
        *spectra
            any number of `~gwpy.frequencyseries.FrequencySeries` series
        dt : `float`, `~astropy.units.Quantity`, optional
            stride between given spectra

        Returns
        -------
        Spectrogram
            a new `Spectrogram` from a vertical stacking of the spectra
            The new object takes the metadata from the first given
            `~gwpy.frequencyseries.FrequencySeries` if not given explicitly

        Notes
        -----
        Each `~gwpy.frequencyseries.FrequencySeries` passed to this
        constructor must be the same length.