nessai.proposal.analytic
========================

.. py:module:: nessai.proposal.analytic

.. autoapi-nested-parse::

   Proposal method for initial sampling when priors can be sampled analytically.

   ..
       !! processed by numpydoc !!


Classes
-------

.. autoapisummary::

   nessai.proposal.analytic.AnalyticProposal


Module Contents
---------------

.. py:class:: AnalyticProposal(*args, poolsize=1000, **kwargs)

   Bases: :py:obj:`nessai.proposal.base.Proposal`


   
   Class for drawing samples from analytic priors.

   Will be used when ``nessai`` is called with ``analytic_priors=True`` and
   assumes the :py:meth:`nessai.model.Model.new_point` samples directly
   from the prior. This method must be implemented by the user.

   :Parameters:

       **args**
           Arguments passed to the parent class.

       **poolsize** : int, optional
           Number of points drawn at once.

       **kwargs**
           Keyword arguments passed to the parent class.














   ..
       !! processed by numpydoc !!

   .. py:property:: poolsize

      
      Poolsize used for drawing new samples in batches.
















      ..
          !! processed by numpydoc !!


   .. py:method:: populate(N=None)

      
      Populate the pool by drawing from the priors.

      Will also evaluate the likelihoods if the proposal contains a
      multiprocessing pool.

      :Parameters:

          **N** : int, optional
              Number of samples to draw. If not specified ``poolsize`` will be
              used.














      ..
          !! processed by numpydoc !!


   .. py:method:: draw(old_sample, **kwargs)

      
      Propose a new sample. Draws from the pool if it is populated, else
      it populates the pool.


      :Parameters:

          **old_sample** : structured_array
              Old sample, this is not used in the proposal method

          **kwargs**
              Keyword arguments passed to                 :py:meth:`~nessai.proposal.analytic.AnalyticProposal.populate`














      ..
          !! processed by numpydoc !!


