

.. _sphx_glr_auto_examples_02-production:

.. _gal-production_and_montecarlo:

Production Functions and Monte Carlo Utilities
==============================================

This section provides examples of how to generate both projectile and crater populations using the :ref:`api-production` component, as well as how to use the functions contained in the :ref:`api-utils-montecarlo` utilities.


.. raw:: html

  <div id='sg-tag-list' class='sphx-glr-tag-list'></div>


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Here we plot the chronology component of the Neukum production function for the Moon and Mars. The chronology function is the number of craters per unit area per unit time, which is a function of crater diameter and age. The plot shows the number of craters per square kilometer per million years as a function of time for a 1 km crater.">

.. only:: html

  .. image:: /auto_examples/02-production/images/thumb/sphx_glr_2.3-plot_chronology_thumb.png
    :alt:

  :doc:`/auto_examples/02-production/2.3-plot_chronology`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot the NPF Chronology function for the Moon and Mars</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the generation of random impact angles.">

.. only:: html

  .. image:: /auto_examples/02-production/images/thumb/sphx_glr_2.8-plot_random_impact_angle_thumb.png
    :alt:

  :doc:`/auto_examples/02-production/2.8-plot_random_impact_angle`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot a distribution of random impact angles</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the generation of random impact sizes, which is used to sample production function SFDs. In this example, we just draw from a simple power law.">

.. only:: html

  .. image:: /auto_examples/02-production/images/thumb/sphx_glr_2.5-plot_random_size_thumb.png
    :alt:

  :doc:`/auto_examples/02-production/2.5-plot_random_size`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot a distribution of random sizes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we will plot the cumulative size-frequency distribution of projectiles for a 1 Gy age, which is derived from Ivanov, Neukum, and Wagner (2001) [#]_.">

.. only:: html

  .. image:: /auto_examples/02-production/images/thumb/sphx_glr_2.2-plot_projectilecsfd_thumb.png
    :alt:

  :doc:`/auto_examples/02-production/2.2-plot_projectilecsfd`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot the Neukum projectile CSFD</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the generation of random impact locations.">

.. only:: html

  .. image:: /auto_examples/02-production/images/thumb/sphx_glr_2.6-plot_random_location_thumb.png
    :alt:

  :doc:`/auto_examples/02-production/2.6-plot_random_location`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot a distribution of random locations</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we use the :pyProduction.sample method to sample populations of craters from a production function. We will sample 1000 craters from each production function and repeat this 100 times. The population samples are then plotted against the expected value given by :pyProduction.function">

.. only:: html

  .. image:: /auto_examples/02-production/images/thumb/sphx_glr_2.4-plot_sample_csfd_thumb.png
    :alt:

  :doc:`/auto_examples/02-production/2.4-plot_sample_csfd`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Sample a power law and lunar Neukum Production Function</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the generation of random velocities using the :pyget_random_velocity function from the api-utils-montecarlo module. The expected distribution of imapct velocities is a modified Maxwell-Boltzmann distribution. The modification is related to the relationship between the mean velocity and the escape velocity. If vmean &gt; vescape, then the distribution will adjusted so that the escape velocity is the minimum velocity by computing an encounter velocity then summing the encounter and escape velocities in quadrature. If vmean &lt; vescape, then the distirbution will be a truncated maxwellian.">

.. only:: html

  .. image:: /auto_examples/02-production/images/thumb/sphx_glr_2.7-plot_random_velocity_thumb.png
    :alt:

  :doc:`/auto_examples/02-production/2.7-plot_random_velocity`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot a distribution of random velocities given a mean</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, we will be using the &quot;neukum&quot; prodcution model in Cratermaker to plot isochrons for three different age surfaces. We will also format the plots so with similar axes as Figure 2 of Neukum, Ivanov, and Hartmann (2001) [#]_, but with a handy logarithmic grid.">

.. only:: html

  .. image:: /auto_examples/02-production/images/thumb/sphx_glr_2.1-plot_isochron_thumb.png
    :alt:

  :doc:`/auto_examples/02-production/2.1-plot_isochron`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Plot isochrons for the Moon and Mars for 1 Ma, 1 Ga, and 4 Ga using the Neukum Production Function</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/02-production/2.3-plot_chronology
   /auto_examples/02-production/2.8-plot_random_impact_angle
   /auto_examples/02-production/2.5-plot_random_size
   /auto_examples/02-production/2.2-plot_projectilecsfd
   /auto_examples/02-production/2.6-plot_random_location
   /auto_examples/02-production/2.4-plot_sample_csfd
   /auto_examples/02-production/2.7-plot_random_velocity
   /auto_examples/02-production/2.1-plot_isochron

