39 from .
import config_setter_utils
as csu
51 """ type of wfs : "sh" or "pyr"."""
53 """ linear number of subaps."""
55 """ number of pixels per subap."""
57 """ pixel size (in arcsec) for a subap."""
59 """ observation wavelength (in um) for a subap."""
61 """ wfs global throughput."""
63 """ minimal illumination fraction for valid subaps."""
65 """ 1 if in "open-loop" mode (i.e. does not see dm)."""
67 """ size of field stop in arcsec."""
69 """ Fields of the wfs diaphragm shape : "square" or "none" """
72 """ 1 if the WFS sees the atmosphere layers"""
74 """ index of dms seen by the WFS"""
76 """ If True, enable error budget analysis for the simulation"""
78 """If True, WFS is considered as a low order one and so will not profit from array mutualisation"""
81 """ guide star x position on sky (in arcsec)."""
83 """ guide star x position on sky (in arcsec)."""
85 """ altitude of guide star (in m) 0 if ngs."""
87 """ magnitude of guide star."""
89 """ detector zero point expressed in ph/m**2/s in the bandwidth of the WFS"""
91 """ desired noise : < 0 = no noise / 0 = photon only / > 0 photon + ron."""
98 """ return per watt factor (high season : 10 ph/cm2/s/W)."""
100 """ laser power in W."""
102 """ x position (in meters) of llt."""
104 """ y position (in meters) of llt."""
106 """ type of sodium profile "gauss", "exp", etc ..."""
108 """ laser beam fwhm on-sky (in arcsec)."""
113 """ Magnifying factor"""
115 """ WFS rotation angle in the pupil"""
117 """ X axis misalignment in pixels"""
119 """ Y axis misalignment in pixels"""
123 """ uint16 computation flag for WFS image """
125 """ Maximum number of photons allowed before pixel computation (only used if fakecam is True) """
127 """ Maximum number of ADU photons allowed in the uint16 image (only used if fakecam is True) """
130 """ pupil diam for a subap (in pixel)"""
132 """ array size for fft for a subap (in pixel)"""
134 """ total size of hr image for a subap (in pixel)"""
136 """ rebin factor from hr to binned image for a subap"""
138 """ number of valid subaps"""
141 """ number of photons per subap"""
143 """ number of photons per subap used for doing imat"""
145 """ subap diameter (m)"""
147 """ fraction of nphotons per subap"""
149 """ quantum pixel size for the simulation"""
152 """ (int*) x start indexes for cutting phase screens"""
154 """ (int*) y start indexes for cutting phase screens"""
157 """ (int*) X-indices of bottom left pixel of each valid subaps [pixels]"""
159 """ (int*) Y-indices of bottom left pixel of each valid subaps [pixels]"""
161 """ (int*) array of 0/1 for valid subaps"""
163 """ (int*) array of pixels transform from phase screen into subaps phase screens"""
165 """ (float*) matrices to project subap phase to geometric slope (considering valid pup)"""
167 """ (int*) array of pixels transform from minimal FoV image to (in case type is sh or geo)"""
169 """ (float*) array of pixels transform from minimal FoV image to (in case type is "pyr" or "roof")"""
172 """ (int*) array of pixels transform from full FoV hr images to binned images"""
174 """ (float*) phase offset for 1/2 pixel shift in (x,y)"""
177 """ (float*) fieldstop for each subap"""
180 """ lgs kernels for each subap"""
182 """ sodium profile"""
184 """ corresponding altitude"""
188 """ hr profile cumulated"""
190 """ 1d beam function"""
192 """ 1d beam function fft"""
194 """ angles of rotation for each spot"""
198 """ pyramid wfs modulation amplitude radius [arcsec]."""
200 """ total number of point along modulation circle [unitless]."""
202 """ positions for modulation, overwrites ampl and npts [arcsec]"""
204 """ Location of modulation, before/after the field stop.
205 valid value are "before" or "after" (default "after")."""
207 """ Type of pyramid, either 0 for "Pyramid" or 1 for "RoofPrism"."""
209 """ Number of Pyramid facets """
211 """ Pyramid pupil separation. (default: long(wfs.nxsub))"""
213 """ Pyramid quadrant misalignments: by how much pupil subimages
214 are off from their expected positions (in rebinned pixels)"""
216 """ Compute the pyramid focalplane image """
223 """ Modulation points ponderation weights"""
227 """ Get the type of wfs
229 :return: (str) : type of wfs ("sh" or "pyr")
234 """ Set the type of wfs
236 :param t: (str) : type of wfs ("sh" or "pyr")
238 self.
__type__type = typewfs
240 type = property(get_type, set_type)
243 """ Get the linear number of subaps
245 :return: (long) : linear number of subaps
250 """ Set the linear number of subaps
252 :param n: (long) : linear number of subaps
254 self.
__nxsub__nxsub = csu.enforce_int(n)
256 nxsub = property(get_nxsub, set_nxsub)
259 """ Get the number of pupil images
261 :return: (long) : number of pupil images
266 """ Set the number of pupil images
268 :param n: (long) : number of pupil images
270 self.
__nPupils__nPupils = csu.enforce_int(n)
272 nPupils = property(get_nPupils, set_nPupils)
275 """ Get the number of pixels per subap
277 :return: (long) : number of pixels per subap
282 """ Set the number of pixels per subap
284 :param n: (long) : number of pixels per subap
286 self.
__npix__npix = csu.enforce_int(n)
288 npix = property(get_npix, set_npix)
291 """ Get the pixel size
293 :return: (float) : pixel size (in arcsec) for a subap
298 """ Set the pixel size
300 :param p: (float) : pixel size (in arcsec) for a subap
302 self.
__pixsize__pixsize = csu.enforce_float(p)
304 pixsize = property(get_pixsize, set_pixsize)
307 """ Get the pixel size
309 :return: (float) : pixel size (in arcsec) for a subap
314 """ Set the pixel size
316 :param p: (float) : pixel size (in arcsec) for a subap
320 _pyr_scale_pos = property(get_pyr_scale_pos, set_pyr_scale_pos)
323 """ Get the observation wavelength
325 :return: (float) : observation wavelength (in um) for a subap
330 """ Set the observation wavelength
332 :param L: (float) : observation wavelength (in um) for a subap
336 Lambda = property(get_Lambda, set_Lambda)
339 """ Get the wfs global throughput
341 :return: (float) : wfs global throughput
346 """ Set the wfs global throughput
348 :param o: (float) : wfs global throughput
352 optthroughput = property(get_optthroughput, set_optthroughput)
355 """ Get the minimal illumination fraction for valid subaps
357 :return: (float) : minimal illumination fraction for valid subaps
362 """ Set the minimal illumination fraction for valid subaps
364 :param f: (float) : minimal illumination fraction for valid subaps
366 self.
__fracsub__fracsub = csu.enforce_float(f)
368 fracsub = property(get_fracsub, set_fracsub)
371 """ Get the loop state (open or closed)
373 :return: (long) : 1 if in "open-loop" mode (i.e. does not see dm)
378 """ Set the loop state (open or closed)
380 :param o: (long) : 1 if in "open-loop" mode (i.e. does not see dm)
382 self.
__open_loop__open_loop = csu.enforce_or_cast_bool(o)
384 open_loop = property(get_open_loop, set_open_loop)
387 """ Get the size of field stop
389 :return: (float) : size of field stop in arcsec
394 """ Set the size of field stop
396 :param f: (float) : size of field stop in arcsec
398 self.
__fssize__fssize = csu.enforce_float(f)
400 fssize = property(get_fssize, set_fssize)
403 """ Get the size of field stop
405 :return: (str) : size of field stop in arcsec
410 """ Set the size of field stop
412 :param f: (str) : size of field stop in arcsec
414 self.
__fstop__fstop = scons.check_enum(scons.FieldStopType, f)
416 fstop = property(get_fstop, set_fstop)
419 """ Gells if the wfs sees the atmosphere layers
421 :return: (bool) :True if the WFS sees the atmosphere layers
426 """ Tells if the wfs sees the atmosphere layers
428 :param i: (bool) :True if the WFS sees the atmosphere layers
430 self.
__atmos_seen__atmos_seen = csu.enforce_or_cast_bool(i)
432 atmos_seen = property(get_atmos_seen, set_atmos_seen)
435 """ Get the guide star x position on sky
437 :return: (float) : guide star x position on sky (in arcsec)
442 """ Set the guide star x position on sky
444 :param x: (float) : guide star x position on sky (in arcsec)
446 self.
__xpos__xpos = csu.enforce_float(x)
448 xpos = property(get_xpos, set_xpos)
451 """ Get the guide star y position on sky
453 :return: (float) : guide star y position on sky (in arcsec)
458 """ Set the guide star y position on sky
460 :param y: (float) : guide star y position on sky (in arcsec)
462 self.
__ypos__ypos = csu.enforce_float(y)
464 ypos = property(get_ypos, set_ypos)
467 """ Get the magnifying factor
469 :return: (float) : magnifying factor
474 """ Set the magnifying factor
476 :param G: (float) : magnifying factor
478 self.
__G__G = csu.enforce_float(G)
480 G = property(get_G, set_G)
483 """ Get the rotation angle in the pupil
485 :return: (float) : rotation angle (rad)
490 """ Set the rotation angle in the pupil
492 :param thetaML: (float) : rotation angle (rad)
494 self.
__thetaML__thetaML = csu.enforce_float(thetaML)
496 thetaML = property(get_thetaML, set_thetaML)
499 """ Get the X axis misalignment
501 :return: (float) : dx (pix)
506 """ Set the X axis misalignment
508 :param dx: (float) : dx (pix)
510 self.
__dx__dx = csu.enforce_float(dx)
512 dx = property(get_dx, set_dx)
515 """ Get the Y axis misalignment
517 :return: (float) : dy (pix)
522 """ Set the Y axis misalignment
524 :param dy: (float) : dy (pix)
526 self.
__dy__dy = csu.enforce_float(dy)
528 dy = property(get_dy, set_dy)
531 """ Get the fakecam flag
533 :return: (bool) : fakecam flag
538 """ Set the fakecam flag
540 :return: (bool) : fakecam flag
542 self.
__fakecam__fakecam = csu.enforce_or_cast_bool(fakecam)
544 fakecam = property(get_fakecam, set_fakecam)
547 """ Get the max_flux_per_pix
549 :return: (int) : max_flux_per_pix
554 """ Set the max_flux_per_pix
556 :return: (int) : max_flux_per_pix
560 max_flux_per_pix = property(get_maxFluxPerPix, set_max_flux_per_pix)
563 """ Get the max_pix_value
565 :return: (int) : max_pix_value
570 """ Set the max_pix_value
572 :return: (int) : max_pix_value
576 max_pix_value = property(get_max_pix_value, set_max_pix_value)
579 """ Get the altitude of guide star
581 :return: (float) : altitude of guide star (in m) 0 if ngs
586 """ Set the altitude of guide star
588 :param g: (float) : altitude of guide star (in m) 0 if ngs
590 self.
__gsalt__gsalt = csu.enforce_float(g)
592 gsalt = property(get_gsalt, set_gsalt)
595 """ Get the magnitude of guide star
597 :return: (float) : magnitude of guide star
602 """ Set the magnitude of guide star
604 :param g: (float) : magnitude of guide star
606 self.
__gsmag__gsmag = csu.enforce_float(g)
608 gsmag = property(get_gsmag, set_gsmag)
611 """ Get the detector zero point
613 :return: (float) : detector zero point
618 """ Set the detector zero point
620 :param z: (float) : detector zero point
622 self.
__zerop__zerop = csu.enforce_float(z)
624 zerop = property(get_zerop, set_zerop)
627 """ Get the desired noise
629 :return: (float) : desired noise : < 0 = no noise / 0 = photon only / > 0 photon + ron
634 """ Set the desired noise
636 :param n: (float) : desired noise : < 0 = no noise / 0 = photon only / > 0 photon + ron
638 self.
__noise__noise = csu.enforce_float(n)
640 noise = property(get_noise, set_noise)
643 """ Get the desired numner of photons used for doing imat
645 :return: (float) : desired number of photons
650 """ Set the desired numner of photons used for doing imat
652 :param nphot: (float) : desired number of photons
656 nphotons4imat = property(get_nphotons4imat, set_nphotons4imat)
659 """ Get the attribute kernel
666 """ Set the attribute kernel
670 self.
__kernel__kernel = csu.enforce_float(k)
672 kernel = property(get_kernel, set_kernel)
675 """ Get the laser power
677 :return: (float) : laser power in W
682 """ Set the laser power
684 :param l: (float) : laser power in W
688 laserpower = property(get_laserpower, set_laserpower)
691 """ Get the x position of llt
693 :return: (float) : x position (in meters) of llt
698 """ Set the x position of llt
700 :param l: (float) : x position (in meters) of llt
702 self.
__lltx__lltx = csu.enforce_float(l)
704 lltx = property(get_lltx, set_lltx)
707 """ Get the y position of llt
709 :return: (float) : y position (in meters) of llt
714 """ Set the y position of llt
716 :param l: (float) : y position (in meters) of llt
718 self.
__llty__llty = csu.enforce_float(l)
720 llty = property(get_llty, set_llty)
723 """ Get the type of sodium profile
725 :return: (str) : type of sodium profile "gauss", "exp", etc ...
730 """ Set the type of sodium profile
732 :param p: (str) : type of sodium profile "gauss", "exp", etc ...
734 self.
__proftype__proftype = scons.check_enum(scons.ProfType, p)
736 proftype = property(get_proftype, set_proftype)
739 """ Get the laser beam fwhm on-sky
741 :return: (float) : laser beam fwhm on-sky (in arcsec)
746 """ Set the laser beam fwhm on-sky
748 :param b: (float) : laser beam fwhm on-sky (in arcsec)
750 self.
__beamsize__beamsize = csu.enforce_float(b)
752 beamsize = property(get_beamsize, set_beamsize)
755 """ Get the pyramid wfs modulation amplitude radius
757 :return: (float) : pyramid wfs modulation amplitude radius (in arsec)
762 """ Set the pyramid wfs modulation amplitude radius
764 :param p: (float) : pyramid wfs modulation amplitude radius (in arsec)
766 self.
__pyr_ampl__pyr_ampl = csu.enforce_float(p)
768 pyr_ampl = property(get_pyr_ampl, set_pyr_ampl)
771 """ Get the total number of point along modulation circle
773 :return: (long) : total number of point along modulation circle
778 """ Set the total number of point along modulation circle
780 :param p: (long) : total number of point along modulation circle
782 self.
__pyr_npts__pyr_npts = csu.enforce_int(p)
784 pyr_npts = property(get_pyr_npts, set_pyr_npts)
787 """ Get the location of modulation
789 :return: (str) : location of modulation, before/after the field stop.
790 valid value are "before" or "after" (default "after")
795 """ Set the location of modulation
797 :param p: (str) : location of modulation, before/after the field stop.
798 valid value are "before" or "after" (default "after")
800 self.
__pyr_loc__pyr_loc = bytes(p.encode(
'UTF-8'))
802 pyr_loc = property(get_pyr_loc, set_pyr_loc)
805 """ Get the type of pyramid,
807 :return: (str) : type of pyramid, either 0 for "Pyramid" or 1 for "RoofPrism"
812 """ Set the type of pyramid,
814 :param p: (str) : type of pyramid, either 0 for "Pyramid" or 1 for "RoofPrism"
816 self.
__pyrtype__pyrtype = bytes(p.encode(
'UTF-8'))
818 pyrtype = property(get_pyrtype, set_pyrtype)
821 """ Get the x position of modulation points for pyramid sensor
823 :return: (np.ndarray[ndim=1,dtype=np.floatt32_t) : x positions
828 """ Set the x position of modulation points for pyramid sensor
830 :param cx: (np.ndarray[ndim=1,dtype=np.floatt32_t) : x positions
832 self.
__pyr_cx__pyr_cx = csu.enforce_array(cx.copy(), self.
__pyr_npts__pyr_npts, dtype=np.float32)
834 _pyr_cx = property(get_pyr_cx, set_pyr_cx)
837 """ Get the y position of modulation points for pyramid sensor
839 :return: (np.ndarray[ndim=1,dtype=np.floatt32_t) : y positions
844 """ Set the y position of modulation points for pyramid sensor
846 :param cy: (np.ndarray[ndim=1,dtype=np.floatt32_t) : y positions
848 self.
__pyr_cy__pyr_cy = csu.enforce_array(cy.copy(), self.
__pyr_npts__pyr_npts, dtype=np.float32)
850 _pyr_cy = property(get_pyr_cy, set_pyr_cy)
853 """ Get the index of dms seen by the WFS
855 :return: (np.ndarray[ndim=1,dtype=np.int32_t) : index of dms seen by the WFS
860 """ Set the index of dms seen by the WFS
862 :param dms_seen: (np.ndarray[ndim=1,dtype=np.int32_t) : index of dms seen by the WFS
864 self.
__dms_seen__dms_seen = csu.enforce_array(dms_seen.copy(), dms_seen.size,
867 dms_seen = property(get_dms_seen, set_dms_seen)
870 """ Get the return per watt factor
872 :return: (float) : return per watt factor (high season : 10 ph/cm2/s/W)
877 """ Set the return per watt factor
879 :param lpw: (float) : return per watt factor (high season : 10 ph/cm2/s/W)
883 lgsreturnperwatt = property(get_lgsreturnperwatt, set_lgsreturnperwatt)
886 """ Get the corresponding altitude
888 :return: (np.ndarray[ndim=1,dtype=np.float32]) : corresponding altitude
893 """ Set the corresponding altitude
895 :param a: (np.ndarray[ndim=1,dtype=np.float32]) : corresponding altitude
897 self.
__altna__altna = csu.enforce_array(a.copy(), a.size, dtype=np.float32)
899 _altna = property(get_altna, set_altna)
902 """ Get the sodium profile
904 :return: (np.ndarray[ndim=1,dtype=np.float32]) : sodium profile
909 """ Set the sodium profile
911 :param p: (np.ndarray[ndim=1,dtype=np.float32]) : sodium profile
913 self.
__profna__profna = csu.enforce_array(p.copy(), p.size, dtype=np.float32)
915 _profna = property(get_profna, set_profna)
918 """ Get the error budget flag : if True, enable error budget analysis
921 :return: (bool) : error budget flag
926 """ Set the error budget flag : if True, enable error budget analysis
929 :param roket: (bool) : error budget flag
931 self.
__roket__roket = csu.enforce_or_cast_bool(roket)
933 roket = property(get_roket, set_roket)
936 """ Get the low order flag : if True, WFS arrays will not be mutualised
938 :return: (bool) : low order flag
943 """ Set the low order flag : if True, WFS arrays will not be mutualised
945 :param is_low_order: (bool) : low order flag
947 self.
__is_low_order__is_low_order = csu.enforce_or_cast_bool(is_low_order)
949 is_low_order = property(get_is_low_order, set_is_low_order)
952 """ Get the pyramid pupil separation. (default: long(wfs.nxsub))
954 :return: (long) : pyramid pupil separation wanted
959 """ Set the pyramid pupil separation. (default: long(wfs.nxsub))
961 :param pyr_pup_sep: (long) : pyramid pupil separation wanted
963 self.
__pyr_pup_sep__pyr_pup_sep = csu.enforce_int(pyr_pup_sep)
965 pyr_pup_sep = property(get_pyr_pup_sep, set_pyr_pup_sep)
973 self.
__pyr_misalignments__pyr_misalignments = csu.enforce_arrayMultiDim(misalignments.copy(),
977 pyr_misalignments = property(get_pyr_misalignments, set_pyr_misalignments)
980 """ Get the status of the pyramid wfs focal plane computation
985 """ Set the status of the pyramid wfs focal plane computation
989 pyr_compute_focalplane = property(get_pyr_compute_focalplane,
990 set_pyr_compute_focalplane)
993 """ Get the number of valid subapertures
995 :return: (long) : number of valid subapertures
1000 """ Set the number of valid subapertures
1002 :param n: (long) : number of valid subapertures
1006 _nvalid = property(get_nvalid, set_nvalid)
1009 """ Get the valid subapertures along X-axis
1011 :return: (np.array(dim=1, dtype=np.int32)) : validsubsx
1016 """ Set the valid subapertures along X-axis
1018 :param vx: (np.array(dim=1, dtype=np.int32)) : validsubsx
1020 if self.
__type__type == scons.WFSType.PYRHR
or self.
__type__type == scons.WFSType.PYRLR:
1021 self.
__validsubsx__validsubsx = csu.enforce_array(vx, vx.size, dtype=np.int32)
1025 _validsubsx = property(get_validsubsx, set_validsubsx)
1028 """ Get the valid subapertures along Y-axis
1030 :return: (np.array(dim=1, dtype=np.int32)) : validsubsy
1035 """ Set the valid subapertures along Y-axis
1037 :param vy: (np.array(dim=1, dtype=np.int32)) : validsubsy
1039 if self.
__type__type == scons.WFSType.PYRHR
or self.
__type__type == scons.WFSType.PYRLR:
1040 self.
__validsubsy__validsubsy = csu.enforce_array(vy, vy.size, dtype=np.int32)
1044 _validsubsy = property(get_validsubsy, set_validsubsy)
1047 """ Return both validsubsx and validsubsy
1049 :return: (tuple) : (self._validsubsx, self._validsubsy)
1054 """ Get the size of FFT support for a subap
1056 :return: (long) : size of FFT support
1061 """ Set the size of FFT support for a subap
1063 :param n: (long) : size of FFT support
1065 self.
__Nfft__Nfft = csu.enforce_int(n)
1067 _Nfft = property(get_Nfft, set_Nfft)
1070 """ Get the size of hr image for a subap
1072 :return: (long) : size of hr image for a subap
1077 """ Set the size of hr image for a subap
1079 :param n: (long) : size of hr image for a subap
1083 _Ntot = property(get_Ntot, set_Ntot)
1086 """ Get the rebin factor from hr to binned image for a subap
1088 :return: (long) : rebin factor
1093 """ Set the rebin factor from hr to binned image for a subap
1095 :param n: (long) : rebin factor
1097 self.
__nrebin__nrebin = csu.enforce_int(n)
1099 _nrebin = property(get_nrebin, set_nrebin)
1102 """ Get the subap diameter in pixels
1104 :return: (long) : subap diam in pixels
1109 """ Set the subap diameter in pixels
1111 :param n: (long) : subap diam in pixels
1113 self.
__pdiam__pdiam = csu.enforce_int(n)
1115 _pdiam = property(get_pdiam, set_pdiam)
1118 """ Get number of photons per subap
1120 :return: (float) : number of photons per subap
1125 """ Set number of photons per subap
1127 :param n: (float) : number of photons per subap
1129 self.
__nphotons__nphotons = csu.enforce_float(n)
1131 _nphotons = property(get_nphotons, set_nphotons)
1134 """ Get the quantum pixel size for the simulation
1136 :return: (float) : quantum pixel size
1141 """ Set the quantum pixel size for the simulation
1143 :param n: (float) : quantum pixel size
1147 _qpixsize = property(get_qpixsize, set_qpixsize)
1150 """ Get the subap diameter (m)
1152 :return: (float) : subap diameter (m)
1157 """ Set the subap diameter (m)
1159 :param n: (float) : subap diameter (m)
1161 self.
__subapd__subapd = csu.enforce_float(n)
1163 _subapd = property(get_subapd, set_subapd)
1166 """ Get the subap diameter (m)
1168 :return: (np.array(ndim=2, dtype=np.float32)) : subap diameter (m)
1173 """ Set the subap diameter (m)
1175 :param data: (np.array(ndim=2, dtype=np.float32)) : subap diameter (m)
1177 if self.
__type__type == scons.WFSType.PYRHR
or self.
__type__type == scons.WFSType.PYRLR:
1178 self.
__fluxPerSub__fluxPerSub = csu.enforce_arrayMultiDim(
1179 data.copy(), (self.
__nxsub__nxsub + 2, self.
__nxsub__nxsub + 2), dtype=np.float32)
1181 self.
__fluxPerSub__fluxPerSub = csu.enforce_arrayMultiDim(data.copy(),
1185 _fluxPerSub = property(get_fluxPerSub, set_fluxPerSub)
1188 """ TODO : docstring
1193 """ TODO : docstring
1195 self.
__ftkernel__ftkernel = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1198 _ftkernel = property(get_ftkernel, set_ftkernel)
1201 """ TODO : docstring
1206 """ TODO : docstring
1208 self.
__sincar__sincar = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1211 _sincar = property(get_sincar, set_sincar)
1214 """ TODO : docstring
1219 """ TODO : docstring
1221 self.
__halfxy__halfxy = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1224 _halfxy = property(get_halfxy, set_halfxy)
1227 """ TODO : docstring
1232 """ TODO : docstring
1234 self.
__submask__submask = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1237 _submask = property(get_submask, set_submask)
1240 """ TODO : docstring
1245 """ TODO : docstring
1247 self.
__lgskern__lgskern = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1250 _lgskern = property(get_lgskern, set_lgskern)
1253 """ TODO : docstring
1258 """ TODO : docstring
1260 self.
__azimuth__azimuth = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1263 _azimuth = property(get_azimuth, set_azimuth)
1266 """ TODO : docstring
1271 """ TODO : docstring
1273 self.
__prof1d__prof1d = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1276 _prof1d = property(get_prof1d, set_prof1d)
1279 """ TODO : docstring
1284 """ TODO : docstring
1286 self.
__profcum__profcum = csu.enforce_array(data.copy(), data.size, dtype=np.float32)
1288 _profcum = property(get_profcum, set_profcum)
1291 """ TODO : docstring
1296 """ TODO : docstring
1298 self.
__beam__beam = csu.enforce_array(data.copy(), data.size, dtype=np.float32)
1300 _beam = property(get_beam, set_beam)
1303 """ TODO : docstring
1308 """ TODO : docstring
1310 self.
__ftbeam__ftbeam = csu.enforce_array(data.copy(), data.size, dtype=np.complex64)
1312 _ftbeam = property(get_ftbeam, set_ftbeam)
1315 """ TODO : docstring
1320 """ TODO : docstring
1322 self.
__hrmap__hrmap = csu.enforce_arrayMultiDim(data.copy(), data.shape, dtype=np.int32)
1324 _hrmap = property(get_hrmap, set_hrmap)
1327 """ TODO : docstring
1332 """ TODO : docstring
1334 self.
__binmap__binmap = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1337 _binmap = property(get_binmap, set_binmap)
1340 """ TODO : docstring
1345 """ TODO : docstring
1347 self.
__phasemap__phasemap = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1350 _phasemap = property(get_phasemap, set_phasemap)
1353 """ Get the TT subaperture projection matrices for this WFS
1355 :return: (np.ndarray) : TT projection matrices (2,NPHASE,NSUB)
1360 """ Set the TT subaperture projection matrices for this WFS
1362 :param data: (np.ndarray) : TT projection matrices (2,NPHASE,NSUB)
1364 self.
__ttprojmat__ttprojmat = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1367 _ttprojmat = property(get_ttprojmat, set_ttprojmat)
1370 """ TODO : docstring
1375 """ TODO : docstring
1377 self.
__validpuppixx__validpuppixx = csu.enforce_array(data.copy(), data.size, dtype=np.int32)
1379 _validpuppixx = property(get_validpuppixx, set_validpuppixx)
1382 """ TODO : docstring
1387 """ TODO : docstring
1389 self.
__validpuppixy__validpuppixy = csu.enforce_array(data.copy(), data.size, dtype=np.int32)
1391 _validpuppixy = property(get_validpuppixy, set_validpuppixy)
1394 """ Get the valid subapertures array
1396 :return: (int*) array of 0/1 for valid subaps
1401 """ Set the valid subapertures array
1403 :param data: (int*) array of 0/1 for valid subaps
1405 self.
__isvalid__isvalid = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1408 _isvalid = property(get_isvalid, set_isvalid)
1411 """ TODO : docstring
1416 """ TODO : docstring
1418 self.
__pyr_pos__pyr_pos = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1421 pyr_pos = property(get_pyr_pos, set_pyr_pos)
1424 """ TODO : docstring
1429 """ TODO : docstring
1431 self.
__pyr_weights__pyr_weights = csu.enforce_array(data.copy(), data.size, dtype=np.float32)
1433 _pyr_weights = property(get_pyr_weights, set_pyr_weights)
P-Class (parametres) Param_wfs.
def set_proftype(self, p)
Set the type of sodium profile.
def set_nvalid(self, n)
Set the number of valid subapertures.
def get_pyrtype(self)
Get the type of pyramid,.
None get_pyr_misalignments(self)
def set_Nfft(self, n)
Set the size of FFT support for a subap.
def set_ttprojmat(self, data)
Set the TT subaperture projection matrices for this WFS.
def get_zerop(self)
Get the detector zero point.
def set_max_flux_per_pix(self, max_flux_per_pix)
Set the max_flux_per_pix.
def get_qpixsize(self)
Get the quantum pixel size for the simulation.
def set_nphotons4imat(self, nphot)
Set the desired numner of photons used for doing imat.
def get_fakecam(self)
Get the fakecam flag.
def get_G(self)
Get the magnifying factor.
def get_nxsub(self)
Get the linear number of subaps.
def set_gsalt(self, g)
Set the altitude of guide star.
def set_beam(self, data)
TODO docstring.
def set_pyr_compute_focalplane(self, compute_focalplane)
Set the status of the pyramid wfs focal plane computation.
def set_zerop(self, z)
Set the detector zero point.
def get_Lambda(self)
Get the observation wavelength.
def get_isvalid(self)
Get the valid subapertures array.
def set_fracsub(self, f)
Set the minimal illumination fraction for valid subaps.
def get_fracsub(self)
Get the minimal illumination fraction for valid subaps.
def set_lgsreturnperwatt(self, lpw)
Set the return per watt factor.
def get_fstop(self)
Get the size of field stop.
def set_phasemap(self, data)
TODO docstring.
def set_pixsize(self, p)
Set the pixel size.
def set_pyr_scale_pos(self, p)
Set the pixel size.
def get_gsalt(self)
Get the altitude of guide star.
def get_profcum(self)
TODO docstring.
def get_max_pix_value(self)
Get the max_pix_value.
def get_kernel(self)
Get the attribute kernel.
def get_fluxPerSub(self)
Get the subap diameter (m)
def set_nphotons(self, n)
Set number of photons per subap.
def get_altna(self)
Get the corresponding altitude.
def get_gsmag(self)
Get the magnitude of guide star.
def get_nPupils(self)
Get the number of pupil images.
def set_npix(self, n)
Set the number of pixels per subap.
def get_nphotons(self)
Get number of photons per subap.
def get_subapd(self)
Get the subap diameter (m)
def get_pyr_cy(self)
Get the y position of modulation points for pyramid sensor.
def set_hrmap(self, data)
TODO docstring.
def get_nphotons4imat(self)
Get the desired numner of photons used for doing imat.
def get_validsub(self)
Return both validsubsx and validsubsy.
def set_lltx(self, l)
Set the x position of llt.
def set_G(self, G)
Set the magnifying factor.
def get_validpuppixy(self)
TODO docstring.
def get_pixsize(self)
Get the pixel size.
def get_ftbeam(self)
TODO docstring.
def get_ypos(self)
Get the guide star y position on sky.
def get_pyr_compute_focalplane(self)
Get the status of the pyramid wfs focal plane computation.
def set_altna(self, a)
Set the corresponding altitude.
def get_ttprojmat(self)
Get the TT subaperture projection matrices for this WFS.
def get_beamsize(self)
Get the laser beam fwhm on-sky.
def get_maxFluxPerPix(self)
Get the max_flux_per_pix.
def get_hrmap(self)
TODO docstring.
def get_dy(self)
Get the Y axis misalignment.
def set_fssize(self, f)
Set the size of field stop.
def get_profna(self)
Get the sodium profile.
def get_pyr_npts(self)
Get the total number of point along modulation circle.
def set_atmos_seen(self, i)
Tells if the wfs sees the atmosphere layers.
def set_Ntot(self, n)
Set the size of hr image for a subap.
def set_pyr_pos(self, data)
TODO docstring.
def set_thetaML(self, thetaML)
Set the rotation angle in the pupil.
def set_max_pix_value(self, max_pix_value)
Set the max_pix_value.
def set_fakecam(self, fakecam)
Set the fakecam flag.
def get_optthroughput(self)
Get the wfs global throughput.
def get_dms_seen(self)
Get the index of dms seen by the WFS.
def get_laserpower(self)
Get the laser power.
def get_lltx(self)
Get the x position of llt.
def get_beam(self)
TODO docstring.
def set_pyr_pup_sep(self, pyr_pup_sep)
Set the pyramid pupil separation.
def set_pyr_ampl(self, p)
Set the pyramid wfs modulation amplitude radius.
def get_pyr_ampl(self)
Get the pyramid wfs modulation amplitude radius.
def set_nPupils(self, n)
Set the number of pupil images.
def get_atmos_seen(self)
Gells if the wfs sees the atmosphere layers.
def set_llty(self, l)
Set the y position of llt.
def set_gsmag(self, g)
Set the magnitude of guide star.
def get_xpos(self)
Get the guide star x position on sky.
def get_llty(self)
Get the y position of llt.
def set_halfxy(self, data)
TODO docstring.
def get_noise(self)
Get the desired noise.
def set_pdiam(self, n)
Set the subap diameter in pixels.
def set_ftkernel(self, data)
TODO docstring.
def set_dy(self, dy)
Set the Y axis misalignment.
def get_proftype(self)
Get the type of sodium profile.
def get_azimuth(self)
TODO docstring.
def get_halfxy(self)
TODO docstring.
def set_pyr_loc(self, p)
Set the location of modulation.
def get_npix(self)
Get the number of pixels per subap.
def set_pyr_npts(self, p)
Set the total number of point along modulation circle.
def set_profna(self, p)
Set the sodium profile.
def set_is_low_order(self, is_low_order)
Set the low order flag : if True, WFS arrays will not be mutualised.
def set_azimuth(self, data)
TODO docstring.
def get_sincar(self)
TODO docstring.
None set_pyr_misalignments(self, np.ndarray misalignments)
def get_dx(self)
Get the X axis misalignment.
def set_pyr_weights(self, data)
TODO docstring.
def get_lgskern(self)
TODO docstring.
def set_pyrtype(self, p)
Set the type of pyramid,.
def set_sincar(self, data)
TODO docstring.
def set_open_loop(self, o)
Set the loop state (open or closed)
def get_thetaML(self)
Get the rotation angle in the pupil.
def set_type(self, typewfs)
Set the type of wfs.
def set_submask(self, data)
TODO docstring.
def set_ypos(self, y)
Set the guide star y position on sky.
def set_validpuppixx(self, data)
TODO docstring.
def get_validpuppixx(self)
TODO docstring.
def set_dms_seen(self, dms_seen)
Set the index of dms seen by the WFS.
def set_noise(self, n)
Set the desired noise.
def get_ftkernel(self)
TODO docstring.
def set_nrebin(self, n)
Set the rebin factor from hr to binned image for a subap.
def set_prof1d(self, data)
TODO docstring.
def get_pyr_scale_pos(self)
Get the pixel size.
def get_Nfft(self)
Get the size of FFT support for a subap.
def get_lgsreturnperwatt(self)
Get the return per watt factor.
def set_validsubsy(self, vy)
Set the valid subapertures along Y-axis.
def get_phasemap(self)
TODO docstring.
def get_pyr_pos(self)
TODO docstring.
def set_fluxPerSub(self, data)
Set the subap diameter (m)
def set_kernel(self, k)
Set the attribute kernel.
def set_optthroughput(self, o)
Set the wfs global throughput.
def get_pyr_weights(self)
TODO docstring.
def get_binmap(self)
TODO docstring.
def get_pdiam(self)
Get the subap diameter in pixels.
def set_xpos(self, x)
Set the guide star x position on sky.
def set_validsubsx(self, vx)
Set the valid subapertures along X-axis.
def set_pyr_cx(self, cx)
Set the x position of modulation points for pyramid sensor.
def get_nrebin(self)
Get the rebin factor from hr to binned image for a subap.
def get_open_loop(self)
Get the loop state (open or closed)
def set_beamsize(self, b)
Set the laser beam fwhm on-sky.
def get_pyr_loc(self)
Get the location of modulation.
def get_validsubsy(self)
Get the valid subapertures along Y-axis.
def get_prof1d(self)
TODO docstring.
def get_pyr_cx(self)
Get the x position of modulation points for pyramid sensor.
def get_pyr_pup_sep(self)
Get the pyramid pupil separation.
def get_submask(self)
TODO docstring.
def set_binmap(self, data)
TODO docstring.
def set_dx(self, dx)
Set the X axis misalignment.
def get_fssize(self)
Get the size of field stop.
def set_roket(self, roket)
Set the error budget flag : if True, enable error budget analysis for this simulation.
def get_is_low_order(self)
Get the low order flag : if True, WFS arrays will not be mutualised.
def set_lgskern(self, data)
TODO docstring.
def set_ftbeam(self, data)
TODO docstring.
def set_Lambda(self, L)
Set the observation wavelength.
def set_nxsub(self, n)
Set the linear number of subaps.
def get_validsubsx(self)
Get the valid subapertures along X-axis.
def set_qpixsize(self, n)
Set the quantum pixel size for the simulation.
def set_isvalid(self, data)
Set the valid subapertures array.
def set_validpuppixy(self, data)
TODO docstring.
def set_laserpower(self, l)
Set the laser power.
def get_nvalid(self)
Get the number of valid subapertures.
def get_roket(self)
Get the error budget flag : if True, enable error budget analysis for this simulation.
def __init__(self, roket=False)
def get_type(self)
Get the type of wfs.
def set_pyr_cy(self, cy)
Set the y position of modulation points for pyramid sensor.
def get_Ntot(self)
Get the size of hr image for a subap.
def set_fstop(self, f)
Set the size of field stop.
def set_profcum(self, data)
TODO docstring.
def set_subapd(self, n)
Set the subap diameter (m)
Numerical constants for shesha and config enumerations for safe-typing.