simulate_data_pyoof¶
- pyoof.simulate_data_pyoof(I_coeff, K_coeff, wavel, d_z, illum_func, telgeo, noise, resolution, box_factor, work_dir=None)[source]¶
Routine to generate data and test the pyoof package algorithm. It has the default setting for the pyoof FITS file input.
- Parameters
- I_coeff
list List which contains 4 parameters, the illumination amplitude, \(A_{E_\mathrm{a}}\), the illumination taper, \(c_\mathrm{dB}\) and the two coordinate offset, \((x_0, y_0)\). The illumination coefficients must be listed as follows,
I_coeff = [i_amp, c_dB, x0, y0].- K_coeff
ndarray Constants coefficients, \(K_{n\ell}\), for each of them there is only one Zernike circle polynomial, \(U^\ell_n(\varrho, \varphi)\).
- wavel
Quantity Wavelength, \(\lambda\), of the observation in length units.
- d_z
Quantity Radial offset \(d_z\), added to the sub-reflector in length units. This characteristic measurement adds the classical interference pattern to the beam maps, normalized squared (field) radiation pattern, which is an out-of-focus property. The radial offset list must be as follows,
d_z = [d_z-, 0., d_z+]all of them in length units.- illum_func
function Illumination function, \(E_\mathrm{a}(x, y)\), to be evaluated with the key
I_coeff. The illumination functions available areillum_parabolicandillum_gauss.- telgeo
list List that contains the blockage distribution, optical path difference (OPD) function, and the primary radius (
float) in lenght units. The list must have the following order,telego = [block_dist, opd_func, pr].- noise
float Noise amplitude added to the generated data. The noise comes from a random Gaussian, see
normal.- resolution
int Fast Fourier Transform resolution for a rectangular grid. The input value has to be greater or equal to the telescope resolution and with power of 2 for faster FFT processing. It is recommended a value higher than
resolution = 2 ** 8.- box_factor
int Related to the FFT resolution (resolution key), defines the image pixel size level. It depends on the primary radius,
pr, of the telescope, e.g. abox_factor = 5returnsx = np.linspace(-5 * pr, 5 * pr, resolution), an array to be used in the FFT2 (fft2).- work_dir
str Default is
None, it will store the FITS file in the current directory, for other provide the desired path.
- I_coeff
- Returns
- pyoof_fits
HDUList The output fits file is stored in the directory
'data_generated/'. Every time the function is executed a new file will be stored (with increased numbering). The file is ready to use for thepyoofpackage.
- pyoof_fits
- Raises
ValueErrorIf the known a priori radial offset
d_zis different than:[d_z-, 0., d_z+], negative, zero, and positive float.