Commit 8bd05271 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Update doc

parent 448ed52c
Pipeline #26907 passed with stages
in 2 minutes and 47 seconds
nabu.app.available\_components module
=====================================
.. automodule:: nabu.app.available_components
:members:
:undoc-members:
:show-inheritance:
nabu.app.ccdfilter module
=========================
.. automodule:: nabu.app.ccdfilter
:members:
:undoc-members:
:show-inheritance:
nabu.app.chunkreader module
===========================
.. automodule:: nabu.app.chunkreader
:members:
:undoc-members:
:show-inheritance:
nabu.app.component module
=========================
.. automodule:: nabu.app.component
:members:
:undoc-members:
:show-inheritance:
nabu.app.flatfield module
=========================
.. automodule:: nabu.app.flatfield
:members:
:undoc-members:
:show-inheritance:
nabu.app.memtransfer module
===========================
.. automodule:: nabu.app.memtransfer
:members:
:undoc-members:
:show-inheritance:
nabu.app.opmap module
=====================
.. automodule:: nabu.app.opmap
:members:
:undoc-members:
:show-inheritance:
nabu.app.phase module
=====================
.. automodule:: nabu.app.phase
:members:
:undoc-members:
:show-inheritance:
nabu.app.pipeline module
========================
.. automodule:: nabu.app.pipeline
:members:
:undoc-members:
:show-inheritance:
nabu.app.process module
=======================
.. automodule:: nabu.app.process
:members:
:undoc-members:
:show-inheritance:
nabu.app.reconstruction module
==============================
.. automodule:: nabu.app.reconstruction
:members:
:undoc-members:
:show-inheritance:
......@@ -7,22 +7,10 @@ Submodules
.. toctree::
:maxdepth: 4
nabu.app.available_components
nabu.app.ccdfilter
nabu.app.chunkreader
nabu.app.component
nabu.app.flatfield
nabu.app.fullfield
nabu.app.fullfield_cuda
nabu.app.logger
nabu.app.memtransfer
nabu.app.opmap
nabu.app.phase
nabu.app.pipeline
nabu.app.process
nabu.app.reconstruction
nabu.app.saving
nabu.app.simple_pipeline
nabu.app.sinobuilder
nabu.app.unsharp
Module contents
---------------
......
nabu.app.saving module
======================
.. automodule:: nabu.app.saving
:members:
:undoc-members:
:show-inheritance:
nabu.app.sinobuilder module
===========================
.. automodule:: nabu.app.sinobuilder
:members:
:undoc-members:
:show-inheritance:
nabu.app.unsharp module
=======================
.. automodule:: nabu.app.unsharp
:members:
:undoc-members:
:show-inheritance:
nabu.preproc.alignment module
=======================
=============================
.. automodule:: nabu.preproc.alignment
:members:
......
......@@ -7,14 +7,15 @@ Submodules
.. toctree::
:maxdepth: 4
nabu.preproc.alignment
nabu.preproc.ccd
nabu.preproc.ccd_cuda
nabu.preproc.alignment
nabu.preproc.double_flat_field
nabu.preproc.phase
nabu.preproc.phase_cuda
nabu.preproc.rings
nabu.preproc.rings_cuda
nabu.preproc.shift
nabu.preproc.sinogram
nabu.preproc.sinogram_cuda
......
......@@ -53,7 +53,7 @@ Numerical issues might occur when performing this step. For this reason, the pro
Configuration file: section `[preproc]`: `take_logarithm = 1`, `log_min_clip = 1e-6`, `log_max_clip = 10.0`.
API: [CCDProcessing.take_logarithm](apidoc/nabu.preproc.ccd.rst#nabu.preproc.ccd.CCDProcessing.take_logarithm) and [CudaLog](apidoc/nabu.preproc.ccd_cuda.rst#nabu.preproc.ccd_cuda.CudaLog)
API: [CCDProcessing.Log](apidoc/nabu.preproc.ccd.rst#nabu.preproc.ccd.Log) and [CudaLog](apidoc/nabu.preproc.ccd_cuda.rst#nabu.preproc.ccd_cuda.CudaLog)
## Phase retrieval
......
......@@ -56,7 +56,6 @@ Advanced documentation
tests.md
pipeline.md
processing_components.md
nabu_tasks.md
validators.md
......
# Processing and Components
This page brings some terminology for developers.
## Processing
`Processing` is a class making a specific processing step (ex. `FlatField`). In general, these classes provide a very specific feature (ex. Paganin phase retrieval, Median-clip, ...).
``` note:: The name "Processing" serves as a terminology to distinguish between concepts and Nabu classes. It is not formally enforced by inheritance in the Nabu code, although these classes usually inherit from a "Processing"-like class, like "CCDProcessing", "CudaProcessing", etc.
```
When building an application upon Nabu, these are the last classes to be called, once all the parameters are sorted out.
The typical usage of a `Processing`-like class is
- First instantiate the class with specific options
- Then, Call the main class method
**Example usage**:
```python
# Build a Processing object - it might take some time
F = FlatField(radios, flats, darks)
# Then, perform the processing
F.normalize_radios() # parameters depend on the class implementation, ex. CudaFlatfield
```
**Examples of "Processing"**:
- [CCDProcessing](apidoc/nabu.preproc.ccd.rst#nabu.preproc.ccd.CCDProcessing)
- [PaganinPhaseRetrieval](apidoc/nabu.preproc.phase.rst#nabu.preproc.phase.PaganinPhaseRetrieval)
- [Reconstructor](apidoc/nabu.reconstruction.reconstructor.rst#nabu.reconstruction.reconstructor.Reconstructor)
## Component
### Rationale
A `Component` is a wrapper around a `Processing`, whose aim is to make the translation between user parameters and final `Processing` parameters.
For an interactive usage where the data is "ready" and all the parameters are known, it is fine to use `Processing` classes directly. Each feature can be seen as an individual function or class instance.
In an application, by contrast, the `Processing` classes (ex. `FlatField`) are part of a wider context (data/GPU contexts have to be re-used, parameters have to be consistent in the whole processing chain, and so on). Therefore, the application is built on top of several `Component` objects, which in turn use the `Processing` objects. A `Component` uses one or more `Processing` class instances, sometimes in loops, for example to manage input/output arrays.
Conceptually, these are "application components" or "processing pipeline components". A component breaks down in one or several "elementary" Processing steps.
### Behavior
A `Component` object often behaves differently than `Processing` objects:
- On one hand, `Processing` objects can be used to process data independently of eachother
- On the other hand, `Component` objects are designed to be coupled together in a wider context (an application).
For this reason, a component object invariably:
- Take 3D data as an input ([chunks](definitions.md))
- Do the processing **in-place**. **This means that the input data is overwritten**
This behavior is similar to many functions of [tomopy](https://github.com/tomopy/tomopy).
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment