diff --git a/docs/source/api/esbo_etc.classes.optical_component.rst b/docs/source/api/esbo_etc.classes.optical_component.rst index 505adfd..6d62ad5 100644 --- a/docs/source/api/esbo_etc.classes.optical_component.rst +++ b/docs/source/api/esbo_etc.classes.optical_component.rst @@ -68,6 +68,14 @@ esbo\_etc.classes.optical\_component.Mirror module :undoc-members: :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 ------------------------------------------------------ diff --git a/docs/source/api/esbo_etc.classes.rst b/docs/source/api/esbo_etc.classes.rst index 33a56f5..ddd3aaf 100644 --- a/docs/source/api/esbo_etc.classes.rst +++ b/docs/source/api/esbo_etc.classes.rst @@ -15,6 +15,22 @@ Subpackages 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 ------------------------------- @@ -39,14 +55,6 @@ esbo\_etc.classes.IRadiant module :undoc-members: :show-inheritance: -esbo\_etc.classes.RadiantFactory module ---------------------------------------- - -.. automodule:: esbo_etc.classes.RadiantFactory - :members: - :undoc-members: - :show-inheritance: - esbo\_etc.classes.SpectralQty module ------------------------------------ diff --git a/docs/source/api/esbo_etc.classes.target.rst b/docs/source/api/esbo_etc.classes.target.rst index 9f35e9b..95cfc8f 100644 --- a/docs/source/api/esbo_etc.classes.target.rst +++ b/docs/source/api/esbo_etc.classes.target.rst @@ -28,6 +28,14 @@ esbo\_etc.classes.target.FileTarget module :undoc-members: :show-inheritance: +esbo\_etc.classes.target.TargetFactory module +--------------------------------------------- + +.. automodule:: esbo_etc.classes.target.TargetFactory + :members: + :undoc-members: + :show-inheritance: + Module contents --------------- diff --git a/docs/source/developer/extending.rst b/docs/source/developer/extending.rst index d0035cc..46ba3d4 100644 --- a/docs/source/developer/extending.rst +++ b/docs/source/developer/extending.rst @@ -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. 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 @@ -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. 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``). Adding Detector Components diff --git a/docs/source/developer/images/RadiantFactory.pdf b/docs/source/developer/images/RadiantFactory.pdf deleted file mode 100644 index b2f0383..0000000 Binary files a/docs/source/developer/images/RadiantFactory.pdf and /dev/null differ diff --git a/docs/source/developer/images/RadiantFactory.png b/docs/source/developer/images/RadiantFactory.png deleted file mode 100644 index 17b3af3..0000000 Binary files a/docs/source/developer/images/RadiantFactory.png and /dev/null differ diff --git a/docs/source/developer/images/SensorFactory.pdf b/docs/source/developer/images/SensorFactory.pdf deleted file mode 100644 index d71b684..0000000 Binary files a/docs/source/developer/images/SensorFactory.pdf and /dev/null differ diff --git a/docs/source/developer/images/SensorFactory.png b/docs/source/developer/images/SensorFactory.png deleted file mode 100644 index d2f4bd1..0000000 Binary files a/docs/source/developer/images/SensorFactory.png and /dev/null differ diff --git a/docs/source/developer/images/class_diagram.pdf b/docs/source/developer/images/class_diagram.pdf index 080b711..b475319 100644 Binary files a/docs/source/developer/images/class_diagram.pdf and b/docs/source/developer/images/class_diagram.pdf differ diff --git a/docs/source/developer/images/class_diagram.png b/docs/source/developer/images/class_diagram.png index 01e3652..356e418 100644 Binary files a/docs/source/developer/images/class_diagram.png and b/docs/source/developer/images/class_diagram.png differ diff --git a/docs/source/developer/software_architecture.rst b/docs/source/developer/software_architecture.rst index f3e074e..3a4ec7f 100644 --- a/docs/source/developer/software_architecture.rst +++ b/docs/source/developer/software_architecture.rst @@ -70,7 +70,7 @@ Hot Optical Component 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. -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. Sensor @@ -103,27 +103,17 @@ Factories --------- In order to instantiate the corresponding objects from the configuration file, the `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 - :alt: RadiantFactory class + Class diagram of the factories. - 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. -Therefore the method ``create()`` analyzes the parsed configuration and assembles the necessary parameters for the following instantiation of the object. -The method ``fromConfigBatch`` allows to set up a batch of objects starting with a target and continuing with possibly multiple optical components. - -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. +The class ``TargetFactory`` is responsible for the instantiation of all subclasses of ``ATarget``. +In contrast, the class ``OpticalComponentFactory`` handles the creation of all subclasses of ``AOpticalComponent``. +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``.