def __init__(self,
                 photon_source=None,
                 photon_propagator=None,
                 photon_interactor=None,
                 photon_diffractor=None,
                 photon_detector=None,
                 photon_analyzer=None):
        """
        !@brief  Constructor for the PhotonExperimentSimulation object.

        @param photon_source: The calculator for the photon source.
        <br/><b>type</b> : Child of AbstractPhotonSource

        @param photon_propagator : The calculator for the wave propagation from source to target.
        <br/><b>type</b> : Child of AbstractPhotonPropagator

        @param photon_interactor : The calculator for the photon-matter interaction.
        <br/><b>type</b> : Child of AbstractPhotonInteractor

        @param : photon_diffractor : The calculator for the photon diffraction.
        <br/><b>type</b> : Child of AbstractPhotonDiffractor

        @param photon_detector : The calculator for photon detection.
        <br/><b>type</b> : Child of AbstractPhotonDetector

        @param photon_analyzer : The calculator for  photon signal analysis.
        <br/><b>type</b> : Child of AbstractPhotonAnalyzer
        """
        self.__photon_source = checkAndSetPhotonSource(photon_source)
        self.__photon_propagator = checkAndSetPhotonPropagator(
            photon_propagator)
        self.__photon_interactor = checkAndSetPhotonInteractor(
            photon_interactor)
        self.__photon_diffractor = checkAndSetPhotonDiffractor(
            photon_diffractor)
        self.__photon_detector = checkAndSetPhotonDetector(photon_detector)
        self.__photon_analyzer = checkAndSetPhotonAnalyzer(photon_analyzer)

        self.__calculators = [
            self.__photon_source,
            self.__photon_propagator,
            self.__photon_interactor,
            self.__photon_diffractor,
            self.__photon_analyzer,
        ]

        if self.__photon_detector is not None:
            self.__calculators.insert(-1, self.__photon_detector)

        if any([calc is None for calc in self.__calculators]):
            raise (TypeError, "No calculator can be None.")
Esempio n. 2
0
    def __init__(self,
                 photon_source=None,
                 photon_propagator=None,
                 photon_interactor=None,
                 photon_diffractor=None,
                 photon_detector=None,
                 photon_analyzer=None):
        """

        :param photon_source: The calculator for the photon source.
        :type photon_source:  AbstractPhotonSource

        :param photon_propagator : The calculator for the wave propagation from source to target.
        :type photon_propagator:  AbstractPhotonPropagator

        :param photon_interactor : The calculator for the photon-matter interaction.
        :type photon_interactor:  AbstractPhotonInteractor

        :param photon_diffractor : The calculator for the photon diffraction.
        :type photon_diffractor:  AbstractPhotonDiffractor

        :param photon_detector: The calculator for photon detection.
        :type photon_detector:  AbstractPhotonDetector

        :param photon_analyzer: The calculator for  photon signal analysis.
        :type photon_analyzer:  AbstractPhotonAnalyzer
        """
        self.__photon_source = checkAndSetPhotonSource(photon_source)
        self.__photon_propagator = checkAndSetPhotonPropagator(
            photon_propagator)
        self.__photon_interactor = checkAndSetPhotonInteractor(
            photon_interactor)
        self.__photon_diffractor = checkAndSetPhotonDiffractor(
            photon_diffractor)
        self.__photon_detector = checkAndSetPhotonDetector(photon_detector)
        self.__photon_analyzer = checkAndSetPhotonAnalyzer(photon_analyzer)

        self.__calculators = [
            self.__photon_source,
            self.__photon_propagator,
            self.__photon_interactor,
            self.__photon_diffractor,
            self.__photon_analyzer,
        ]

        if self.__photon_detector is not None:
            self.__calculators.insert(-1, self.__photon_detector)

        if any([calc is None for calc in self.__calculators]):
            raise TypeError
    def __init__(self, photon_source=None,
                       photon_propagator=None,
                       photon_interactor=None,
                       photon_diffractor=None,
                       photon_detector=None,
                       photon_analyzer=None):
        """
        !@brief  Constructor for the PhotonExperimentSimulation object.

        @param photon_source: The calculator for the photon source.
        <br/><b>type</b> : Child of AbstractPhotonSource

        @param photon_propagator : The calculator for the wave propagation from source to target.
        <br/><b>type</b> : Child of AbstractPhotonPropagator

        @param photon_interactor : The calculator for the photon-matter interaction.
        <br/><b>type</b> : Child of AbstractPhotonInteractor

        @param : photon_diffractor : The calculator for the photon diffraction.
        <br/><b>type</b> : Child of AbstractPhotonDiffractor

        @param photon_detector : The calculator for photon detection.
        <br/><b>type</b> : Child of AbstractPhotonDetector

        @param photon_analyzer : The calculator for  photon signal analysis.
        <br/><b>type</b> : Child of AbstractPhotonAnalyzer
        """
        self.__photon_source = checkAndSetPhotonSource(photon_source)
        self.__photon_propagator = checkAndSetPhotonPropagator(photon_propagator)
        self.__photon_interactor = checkAndSetPhotonInteractor(photon_interactor)
        self.__photon_diffractor = checkAndSetPhotonDiffractor(photon_diffractor)
        self.__photon_detector = checkAndSetPhotonDetector(photon_detector)
        self.__photon_analyzer = checkAndSetPhotonAnalyzer(photon_analyzer)

        self.__calculators = [
                self.__photon_source,
                self.__photon_propagator,
                self.__photon_interactor,
                self.__photon_diffractor,
                self.__photon_analyzer,
                ]


        if self.__photon_detector is not None:
            self.__calculators.insert(-1, self.__photon_detector )

        if any([calc is None for calc in self.__calculators]):
            raise( TypeError, "No calculator can be None.")
 def photon_interactor(self, value):
     self.__photon_interactor = checkAndSetPhotonInteractor( value )
 def photon_interactor(self, value):
     self.__photon_interactor = checkAndSetPhotonInteractor(value)