def PsdEval(self, N, df, CutoffLowHigh=[None, None]):
    "\n\t\tEvals the PSD in the range [0 - N*df]\n\t\tIt's good custom to have PSD[0] = 0, so that the noise pattern is\n\t\tzero-mean.\n\n\t\tParameters:\n\t\t----------------------\n\t\t\tN : int\n\t\t\t\t#of samples\n\t\t\tdf : float\n\t\t\t\tspacing of spatial frequencies (df=1/TotalLength)\n\t\t\tCutoffLowHigh : [LowCutoff, HighCutoff]\n\t\t\t\tif >0, then Psd(f<Cutoff) is set to 0.\n\t\t\t\t\t\tif None, then LowCutoff = min()\n\t\tReturns :  fAll, yPsdAll\n\t\t----------------------\n\t\t\tfAll : 1d array\n\t\t\t\tcontains the spatial frequencies\n\t\t\tyPsd : 1d array\n\t\t\t\tcontains the Psd\n\t\t"
    '\n\t\tThe Pdf is evaluated only within LowCutoff and HoghCutoff\n\t\tIf the Pdf is PsdFuns.Interp, then LowCutoff and HighCutoff are\n\t\tautomatically set to min and max values of the experimental data\n\t\t'
    StrMessage = ''

    def GetInRange(fAll, LowCutoff, HighCutoff):
        _tmpa = (fAll >= LowCutoff)
        _tmpb = (fAll <= HighCutoff)
        fMid_Pos = np.all([_tmpa, _tmpb], 0)
        fMid = fAll[fMid_Pos]
        return (fMid_Pos, fMid)
    (LowCutoff, HighCutoff) = CutoffLowHigh
    fMin = 0
    fMax = ((N - 1) * df)
    fAll = np.linspace(0, fMax, N)
    yPsdAll = (fAll * 0)
    LowCutoff = (0 if (LowCutoff is None) else LowCutoff)
    HighCutoff = ((N * df) if (HighCutoff is None) else HighCutoff)
    if (self.PsdType == PsdFuns.Interp):
        if (self.Options.FIT_NUMERIC_DATA_WITH_POWER_LAW == True):
            (xFreq, y) = self.NumericPsdGetXY()
            p = FitPowerLaw((1 / xFreq), y)
            _PsdParams = (p[0], (- p[1]))
            LowCutoff = np.amin(self._PsdNumericX)
            HighCutoff = np.amin(self._PsdNumericX)
            (fMid_Pos, fMid) = GetInRange(fAll, LowCutoff, HighCutoff)
            yPsd = PsdFuns.PowerLaw(fMid, *_PsdParams)
        else:
            LowVal = np.amin(self._PsdNumericX)
            HighVal = np.amax(self._PsdNumericX)
            LowCutoff = (LowVal if (LowCutoff <= LowVal) else LowCutoff)
            HighCutoff = (HighVal if (HighCutoff >= HighVal) else HighCutoff)
            (fMid_Pos, fMid) = GetInRange(fAll, LowCutoff, HighCutoff)
            yPsd = PsdFuns.Interp(fMid, self._PsdNumericX, self._PsdNumericY)
    else:
        (fMid_Pos, fMid) = GetInRange(fAll, LowCutoff, HighCutoff)
        yPsd = self.PsdType(fMid, *self.PsdParams)
    yPsdAll[fMid_Pos] = yPsd
    return (fAll, yPsdAll)
Evals the PSD in the range [0 - N*df]
It's good custom to have PSD[0] = 0, so that the noise pattern is
zero-mean.

Parameters:
----------------------
        N : int
                #of samples
        df : float
                spacing of spatial frequencies (df=1/TotalLength)
        CutoffLowHigh : [LowCutoff, HighCutoff]
                if >0, then Psd(f<Cutoff) is set to 0.
                                if None, then LowCutoff = min()
Returns :  fAll, yPsdAll
----------------------
        fAll : 1d array
                contains the spatial frequencies
        yPsd : 1d array
                contains the Psd
def PsdEval(self, N, df, CutoffLowHigh=[None, None]):
    "\n\t\tEvals the PSD in the range [0 - N*df]\n\t\tIt's good custom to have PSD[0] = 0, so that the noise pattern is\n\t\tzero-mean.\n\n\t\tParameters:\n\t\t----------------------\n\t\t\tN : int\n\t\t\t\t#of samples\n\t\t\tdf : float\n\t\t\t\tspacing of spatial frequencies (df=1/TotalLength)\n\t\t\tCutoffLowHigh : [LowCutoff, HighCutoff]\n\t\t\t\tif >0, then Psd(f<Cutoff) is set to 0.\n\t\t\t\t\t\tif None, then LowCutoff = min()\n\t\tReturns :  fAll, yPsdAll\n\t\t----------------------\n\t\t\tfAll : 1d array\n\t\t\t\tcontains the spatial frequencies\n\t\t\tyPsd : 1d array\n\t\t\t\tcontains the Psd\n\t\t"
    '\n\t\tThe Pdf is evaluated only within LowCutoff and HoghCutoff\n\t\tIf the Pdf is PsdFuns.Interp, then LowCutoff and HighCutoff are\n\t\tautomatically set to min and max values of the experimental data\n\t\t'
    StrMessage = 

    def GetInRange(fAll, LowCutoff, HighCutoff):
        _tmpa = (fAll >= LowCutoff)
        _tmpb = (fAll <= HighCutoff)
        fMid_Pos = np.all([_tmpa, _tmpb], 0)
        fMid = fAll[fMid_Pos]
        return (fMid_Pos, fMid)
    (LowCutoff, HighCutoff) = CutoffLowHigh
    fMin = 0
    fMax = ((N - 1) * df)
    fAll = np.linspace(0, fMax, N)
    yPsdAll = (fAll * 0)
    LowCutoff = (0 if (LowCutoff is None) else LowCutoff)
    HighCutoff = ((N * df) if (HighCutoff is None) else HighCutoff)
    if (self.PsdType == PsdFuns.Interp):
        if (self.Options.FIT_NUMERIC_DATA_WITH_POWER_LAW == True):
            (xFreq, y) = self.NumericPsdGetXY()
            p = FitPowerLaw((1 / xFreq), y)
            _PsdParams = (p[0], (- p[1]))
            LowCutoff = np.amin(self._PsdNumericX)
            HighCutoff = np.amin(self._PsdNumericX)
            (fMid_Pos, fMid) = GetInRange(fAll, LowCutoff, HighCutoff)
            yPsd = PsdFuns.PowerLaw(fMid, *_PsdParams)
        else:
            LowVal = np.amin(self._PsdNumericX)
            HighVal = np.amax(self._PsdNumericX)
            LowCutoff = (LowVal if (LowCutoff <= LowVal) else LowCutoff)
            HighCutoff = (HighVal if (HighCutoff >= HighVal) else HighCutoff)
            (fMid_Pos, fMid) = GetInRange(fAll, LowCutoff, HighCutoff)
            yPsd = PsdFuns.Interp(fMid, self._PsdNumericX, self._PsdNumericY)
    else:
        (fMid_Pos, fMid) = GetInRange(fAll, LowCutoff, HighCutoff)
        yPsd = self.PsdType(fMid, *self.PsdParams)
    yPsdAll[fMid_Pos] = yPsd
    return (fAll, yPsdAll)