This repo contains the software of the Artificial Images Simulator (AIS). The AIS was developed using python 3 language to create cubes of artificial star images, simulating those images that would be acquired by using the SPARC4 [1] CCD cameras in astronomical observations. To create the images, the AIS models the star flux distribution as a 2D-Gaussian Distribution. This result is added to a noise image, created based on the noise information of the SPARC4 CCDs added to the sky flux, as a function of their operation mode. Figure below presents an example of an image created by the AIS. This page explains the step-by-step procedure of the AIS to create the images. Also, it is presented a simple execution example.
This section presents the procedure used the AIS to generate the cubes of artifical images. Initially, its operation can be divided into the parameters configuration step, the creation of a noise image step and, the calculation of the star flux step. In the parameters configuration step, the AIS will obtain the gain, the dark current noise, and the read noise of the CCD, as a function of its operation mode. The CCD gain is the conversion factor between the acquired photoelectrons and the Analogical-to-Ditial Unit (ADU), and it is obtained through the camera datasheet. The dark current noise is the number of thermoelectrons per pixel created by the dark current of the CCD as a function of its respective temperature. The read noise is a fluctuation in the value measured in each pixel of the CCD resulting from the image readout process. The calculation of the dark current noise and the read noise of the camera are based on the characterization of the SPARC4 CCDs, presented by [2].
Then, it is created the noise image. To accomplish this, initially, it is calculated the background level (B_L) of the image in ADU, as follows
where B represents the bias level of the CCD in ADU; the S_{dc} is the mean of the thermoelectrons created by the CCD dark current, in e-/pix; the S_{sky} is the sky flux, in photons/pix; the G_{em} is the Electron Multiplying Gain of the CCD; the B<sub>in</sub> is the number of pixels binned in the reading process; the G is the gain of the CCD. Once obtained the background level, it is calculated the image noise (N), in ADU. This noise is composed by the contributions of the sky noise, the dark current noise, and the read noise as follows
where N_F is an extra noise factor of the use of the Electron Multiplying mode, and it equals 1.4. For the Conventional Mode, N_F = 1; \sigma_{ADU} is the read noise in ADU. With these results, it is created the noise image, with pixels values given by a gaussian distribution centered in B_L and a standard deviation of N.
The next step is the calculation of the star flux distribution. To accomplish this, it is used a 2D-Gaussian distribution provided by the [3] as the star point spread function as follows:
where
f_p(x,y) is the star intensity in ADU, C represents the maximum amplitude in ADU, x and y are the coordinates over the image in pixels, x_0 and y_0 are the star coordinates in pixels, \delta_x and \delta_y are the standard deviation of the Gaussian in the x and y directions, respectively; \theta; is the rotation angle of the Gaussian.
The standard images created by the simulator have 200 x 200 pixels, the center coordinates of the star was fixed in (x_0, y_0) = (100,100) pixels; the values \delta_x = \delta_y, and \theta = 0. The maximum amplitude C, in ADU, for each image is calculated through
where \beta simulates a constant photon flux over the CCD. Finally, it is created one frame of the image cube by adding thogether the image noise and the star flux distribution. So, the image cube is assembled by concatenating several frames created in the previous step. The resulting cube is saved in the FITS 16-bit unsigned format.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
There are some packages that need to be installed before running the software.
To install these packages it is suggested to use the pip command as follows pip install <package_name>
Clone this repo using git clone https://github.com/DBernardes/AIS.git
To run a simple test, you only need to execute the run.py file and the image will be created in your current directory. The run.py file will provide to the AIS the basic information for its execution, that is the star flux, in photons/s; the sky flux, in photons/pix/s, and the information about the CCD. In particular, the CCD information should be a python dictionary with the control parameters used to configure the acquisition of the SPARC4 cameras. These parameters are the Electron Multiplying Mode (em_mode), the Electron Multiplying Gain (em_gain), the Pre-amplification (preamp), the Horizontal Shift Speed (hss), the Pixels Binning (bin), and the Exposure Time (texp). Below, it is presented the accepted values for each parameter previously described.
- star_flux: greater than zero
- sky_flux: greater than zero
- em_mode: 0 or 1
- em_gain: from 2 to 300
- preamp: 1 or 2
- hss: 0.1, 1, 10, 20, and 30
- bin: 1 or 2
- texp: greater or equal than 1e-5 s
Beyond the paramaters presented before, there are a set of optional paramaters. They are the CCD temperature in celsius degree (ccd_temp), the CCD serial number (serial_number), the image bias level in ADU (bias_level), the size of the image cube (cube_size), the number of lines and columns of the image in pixels (lines_number and columns_number, respectively), the gain of the CCD in e-/ADU (gain), the dark current noise in e- (dark_noise), the read noise in e- (read_noise), the name and directory of the image (image_name and image_dir, respectively), and the standard deviation of the gaussian in pixels (gaussian_stddev). If the values of the dark noise, read noise and the gain are not provided, the software will set these values based on the operation mode of the CCD.
- ccd_temp: from 0 ºC to -70 ºC
- serial_number: 9914, 9915, 9916, or 9917
- bias_level: integer and greater or equal than 1
- cube_size: integer and greater than 1
- lines_number: integer and greater or equal than 1
- columns_number: integer and greater or equal than 1
- gain: greater than 0
- dark_noise: greater than zero
- read_noise: greater than zero
- image_name: string
- image_dir: string
- gaussian_stddev: integer and equal or greater than 1
- Denis Bernardes:
email: denis.bernardes099@gmail.com
This project is licensed under the MIT License - see the LICENSE file for details
| [1] | Claudia V. Rodrigues, Keith Taylor, Francisco J. Jablonski, Marcelo Assafin, Alex Carciofi, Deonisio Cieslinski, Joaquim E. R. Costa, Ruben Dominguez, Tania P. Dominici, Gabriel A. P. Franco, Damien J. Jones, Antonio Kanaan, René Laporte, Antonio M. Magalhaes, André Milone, José A. Neri, Antonio Pereyra, Luiz A. Reitano, Karleyne M. G. Silva, Cesar Strauss, "Concept of SPARC4: a simultaneous polarimeter and rapid camera in 4 bands," Proc. SPIE 8446, Ground-based and Airborne Instrumentation for Astronomy IV, 844626 (24 September 2012); https://doi.org/10.1117/12.924976 |
| [2] | Bernardes, D. V., Martioli, E., and Rodrigues, C. V., “Characterization of the SPARC4 CCDs”, <i>Publications of the Astronomical Society of the Pacific</i>, vol. 130, no. 991, p. 95002, 2018. doi:10.1088/1538-3873/aacb1e. |
| [3] | The Astropy Collaboration et al 2018 AJ 156 123 |







