# 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
                 setter.
                 This is because not all system gains are possible but rather a
                 linear sample between the minimal and maximal value.
        """
        return self._K

    @K.setter
    def K(self, value):
        self._K = routines.nearest_value(value, self.__Ks)

    @property
    def Ks(self):
        """The array of all the available system gains (in DN/e^-)."""
        return self.__Ks

    @property
    def blackoffset(self):
        """The system dark signal offset (in DN).

        :Setter: The setter uses the
                 :func:`~emva1288.camera.routines.nearest_value` function
                 to set the black signal offset to the nearest value given
                 to the setter. This is because not all black offsets are
                 possible but rather a linear sample between the minimal
                 and maximal value.
        """
        return self._blackoffset

    @blackoffset.setter
    def blackoffset(self, value):

# 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

                 setter.
                 This is because not all system gains are possible but rather a
                 linear sample between the minimal and maximal value.
        """
        return self._K

    @K.setter
    def K(self, value):
        self._K = routines.nearest_value(value, self.__Ks)

    @property
    def Ks(self):
        """The array of all the available system gains (in DN/e^-)."""
        return self.__Ks

    @property
    def blackoffset(self):
        """The system dark signal offset (in DN).

        :Setter: The setter uses the
                 :func:`~emva1288.camera.routines.nearest_value` function
                 to set the black signal offset to the nearest value given
                 to the setter. This is because not all black offsets are
                 possible but rather a linear sample between the minimal
                 and maximal value.
        """
        return self._blackoffset

    @blackoffset.setter
    def blackoffset(self, value):

        self._blackoffset = routines.nearest_value(value,