From 9d49188e4a0db2998a6a1663804af074f7f7f4dc Mon Sep 17 00:00:00 2001 From: LukasK13 Date: Thu, 10 Sep 2020 15:02:52 +0200 Subject: [PATCH] Rename parameter read_noise to sigma_read_out --- esbo_etc/classes/sensor/Imager.py | 10 +++++----- tests/sensor/test_Imager.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/esbo_etc/classes/sensor/Imager.py b/esbo_etc/classes/sensor/Imager.py index aa93c15..bfe5bfc 100644 --- a/esbo_etc/classes/sensor/Imager.py +++ b/esbo_etc/classes/sensor/Imager.py @@ -20,10 +20,10 @@ class Imager(ASensor): """ __encircled_energy: Union[str, float, u.Quantity] - @u.quantity_input(pixel_geometry=u.pixel, pixel_size="length", read_noise=u.electron ** 0.5 / u.pix, + @u.quantity_input(pixel_geometry=u.pixel, pixel_size="length", sigma_read_out=u.electron ** 0.5 / u.pix, center_offset=u.pix, dark_current=u.electron / u.pix / u.second, well_capacity=u.electron) def __init__(self, parent: IRadiant, quantum_efficiency: Union[str, u.Quantity], - pixel_geometry: u.Quantity, pixel_size: u.Quantity, read_noise: u.Quantity, dark_current: u.Quantity, + pixel_geometry: u.Quantity, pixel_size: u.Quantity, sigma_read_out: u.Quantity, dark_current: u.Quantity, well_capacity: u.Quantity, f_number: Union[int, float], common_conf: Entry, center_offset: u.Quantity = np.array([0, 0]) << u.pix, shape: str = "circle", contained_energy: Union[str, int, float] = "FWHM", aperture_size: u.Quantity = None): @@ -42,7 +42,7 @@ class Imager(ASensor): [number of pixels in x-direction, number of pixels in y-direction] pixel_size : length-Quantity The edge length of a pixel (assumed to be square). - read_noise : Quantity + sigma_read_out : Quantity The RMS-read noise per detector pixel in electrons^0.5 / pixel. dark_current : Quantity The dark current of a detector pixel in electrons / (pixels * s). @@ -69,7 +69,7 @@ class Imager(ASensor): self.__quantum_efficiency = quantum_efficiency self.__pixel_geometry = pixel_geometry self.__pixel_size = pixel_size - self.__read_noise = read_noise + self.__sigma_read_out = sigma_read_out self.__dark_current = dark_current self.__well_capacity = well_capacity self.__f_number = f_number @@ -375,7 +375,7 @@ class Imager(ASensor): # Calculate the background current PixelMask background_current = mask * background_current * u.pix # Calculate the read noise PixelMask - read_noise = mask * self.__read_noise * u.pix + read_noise = mask * self.__sigma_read_out * u.pix # Calculate the dark current PixelMask dark_current = mask * self.__dark_current * u.pix if self.__aperture_size is None and size.lower() != "extended": diff --git a/tests/sensor/test_Imager.py b/tests/sensor/test_Imager.py index 65b93a3..631a0b4 100644 --- a/tests/sensor/test_Imager.py +++ b/tests/sensor/test_Imager.py @@ -13,7 +13,7 @@ class TestImager(TestCase): self.config = Configuration("tests/data/esbo-etc_defaults.xml").conf self.imager_args = dict(quantum_efficiency=0.9 * u.electron / u.photon, pixel_geometry=np.array([1024, 1024]) << u.pix, - pixel_size=6.5 * u.um, read_noise=1.4 * u.electron ** 0.5 / u.pix, + pixel_size=6.5 * u.um, sigma_read_out=1.4 * u.electron ** 0.5 / u.pix, dark_current=0.6 * u.electron / u.pix / u.second, well_capacity=30000 * u.electron, f_number=13, common_conf=self.config.common, center_offset=np.array([0, 0]) << u.pix, shape="circle", contained_energy="FWHM", aperture_size=None)