Commit 45d22d3a authored by Michele Maris's avatar Michele Maris
Browse files

a colored_noise.py

parent 8cab03b3
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -92,10 +92,10 @@ Keywords:
      #
      self._freq=np.fft.rfftfreq(self.N)
      #
      pl=self.alpha/2
      pl=self.alpha
      with np.errstate(divide='ignore'):
         x=self.fknee/np.where(self._freq==0, np.inf , self._freq)
         self._S=(1+x)**pl
         self._S=(1+x**pl)**0.5
      #
      if self._zero_policy=='0' :
         self._S[0]=0.
@@ -104,7 +104,7 @@ Keywords:
      elif self._zero_policy=='M' :
         self._S[0]=self.wn_mean
      elif self._zero_policy=='100x1' :
         self._S[0]=1 if fknee>ff[1] else (1+100*self.fknee/self._freq[1])**pl 
         self._S[0]=1 if fknee>ff[1] else (1+100*(self.fknee/self._freq[1])**pl)**0.5
      else : # self._zero_policy=='I' :
         # left things as they are
         pass