Docs updated for new factory methods
This commit is contained in:
parent
5dfb922239
commit
cecdc0f335
@ -68,6 +68,14 @@ esbo\_etc.classes.optical\_component.Mirror module
|
|||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
|
esbo\_etc.classes.optical\_component.OpticalComponentFactory module
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
|
||||||
|
.. automodule:: esbo_etc.classes.optical_component.OpticalComponentFactory
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
esbo\_etc.classes.optical\_component.StrayLight module
|
esbo\_etc.classes.optical\_component.StrayLight module
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
||||||
|
@ -15,6 +15,22 @@ Subpackages
|
|||||||
Submodules
|
Submodules
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
esbo\_etc.classes.AFactory module
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
.. automodule:: esbo_etc.classes.AFactory
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
|
esbo\_etc.classes.ARadiantFactory module
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
.. automodule:: esbo_etc.classes.ARadiantFactory
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
esbo\_etc.classes.Config module
|
esbo\_etc.classes.Config module
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
@ -39,14 +55,6 @@ esbo\_etc.classes.IRadiant module
|
|||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
esbo\_etc.classes.RadiantFactory module
|
|
||||||
---------------------------------------
|
|
||||||
|
|
||||||
.. automodule:: esbo_etc.classes.RadiantFactory
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
esbo\_etc.classes.SpectralQty module
|
esbo\_etc.classes.SpectralQty module
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
|
@ -28,6 +28,14 @@ esbo\_etc.classes.target.FileTarget module
|
|||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
|
esbo\_etc.classes.target.TargetFactory module
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
|
.. automodule:: esbo_etc.classes.target.TargetFactory
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
|
@ -14,7 +14,7 @@ The class must provide a constructor which accepts all attributes of the configu
|
|||||||
Additionally, the class must implement the method ``checkConfig()`` in order to check the configuration.
|
Additionally, the class must implement the method ``checkConfig()`` in order to check the configuration.
|
||||||
In case of an configuration error, the method must return the corresponding error message.
|
In case of an configuration error, the method must return the corresponding error message.
|
||||||
|
|
||||||
Optionally, the factory method ``create()`` of the class ``RadiantFactory`` has to be modified, if the constructor of the new component requires more parameters than the configuration tag attributes.
|
Optionally, the factory method ``create()`` of the class ``TargetFactory`` has to be modified, if the constructor of the new component requires more parameters than the configuration tag attributes.
|
||||||
|
|
||||||
|
|
||||||
Adding Optical Components
|
Adding Optical Components
|
||||||
@ -33,7 +33,7 @@ In case of an configuration error, the method must return the corresponding erro
|
|||||||
The method ``propagate()`` is used to model the propagation of incoming radiation through the optical component.
|
The method ``propagate()`` is used to model the propagation of incoming radiation through the optical component.
|
||||||
Therefore, this method receives as parameter the incoming radiation as ``SpectralQty``-object and must return the manipulated radiation as ``SpectralQty``-object.
|
Therefore, this method receives as parameter the incoming radiation as ``SpectralQty``-object and must return the manipulated radiation as ``SpectralQty``-object.
|
||||||
|
|
||||||
The optional second task consists of modifying the factory method ``create()`` of the class ``RadiantFactory`` in order to properly initialize the new optical component from the configuration.
|
The optional second task consists of modifying the factory method ``create()`` of the class ``OpticalComponentFactory`` in order to properly initialize the new optical component from the configuration.
|
||||||
This is only necessary if the new optical component needs additional parameters besides the attributes of the corresponding configuration tag of if the new component provides multiple constructors (see class ``Filter``).
|
This is only necessary if the new optical component needs additional parameters besides the attributes of the corresponding configuration tag of if the new component provides multiple constructors (see class ``Filter``).
|
||||||
|
|
||||||
Adding Detector Components
|
Adding Detector Components
|
||||||
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 9.5 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.5 MiB |
@ -70,7 +70,7 @@ Hot Optical Component
|
|||||||
Class diagram of the hot optical components.
|
Class diagram of the hot optical components.
|
||||||
|
|
||||||
The abstract class ``AHotOpticalComponent`` extends the abstract superclass ``AOpticalComponent`` by implementing the method ``ownNoise()`` assuming grey body radiation in order to model optical components with a thermal background contribution.
|
The abstract class ``AHotOpticalComponent`` extends the abstract superclass ``AOpticalComponent`` by implementing the method ``ownNoise()`` assuming grey body radiation in order to model optical components with a thermal background contribution.
|
||||||
This has the consequence, that every subclass of ``AHotOpticalComponent`` must implement the method ``propagate()``, which handles to propagation of the signal and backgroudn radiation through the component.
|
This has the consequence, that every subclass of ``AHotOpticalComponent`` must implement the method ``propagate()``, which handles to propagation of the signal and background radiation through the component.
|
||||||
Like ``AOpticalComponent``, the class ``AHotOpticalComponent`` provides the abstract method ``checkConfig()`` for checking the configuration file.
|
Like ``AOpticalComponent``, the class ``AHotOpticalComponent`` provides the abstract method ``checkConfig()`` for checking the configuration file.
|
||||||
|
|
||||||
Sensor
|
Sensor
|
||||||
@ -103,27 +103,17 @@ Factories
|
|||||||
---------
|
---------
|
||||||
|
|
||||||
In order to instantiate the corresponding objects from the configuration file, the `factory method pattern <https://en.wikipedia.org/wiki/Factory_method_pattern>`_ was used.
|
In order to instantiate the corresponding objects from the configuration file, the `factory method pattern <https://en.wikipedia.org/wiki/Factory_method_pattern>`_ was used.
|
||||||
The following two factory methods are responsible for transforming the parsed configuration into the cascaded radiation transportation pipeline.
|
The following factory methods are responsible for transforming the parsed configuration into the cascaded radiation transportation pipeline.
|
||||||
|
|
||||||
Radiant Factory
|
.. figure:: images/Factory.png
|
||||||
^^^^^^^^^^^^^^^
|
:alt: Factory classes
|
||||||
|
|
||||||
.. figure:: images/RadiantFactory.png
|
Class diagram of the factories.
|
||||||
:alt: RadiantFactory class
|
|
||||||
|
|
||||||
Class diagram of the radiant factory.
|
The abstract superclass ``AFactory`` provides the abstract method ``create()`` to create any target, optical component and detector object.
|
||||||
|
Additionally, the method ``collectOptions()`` allows to collect all options from the parsed configuration as dictionary for the constructor call of the corresponding class.
|
||||||
|
|
||||||
The class ``RadiantFactory`` is responsible for the instantiation of all targets and optical components.
|
The class ``TargetFactory`` is responsible for the instantiation of all subclasses of ``ATarget``.
|
||||||
Therefore the method ``create()`` analyzes the parsed configuration and assembles the necessary parameters for the following instantiation of the object.
|
In contrast, the class ``OpticalComponentFactory`` handles the creation of all subclasses of ``AOpticalComponent``.
|
||||||
The method ``fromConfigBatch`` allows to set up a batch of objects starting with a target and continuing with possibly multiple optical components.
|
It provides the method ``fromConfigBatch`` to set up a batch of optical components.
|
||||||
|
Finally, the class ``SensorFactory`` is responsible for the instantiation of all subclasses of ``ASensor``.
|
||||||
Sensor Factory
|
|
||||||
^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. figure:: images/SensorFactory.png
|
|
||||||
:alt: SensorFactory class
|
|
||||||
|
|
||||||
Class diagram of the sensor factory.
|
|
||||||
|
|
||||||
The class ``SensorFactory`` allows to instantiate a sensor object from the parsed configuration.
|
|
||||||
In detail, the method ``create()`` is responsible for assembling all parameters and setting up the object.
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user