# Path: emva1288/camera/routines.py
# def nearest_value(value, array):
# def get_photons(exposure, radiance, pixel_area, wavelength, f_number):
# def get_radiance(exposure, photons, pixel_area, f_number, wavelength):
# def get_tile(arr, height, width):
# def get_bayer_filter(t00, t01, t10, t11, width, height, w):
# def array_tile(array, height, width):
# def poisson(x, loc, mu=1000):
#     def __init__(self,
#                  qe=None,
#                  wavelength=np.linspace(400, 800, 100),
#                  width=640,
#                  height=480,
#                  filter=None):
#     def w(self):
#     def qe(self):
#     def gen_qe(self):
#         def gauss(w):
# class Qe(object):


import numpy as np
from emva1288.camera import routines
            Full well capacity
        dsnu : np.array, optional
               DSNU image in e^-, array with the same shape of the image
               that is added to every image.
        prnu : np.array, optional
               PRNU image in percentages (1 = 100%), array with the same shape
               of the image. Every image is multiplied by it.
        seed : int, optional
               A seed to initialize the random number generator.
        """
        self._pixel_area = pixel_area
        self._bit_depth = bit_depth
        self._img_max = 2 ** int(bit_depth) - 1

        if bit_depth <= 8:
            self._img_type = np.uint8
        elif bit_depth <= 16:
            self._img_type = np.uint16
        else:
            self._img_type = np.uint64

        self._width = width
        self._height = height
        self._shape = (self.height, self.width)

        self._temperature_ref = temperature_ref
        self._temperature_doubling = temperature_doubling
        self._qe = qe
        # When no specific qe is provided we simulate one
        if qe is None:

# Path: emva1288/camera/routines.py
# def nearest_value(value, array):
# def get_photons(exposure, radiance, pixel_area, wavelength, f_number):
# def get_radiance(exposure, photons, pixel_area, f_number, wavelength):
# def get_tile(arr, height, width):
# def get_bayer_filter(t00, t01, t10, t11, width, height, w):
# def array_tile(array, height, width):
# def poisson(x, loc, mu=1000):
#     def __init__(self,
#                  qe=None,
#                  wavelength=np.linspace(400, 800, 100),
#                  width=640,
#                  height=480,
#                  filter=None):
#     def w(self):
#     def qe(self):
#     def gen_qe(self):
#         def gauss(w):
# class Qe(object):


# Path: emva1288/camera/camera.py
import numpy as np
from emva1288.camera import routines

            Full well capacity
        dsnu : np.array, optional
               DSNU image in e^-, array with the same shape of the image
               that is added to every image.
        prnu : np.array, optional
               PRNU image in percentages (1 = 100%), array with the same shape
               of the image. Every image is multiplied by it.
        seed : int, optional
               A seed to initialize the random number generator.
        """
        self._pixel_area = pixel_area
        self._bit_depth = bit_depth
        self._img_max = 2 ** int(bit_depth) - 1

        if bit_depth <= 8:
            self._img_type = np.uint8
        elif bit_depth <= 16:
            self._img_type = np.uint16
        else:
            self._img_type = np.uint64

        self._width = width
        self._height = height
        self._shape = (self.height, self.width)

        self._temperature_ref = temperature_ref
        self._temperature_doubling = temperature_doubling
        self._qe = qe
        # When no specific qe is provided we simulate one
        if qe is None:

            self._qe = routines.Qe(height=self._height, width=self._width)