Exemplo n.º 1
0
    def get_photons(self,
                    radiance,
                    exposure=None,
                    wavelength=None,
                    f_number=None):
        """Computes the number of photons received by one pixel.

        Uses the :func:`~emva1288.camera.routines.get_photons` function
        to compute this number.

        Parameters
        ----------
        radiance : float
                   The radiance exposed to the camera (in Wsr^-1cm^-2).
        exposure : float, optional
                   The pixel's exposure time in ns.

        Returns
        -------
        float :
            The number of photons received by one pixel.
        """
        if exposure is None:
            exposure = self.exposure
        if f_number is None:
            f_number = self.environment['f_number']
        if wavelength is None:
            wavelength = self.environment['wavelength']
        return routines.get_photons(exposure, wavelength, radiance,
                                    self.pixel_area, f_number)
Exemplo n.º 2
0
    def get_photons(self, radiance, exposure=None):
        """Computes the number of photons received by one pixel.

        Uses the :func:`~emva1288.camera.routines.get_photons` function
        to compute this number.

        Parameters
        ----------
        radiance : float
                   The radiance exposed to the camera (in Wsr^-1cm^-2).
        exposure : float, optional
                   The pixel's exposure time in ns.

        Returns
        -------
        float :
            The number of photons received by one pixel.
        """
        if exposure is None:
            exposure = self.exposure
        return routines.get_photons(exposure,
                                    self._wavelength,
                                    radiance,
                                    self.pixel_area,
                                    self._f_number)
Exemplo n.º 3
0
 def get_photons(self, radiance):
     return routines.get_photons(self.exposure,
                                 self._wavelength,
                                 radiance,
                                 self._pixel_area,
                                 self._f_number)