class_docstr: Vectorized Gaussian Random Walk sampler.
docstr: Initialise.
  
  Parameters
  ----------
  popsize: int
      number of walkers to maintain.
      this should be fairly large (~100), if too large you probably get memory issues
      Also, some results have to be discarded as the likelihood threshold increases.
      Observe the nested sampling efficiency.
  nsteps: int
      number of steps to take until the found point is accepted as independent.
      To calibrate, try several runs with increasing nsteps (doubling).
      The ln(Z) should become stable at some value.
  generate_direction: function
      Function that gives proposal kernel shape, one of:
      :py:func:`ultranest.popstepsampler.generate_cube_oriented_direction`
      :py:func:`ultranest.popstepsampler.generate_cube_oriented_direction_scaled`
      :py:func:`ultranest.popstepsampler.generate_random_direction`
      :py:func:`ultranest.popstepsampler.generate_region_oriented_direction`
      :py:func:`ultranest.popstepsampler.generate_region_random_direction`
  scale: float
      initial guess for the proposal scaling factor
  scale_adapt_factor: float
      if 1, no adapting is done.
      if <1, the scale is increased if the acceptance rate is below 23.4%,
      or decreased if it is above, by *scale_adapt_factor*.
  scale_min: float
      lowest value allowed for scale, do not adapt down further
  scale_max: float
      highest value allowed for scale, do not adapt up further
  logfile: file
      where to print the current scaling factor and acceptance rate
docstr_tok: ["Initialise",".","Parameters","--","--","--","--","--","popsize",":","int","number","of","walkers","to","maintain",".","this","should","be","fairly","large","(","~100",")",",","if","too","large","you","probably","get","memory","issues","Also",",","some","results","have","to","be","discarded","as","the","likelihood","threshold","increases",".","Observe","the","nested","sampling","efficiency",".","nsteps",":","int","number","of","steps","to","take","until","the","found","point","is","accepted","as","independent",".","To","calibrate",",","try","several","runs","with","increasing","nsteps","(","doubling",")",".","The","ln","(","Z",")","should","become","stable","at","some","value",".","generate_direction",":","function","Function","that","gives","proposal","kernel","shape",",","one","of",":",":","py",":","func",":","`","ultranest.popstepsampler.generate_cube_oriented_direction","`",":","py",":","func",":","`","ultranest.popstepsampler.generate_cube_oriented_direction_scaled","`",":","py",":","func",":","`","ultranest.popstepsampler.generate_random_direction","`",":","py",":","func",":","`","ultranest.popstepsampler.generate_region_oriented_direction","`",":","py",":","func",":","`","ultranest.popstepsampler.generate_region_random_direction","`","scale",":","float","initial","guess","for","the","proposal","scaling","factor","scale_adapt_factor",":","float","if","1",",","no","adapting","is","done",".","if","<","1",",","the","scale","is","increased","if","the","acceptance","rate","is","below","23.4","%",",","or","decreased","if","it","is","above",",","by","*","scale_adapt_factor","*",".","scale_min",":","float","lowest","value","allowed","for","scale",",","do","not","adapt","down","further","scale_max",":","float","highest","value","allowed","for","scale",",","do","not","adapt","up","further","logfile",":","file","where","to","print","the","current","scaling","factor","and","acceptance","rate"]
code: def __init__(
      self,
      popsize,
      nsteps,
      generate_direction,
      scale,
      scale_adapt_factor=0.9,
      scale_min=1e-20,
      scale_max=20,
      log=False,
      logfile=None,
  ):
      """Initialise.
  
      Parameters
      ----------
      popsize: int
          number of walkers to maintain.
          this should be fairly large (~100), if too large you probably get memory issues
          Also, some results have to be discarded as the likelihood threshold increases.
          Observe the nested sampling efficiency.
      nsteps: int
          number of steps to take until the found point is accepted as independent.
          To calibrate, try several runs with increasing nsteps (doubling).
          The ln(Z) should become stable at some value.
      generate_direction: function
          Function that gives proposal kernel shape, one of:
          :py:func:`ultranest.popstepsampler.generate_cube_oriented_direction`
          :py:func:`ultranest.popstepsampler.generate_cube_oriented_direction_scaled`
          :py:func:`ultranest.popstepsampler.generate_random_direction`
          :py:func:`ultranest.popstepsampler.generate_region_oriented_direction`
          :py:func:`ultranest.popstepsampler.generate_region_random_direction`
      scale: float
          initial guess for the proposal scaling factor
      scale_adapt_factor: float
          if 1, no adapting is done.
          if <1, the scale is increased if the acceptance rate is below 23.4%,
          or decreased if it is above, by *scale_adapt_factor*.
      scale_min: float
          lowest value allowed for scale, do not adapt down further
      scale_max: float
          highest value allowed for scale, do not adapt up further
      logfile: file
          where to print the current scaling factor and acceptance rate
  
      """
      self.nsteps = nsteps
      self.nrejects = 0
      self.scale = scale
      self.ncalls = 0
      assert scale_adapt_factor <= 1
      self.scale_adapt_factor = scale_adapt_factor
      self.scale_min = scale_min
      self.scale_max = scale_max
  
      self.log = log
      self.logfile = logfile
      self.prepared_samples = []
  
      self.popsize = popsize
      self.generate_direction = generate_direction
  
imports: import numpy
  from ultranest.utils import submasks
  from ultranest.stepfuncs import evolve, step_back
  from ultranest.stepfuncs import generate_cube_oriented_direction, generate_cube_oriented_direction_scaled
  from ultranest.stepfuncs import generate_random_direction, generate_region_oriented_direction, generate_region_random_direction
  from ultranest.stepfuncs import generate_differential_direction, generate_mixture_random_direction
  import scipy.stats
label_desc: Use image node_id 1 to create a new PopulationRandomWalkSampler object  with example: obj = PopulationRandomWalkSampler(popsize, nsteps, generate_direction, scale, scale_adapt_factor, scale_min, scale_max, log, logfile)