.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_08_poisson_noise.py: Example 08: Apply Poission noise to projection data =================================================== .. code-block:: default import foam_ct_phantom import numpy as np import h5py import pylab as pl pl.gray() # Run 03_generate_projections_parallel.py first fac = foam_ct_phantom.estimate_absorption_factor('test_projs_par.h5',0.5) foam_ct_phantom.apply_poisson_noise('test_projs_par.h5','test_projs_noisy.h5',1234,100,fac) projs = foam_ct_phantom.load_projections('test_projs_noisy.h5') pl.imshow(projs[0]) pl.show() .. _sphx_glr_download_auto_examples_08_poisson_noise.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: 08_poisson_noise.py <08_poisson_noise.py>` .. container:: sphx-glr-download :download:`Download Jupyter notebook: 08_poisson_noise.ipynb <08_poisson_noise.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_