38 from .
import config_setter_utils
as csu
48 """ Private members were initialized yet """
50 """ linear size of full image (in pixels)."""
52 """ observations zenith angle (in deg)."""
54 """ boolean for apodizer"""
56 """ File to load an apodizer from """
58 """ linear size of total pupil (in pixels)."""
60 """ central point of the simulation."""
62 """ Pixel size of the simulation [meters]."""
80 """ Get the is_init flag
82 :return: (bool) : is_init flag
87 """ set the is_init flag
89 :param i: (bool) : is_init flag
91 self.
__is_init = csu.enforce_or_cast_bool(i)
93 is_init = property(get_is_init, set_is_init)
96 """ Get the pupil in the biggest support
98 :return: (np.ndarray[ndim=2, dtype=np.float32]) : pupil
103 """ Set the pupil in the biggest support
105 :param s: (np.ndarray[ndim=2, dtype=np.float32]) : pupil
107 self.
__ipupil = csu.enforce_arrayMultiDim(s.copy(), s.shape, dtype=np.float32)
109 _ipupil = property(get_ipupil, set_ipupil)
112 """ Get the pupil in the middle support
114 :return: (np.ndarray[ndim=2, dtype=np.float32]) : pupil
119 """ Set the pupil in the middle support
121 :param s: (np.ndarray[ndim=2, dtype=np.float32]) : pupil
123 self.
__mpupil = csu.enforce_arrayMultiDim(s.copy(), s.shape, dtype=np.float32)
125 _mpupil = property(get_mpupil, set_mpupil)
128 """ Get the pupil in the smallest support
130 :return: (np.ndarray[ndim=2, dtype=np.float32]) : pupil
135 """ Set the pupil in the smallest support
137 :param s: (np.ndarray[ndim=2, dtype=np.float32]) : pupil
139 self.
__spupil = csu.enforce_arrayMultiDim(s.copy(), s.shape, dtype=np.float32)
141 _spupil = property(get_spupil, set_spupil)
144 """ Get the phase aberration of the M1 defined in spupil support
146 :return: (np.ndarray[ndim=2, dtype=np.float32]) : phase aberrations
151 """ Set the phase aberration of the M1 defined in spupil support
153 :param s: (np.ndarray[ndim=2, dtype=np.float32]) : phase aberrations
158 _phase_ab_M1 = property(get_phase_ab_M1, set_phase_ab_M1)
161 """ Get the phase aberration of the M1 defined in mpupil support
163 :return: (np.ndarray[ndim=2, dtype=np.float32]) : phase aberrations
168 """ Set the phase aberration of the M1 defined in mpupil support
170 :param s: (np.ndarray[ndim=2, dtype=np.float32]) : phase aberrations
175 _phase_ab_M1_m = property(get_phase_ab_M1_m, set_phase_ab_M1_m)
178 """ Get the apodizer defined in spupil support
180 :return: (np.ndarray[ndim=2, dtype=np.float32]) : apodizer
185 """ Set the apodizer defined in spupil support
187 :param s: (np.ndarray[ndim=2, dtype=np.float32]) : apodizer
192 _apodizer = property(get_apodizer, set_apodizer)
195 """ Get linear size of full image
197 :return: (long) : linear size of full image (in pixels).
202 """ Set linear size of full image
204 :param s: (long) : linear size of full image (in pixels).
206 self.
__ssize = csu.enforce_int(s)
208 ssize = property(get_ssize, set_ssize)
211 """ Get the linear size of mpupil
213 :return: (long) : coordinate (same in x and y) [pixel]
218 """ Set the linear size of mpupil
220 :param s: (long) : coordinate (same in x and y) [pixel]
222 self.
__n = csu.enforce_int(s)
224 _n = property(get_n, set_n)
227 """ Get the bottom-left corner coordinates of the pupil in the ipupil support
229 :return: (long) : coordinate (same in x and y) [pixel]
234 """ Set the bottom-left corner coordinates of the pupil in the ipupil support
236 :param s: (long) : coordinate (same in x and y) [pixel]
238 self.
__n1 = csu.enforce_int(s)
240 _n1 = property(get_n1, set_n1)
243 """ Get the upper-right corner coordinates of the pupil in the ipupil support
245 :return: (long) : coordinate (same in x and y) [pixel]
250 """ Set the upper-right corner coordinates of the pupil in the ipupil support
252 :param s: (long) : coordinate (same in x and y) [pixel]
254 self.
__n2 = csu.enforce_int(s)
256 _n2 = property(get_n2, set_n2)
259 """ Get the upper-right corner coordinates of the pupil in the mpupil support
261 :return: (long) : coordinate (same in x and y) [pixel]
266 """ Set the upper-right corner coordinates of the pupil in the mpupil support
268 :param s: (long) : coordinate (same in x and y) [pixel]
272 _p2 = property(get_p2, set_p2)
275 """ Get the bottom-left corner coordinates of the pupil in the mpupil support
277 :return: (long) : coordinate (same in x and y) [pixel]
282 """ Set the bottom-left corner coordinates of the pupil in the mpupil support
284 :param s: (long) : coordinate (same in x and y) [pixel]
286 self.
__p1 = csu.enforce_int(s)
288 _p1 = property(get_p1, set_p1)
291 """ Get observations zenith angle
293 :return: (float) : observations zenith angle (in deg).
298 """ Set observations zenith angle
300 :param z: (float) : observations zenith angle (in deg).
304 zenithangle = property(get_zenithangle, set_zenithangle)
307 """ Get the linear size of total pupil
309 :return: (long) : linear size of total pupil (in pixels).
314 """ Set the linear size of total pupil
316 :param p: (long) : linear size of total pupil (in pixels).
320 pupdiam = property(get_pupdiam, set_pupdiam)
323 """ Get the central point of the simulation
325 :return: (float) : central point of the simulation.
330 """ Set the central point of the simulation
332 :param c: (float) : central point of the simulation.
336 cent = property(get_cent, set_cent)
339 """ Gells if the apodizer is used
340 The apodizer is used if a is not 0
342 :return: (int) boolean for apodizer
347 """ Tells if the apodizer is used
348 The apodizer is used if a is not 0
350 :param a: (int) boolean for apodizer
352 self.
__apod = csu.enforce_or_cast_bool(a)
354 apod = property(get_apod, set_apod)
357 """ Get the path of apodizer file
359 :return: (str) : apodizer file name
364 """ Set the path of apodizer file
366 :param filename: (str) : apodizer file name
370 apod_file = property(get_apod_file, set_apod_file)
373 """ Get the pixsizeral point of the simulation
375 :return: (float) : pixsizeral point of the simulation.
380 """ Set the pixel size of the simulation
382 :param c: (float) : pixel size of the simulation.
386 _pixsize = property(get_pixsize, set_pixsize)