tofu.tests.tests09_tutorials package

Submodules

tofu.tests.tests09_tutorials.test_01_runall module

class tofu.tests.tests09_tutorials.test_01_runall.Test00_tuto[source]

Bases: object

classmethod _test_tuto(tuto=None, pathtuto='/home/lasofivec/tofu/tofu/tests/tests09_tutorials', root=PosixPath('/home/lasofivec/tofu'))[source]
setup()[source]
classmethod setup_class(here='/home/lasofivec/tofu/tofu/tests/tests09_tutorials', pathtuto='/home/lasofivec/tofu/tofu/tests/tests09_tutorials', root=PosixPath('/home/lasofivec/tofu'))[source]
teardown()[source]
classmethod teardown_class()[source]
test01_plot_basic_tutorial()[source]
test02_plot_create_geometry()[source]
test03_plot_custom_emissivity()[source]
tofu.tests.tests09_tutorials.test_01_runall.get_list_toturials(path='/home/lasofivec/tofu/tofu/tests/tests09_tutorials')[source]
tofu.tests.tests09_tutorials.test_01_runall.setup_module(module, here='/home/lasofivec/tofu/tofu/tests/tests09_tutorials')[source]
tofu.tests.tests09_tutorials.test_01_runall.teardown_module(module, here='/home/lasofivec/tofu/tofu/tests/tests09_tutorials')[source]

tofu.tests.tests09_tutorials.tuto_plot_basic module

Getting started: 5 minutes tutorial for tofu

This is a tutorial that aims to get a new user a little familiar with tofu’s structure.

tofu.tests.tests09_tutorials.tuto_plot_create_geometry module

Creating your first Geometry

This is a tutorial that shows you how to create a simple geometry.

tofu.tests.tests09_tutorials.tuto_plot_custom_emissivity module

Computing a camera image with custom emissivity

This tutorial defines an emissivity that varies in space and computes the signal received by a camera using this emissivity.

tofu.tests.tests09_tutorials.tuto_plot_custom_emissivity.emissivity(pts, t=None, vect=None)[source]

Custom emissivity as a function of geometry.

Parameters
  • pts – ndarray of shape (3, npts) (each column is a xyz coordinate)

  • t – optional, time parameter to add a time dependency to the emissivity function

  • vect – optional, ndarray of shape (3, npts), if anisotropic emissivity, unit direction vectors (X,Y,Z)

Returns

  • emissivity – 2D array holding the emissivity for each point in the

    input grid

tofu.tests.tests09_tutorials.tuto_plot_custom_emissivity.project_to_2D(xyz)[source]

Projection to (0, X, Z) plane.

tofu.tests.tests09_tutorials.tuto_plot_solid_angles module

Computing the integrated solid angle of a particle

This tutorial show how to crete a configuration and computing the integrated solid angle subtended by a particle’s trajectory along phi with certain discretization, and plotting it.

\(\int_\Phi \Omega R d \Phi\)

Useful for reconstructing emissivity.