class_docstr: Fitness for regular events
  
  This is for data which has a fundamental "tick" length, so that all
  measured values are multiples of this tick length.  In each tick, there
  are either zero or one counts.
  
  Parameters
  ----------
  dt : float
      tick rate for data
  gamma : float
      specifies the prior on the number of bins: p ~ gamma^N
class_docstr_tok: ["Fitness","for","regular","events","This","is","for","data","which","has","a","fundamental","``","tick","''","length",",","so","that","all","measured","values","are","multiples","of","this","tick","length",".","In","each","tick",",","there","are","either","zero","or","one","counts",".","Parameters","--","--","--","--","--","dt",":","float","tick","rate","for","data","gamma",":","float","specifies","the","prior","on","the","number","of","bins",":","p","~","gamma^N"]
code: def fitness(self, T_k, N_k):
      # Eq. 75 of Scargle 2012
      M_k = T_k / self.dt
      N_over_M = N_k * 1.0 / M_k
  
      eps = 1e-8
      if np.any(N_over_M > 1 + eps):
          import warnings
  
          warnings.warn(
              "regular events: N/M > 1.  " "Is the time step correct?"
          )
  
      one_m_NM = 1 - N_over_M
      N_over_M[N_over_M <= 0] = 1
      one_m_NM[one_m_NM <= 0] = 1
  
      return N_k * np.log(N_over_M) + (M_k - N_k) * np.log(one_m_NM)
  
imports: import numpy
  from astroML.utils import deprecated
  from astroML.utils.exceptions import AstroMLDeprecationWarning
label_desc: Use image node_id 3 for calling the RegularEvents obj's underlying member method code with example usage: obj.fitness(T_k, N_k) and returns: unknown