@classmethod<EOL><INDENT>def from_nds2_buffer(cls, buffer_, scaled=None, copy=True, **metadata):<DEDENT>
<EOL>channel = Channel.from_nds2(buffer_.channel)<EOL>metadata.setdefault('<STR_LIT>', channel)<EOL>metadata.setdefault('<STR_LIT>', LIGOTimeGPS(buffer_.gps_seconds,<EOL>buffer_.gps_nanoseconds))<EOL>metadata.setdefault('<STR_LIT>', channel.sample_rate)<EOL>metadata.setdefault('<STR_LIT>', channel.unit)<EOL>metadata.setdefault('<STR_LIT:name>', buffer_.name)<EOL>scaled = _dynamic_scaled(scaled, channel.name)<EOL>slope = buffer_.signal_slope<EOL>offset = buffer_.signal_offset<EOL>null_scaling = slope == <NUM_LIT:1.> and offset == <NUM_LIT:0.><EOL>if scaled and not null_scaling:<EOL><INDENT>data = buffer_.data.copy() * slope + offset<EOL>copy = False<EOL><DEDENT>else:<EOL><INDENT>data = buffer_.data<EOL><DEDENT>return cls(data, copy=copy, **metadata)<EOL>
Construct a new series from an `nds2.buffer` object

        **Requires:** |nds2|_

        Parameters
        ----------
        buffer_ : `nds2.buffer`
            the input NDS2-client buffer to read

        scaled : `bool`, optional
            apply slope and bias calibration to ADC data, for non-ADC data
            this option has no effect

        copy : `bool`, optional
            if `True`, copy the contained data array to new  to a new array

        **metadata
            any other metadata keyword arguments to pass to the `TimeSeries`
            constructor

        Returns
        -------
        timeseries : `TimeSeries`
            a new `TimeSeries` containing the data from the `nds2.buffer`,
            and the appropriate metadata