def __init__(self, data, data_y=None, sampling=<NUM_LIT:1.>,<EOL>detrend=None, scale_by_freq=True, NFFT=None):
<EOL>self.__data = None<EOL>self.__data_y = None<EOL>self.__sampling = None<EOL>self.__detrend = None<EOL>self.__scale_by_freq = None<EOL>self.__sides = None<EOL>self.__N = None<EOL>self.__NFFT = None<EOL>self.__df = None<EOL>self.__datatype = None<EOL>self.__psd = None<EOL>self.__method = None<EOL>self.data = data<EOL>if data_y is not None:<EOL><INDENT>self.data_y = data_y<EOL><DEDENT>self.sampling = sampling<EOL>self.sides = '<STR_LIT:default>'<EOL>self._range = Range(self.__data.size, sampling) <EOL>self.modified = True<EOL>self.sampling = sampling<EOL>self.scale_by_freq = scale_by_freq<EOL>self.NFFT = NFFT<EOL>self.method = self.__class__<EOL>
**Constructor**

        .. rubric:: Attributes:

        From the input parameters, the following attributes are set:

          * :attr:`data` (updates :attr:`N`, :attr:`df`, :attr:`datatype`)
          * :attr:`data_y` used for cross PSD only (correlogram)
          * :attr:`detrend`
          * :attr:`sampling` (updates :attr:`df`)
          * :attr:`scale_by_freq`
          * :attr:`NFFT` (reset :attr:`sides`, :attr:`df`)

        The following read-only attributes are set during the initialisation:

          * :attr:`datatype`
          * :attr:`df`
          * :attr:`N`

        And finally, additional read-write attributes are available:

          * :attr:`psd`: used to store the PSD data array, which size depends
            on :attr:`sides` i.e., one-sided for real data and two-sided for
            the complex data.
          * :attr:`sides`: if set, changed the :attr:`psd`.