COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
PWFS.py
1 
37 
38 import numpy as np
39 from . import config_setter_utils as csu
40 import shesha.constants as scons
41 
42 
45 
46 
47 class Param_wfs:
48 
49  def __init__(self, roket=False):
50  self.__type__type = None
51  """ type of wfs : "sh" or "pyr"."""
52  self.__nxsub__nxsub = 0
53  """ linear number of subaps."""
54  self.__npix__npix = 0
55  """ number of pixels per subap."""
56  self.__pixsize__pixsize = 0
57  """ pixel size (in arcsec) for a subap."""
58  self.__Lambda__Lambda = 0
59  """ observation wavelength (in um) for a subap."""
60  self.__optthroughput__optthroughput = 0
61  """ wfs global throughput."""
62  self.__fracsub__fracsub = 0
63  """ minimal illumination fraction for valid subaps."""
64  self.__open_loop__open_loop = False
65  """ 1 if in "open-loop" mode (i.e. does not see dm)."""
66  self.__fssize__fssize = 0
67  """ size of field stop in arcsec."""
68  self.__fstop__fstop = None
69  """ Fields of the wfs diaphragm shape : "square" or "none" """
70 
71  self.__atmos_seen__atmos_seen = 0
72  """ 1 if the WFS sees the atmosphere layers"""
73  self.__dms_seen__dms_seen = None
74  """ index of dms seen by the WFS"""
75  self.__roket__roket = roket
76  """ If True, enable error budget analysis for the simulation"""
77  self.__is_low_order__is_low_order = False
78  """If True, WFS is considered as a low order one and so will not profit from array mutualisation"""
79  # target kwrd
80  self.__xpos__xpos = 0
81  """ guide star x position on sky (in arcsec)."""
82  self.__ypos__ypos = 0
83  """ guide star x position on sky (in arcsec)."""
84  self.__gsalt__gsalt = 0
85  """ altitude of guide star (in m) 0 if ngs."""
86  self.__gsmag__gsmag = 0
87  """ magnitude of guide star."""
88  self.__zerop__zerop = 0
89  """ detector zero point expressed in ph/m**2/s in the bandwidth of the WFS"""
90  self.__noise__noise = 0
91  """ desired noise : < 0 = no noise / 0 = photon only / > 0 photon + ron."""
92 
93  self.__kernel__kernel = 0 #
94  self.__ftkernel__ftkernel = None # (float*)
95 
96  # lgs only
97  self.__lgsreturnperwatt__lgsreturnperwatt = 0
98  """ return per watt factor (high season : 10 ph/cm2/s/W)."""
99  self.__laserpower__laserpower = 0
100  """ laser power in W."""
101  self.__lltx__lltx = 0
102  """ x position (in meters) of llt."""
103  self.__llty__llty = 0
104  """ y position (in meters) of llt."""
105  self.__proftype__proftype = None
106  """ type of sodium profile "gauss", "exp", etc ..."""
107  self.__beamsize__beamsize = None
108  """ laser beam fwhm on-sky (in arcsec)."""
109 
110  # misalignment
111 
112  self.__G__G = 1.0
113  """ Magnifying factor"""
114  self.__thetaML__thetaML = 0.0
115  """ WFS rotation angle in the pupil"""
116  self.__dx__dx = 0.0
117  """ X axis misalignment in pixels"""
118  self.__dy__dy = 0.0
119  """ Y axis misalignment in pixels"""
120 
121  # Fakecam mode (uint16)
122  self.__fakecam__fakecam = False
123  """ uint16 computation flag for WFS image """
124  self.__max_flux_per_pix__max_flux_per_pix = 0
125  """ Maximum number of photons allowed before pixel computation (only used if fakecam is True) """
126  self.__max_pix_value__max_pix_value = 0
127  """ Maximum number of ADU photons allowed in the uint16 image (only used if fakecam is True) """
128  # internal kwrd
129  self.__pdiam__pdiam = 0
130  """ pupil diam for a subap (in pixel)"""
131  self.__Nfft__Nfft = 0
132  """ array size for fft for a subap (in pixel)"""
133  self.__Ntot__Ntot = 0
134  """ total size of hr image for a subap (in pixel)"""
135  self.__nrebin__nrebin = 0
136  """ rebin factor from hr to binned image for a subap"""
137  self.__nvalid__nvalid = 0
138  """ number of valid subaps"""
139 
140  self.__nphotons__nphotons = 0
141  """ number of photons per subap"""
142  self.__nphotons4imat__nphotons4imat = 1.e5
143  """ number of photons per subap used for doing imat"""
144  self.__subapd__subapd = 0
145  """ subap diameter (m)"""
146  self.__fluxPerSub__fluxPerSub = None
147  """ fraction of nphotons per subap"""
148  self.__qpixsize__qpixsize = 0
149  """ quantum pixel size for the simulation"""
150 
151  self.__validpuppixx__validpuppixx = None
152  """ (int*) x start indexes for cutting phase screens"""
153  self.__validpuppixy__validpuppixy = None
154  """ (int*) y start indexes for cutting phase screens"""
155  # cdef np.ndarray _validsubs # (i,j) indices of valid subaps
156  self.__validsubsx__validsubsx = None
157  """ (int*) X-indices of bottom left pixel of each valid subaps [pixels]"""
158  self.__validsubsy__validsubsy = None
159  """ (int*) Y-indices of bottom left pixel of each valid subaps [pixels]"""
160  self.__isvalid__isvalid = None
161  """ (int*) array of 0/1 for valid subaps"""
162  self.__phasemap__phasemap = None
163  """ (int*) array of pixels transform from phase screen into subaps phase screens"""
164  self.__ttprojmat__ttprojmat = None
165  """ (float*) matrices to project subap phase to geometric slope (considering valid pup)"""
166  self.__hrmap__hrmap = None
167  """ (int*) array of pixels transform from minimal FoV image to (in case type is sh or geo)"""
168  self.__sincar__sincar = None
169  """ (float*) array of pixels transform from minimal FoV image to (in case type is "pyr" or "roof")"""
170  # full FoV image (array of 0 if the same)
171  self.__binmap__binmap = None
172  """ (int*) array of pixels transform from full FoV hr images to binned images"""
173  self.__halfxy__halfxy = None
174  """ (float*) phase offset for 1/2 pixel shift in (x,y)"""
175 
176  self.__submask__submask = None
177  """ (float*) fieldstop for each subap"""
178 
179  self.__lgskern__lgskern = None
180  """ lgs kernels for each subap"""
181  self.__profna__profna = None
182  """ sodium profile"""
183  self.__altna__altna = None
184  """ corresponding altitude"""
185  self.__prof1d__prof1d = None
186  """ hr profile"""
187  self.__profcum__profcum = None
188  """ hr profile cumulated"""
189  self.__beam__beam = None
190  """ 1d beam function"""
191  self.__ftbeam__ftbeam = None
192  """ 1d beam function fft"""
193  self.__azimuth__azimuth = None
194  """ angles of rotation for each spot"""
195 
196  # pyramid-nly kwrds
197  self.__pyr_ampl__pyr_ampl = 0
198  """ pyramid wfs modulation amplitude radius [arcsec]."""
199  self.__pyr_npts__pyr_npts = 0
200  """ total number of point along modulation circle [unitless]."""
201  self.__pyr_pos__pyr_pos = None
202  """ positions for modulation, overwrites ampl and npts [arcsec]"""
203  self.__pyr_loc__pyr_loc = None
204  """ Location of modulation, before/after the field stop.
205  valid value are "before" or "after" (default "after")."""
206  self.__pyrtype__pyrtype = None
207  """ Type of pyramid, either 0 for "Pyramid" or 1 for "RoofPrism"."""
208  self.__pyr_pup_sep__pyr_pup_sep = -1
209  """ Number of Pyramid facets """
210  self.__nPupils__nPupils = 0
211  """ Pyramid pupil separation. (default: long(wfs.nxsub))"""
212  self.__pyr_misalignments__pyr_misalignments = None
213  """ Pyramid quadrant misalignments: by how much pupil subimages
214  are off from their expected positions (in rebinned pixels)"""
215  self.__pyr_compute_focalplane__pyr_compute_focalplane = False
216  """ Compute the pyramid focalplane image """
217 
218  # pyramid internal kwrds
219  self._pyr_offsets_pyr_offsets = None # (float*)
220  self.__pyr_cx__pyr_cx = None # (float*)
221  self.__pyr_cy__pyr_cy = None # (float*)
222  self.__pyr_weights__pyr_weights = None
223  """ Modulation points ponderation weights"""
224  self.__pyr_scale_pos__pyr_scale_pos = None # (float) : scale to apply on cx, cy
225 
226  def get_type(self):
227  """ Get the type of wfs
228 
229  :return: (str) : type of wfs ("sh" or "pyr")
230  """
231  return self.__type__type
232 
233  def set_type(self, typewfs):
234  """ Set the type of wfs
235 
236  :param t: (str) : type of wfs ("sh" or "pyr")
237  """
238  self.__type__type = typewfs #scons.check_enum(scons.WFSType, type)0
239 
240  type = property(get_type, set_type)
241 
242  def get_nxsub(self):
243  """ Get the linear number of subaps
244 
245  :return: (long) : linear number of subaps
246  """
247  return self.__nxsub__nxsub
248 
249  def set_nxsub(self, n):
250  """ Set the linear number of subaps
251 
252  :param n: (long) : linear number of subaps
253  """
254  self.__nxsub__nxsub = csu.enforce_int(n)
255 
256  nxsub = property(get_nxsub, set_nxsub)
257 
258  def get_nPupils(self):
259  """ Get the number of pupil images
260 
261  :return: (long) : number of pupil images
262  """
263  return self.__nPupils__nPupils
264 
265  def set_nPupils(self, n):
266  """ Set the number of pupil images
267 
268  :param n: (long) : number of pupil images
269  """
270  self.__nPupils__nPupils = csu.enforce_int(n)
271 
272  nPupils = property(get_nPupils, set_nPupils)
273 
274  def get_npix(self):
275  """ Get the number of pixels per subap
276 
277  :return: (long) : number of pixels per subap
278  """
279  return self.__npix__npix
280 
281  def set_npix(self, n):
282  """ Set the number of pixels per subap
283 
284  :param n: (long) : number of pixels per subap
285  """
286  self.__npix__npix = csu.enforce_int(n)
287 
288  npix = property(get_npix, set_npix)
289 
290  def get_pixsize(self):
291  """ Get the pixel size
292 
293  :return: (float) : pixel size (in arcsec) for a subap
294  """
295  return self.__pixsize__pixsize
296 
297  def set_pixsize(self, p):
298  """ Set the pixel size
299 
300  :param p: (float) : pixel size (in arcsec) for a subap
301  """
302  self.__pixsize__pixsize = csu.enforce_float(p)
303 
304  pixsize = property(get_pixsize, set_pixsize)
305 
306  def get_pyr_scale_pos(self):
307  """ Get the pixel size
308 
309  :return: (float) : pixel size (in arcsec) for a subap
310  """
311  return self.__pyr_scale_pos__pyr_scale_pos
312 
313  def set_pyr_scale_pos(self, p):
314  """ Set the pixel size
315 
316  :param p: (float) : pixel size (in arcsec) for a subap
317  """
318  self.__pyr_scale_pos__pyr_scale_pos = csu.enforce_float(p)
319 
320  _pyr_scale_pos = property(get_pyr_scale_pos, set_pyr_scale_pos)
321 
322  def get_Lambda(self):
323  """ Get the observation wavelength
324 
325  :return: (float) : observation wavelength (in um) for a subap
326  """
327  return self.__Lambda__Lambda
328 
329  def set_Lambda(self, L):
330  """ Set the observation wavelength
331 
332  :param L: (float) : observation wavelength (in um) for a subap
333  """
334  self.__Lambda__Lambda = L
335 
336  Lambda = property(get_Lambda, set_Lambda)
337 
338  def get_optthroughput(self):
339  """ Get the wfs global throughput
340 
341  :return: (float) : wfs global throughput
342  """
343  return self.__optthroughput__optthroughput
344 
345  def set_optthroughput(self, o):
346  """ Set the wfs global throughput
347 
348  :param o: (float) : wfs global throughput
349  """
350  self.__optthroughput__optthroughput = csu.enforce_float(o)
351 
352  optthroughput = property(get_optthroughput, set_optthroughput)
353 
354  def get_fracsub(self):
355  """ Get the minimal illumination fraction for valid subaps
356 
357  :return: (float) : minimal illumination fraction for valid subaps
358  """
359  return self.__fracsub__fracsub
360 
361  def set_fracsub(self, f):
362  """ Set the minimal illumination fraction for valid subaps
363 
364  :param f: (float) : minimal illumination fraction for valid subaps
365  """
366  self.__fracsub__fracsub = csu.enforce_float(f)
367 
368  fracsub = property(get_fracsub, set_fracsub)
369 
370  def get_open_loop(self):
371  """ Get the loop state (open or closed)
372 
373  :return: (long) : 1 if in "open-loop" mode (i.e. does not see dm)
374  """
375  return self.__open_loop__open_loop
376 
377  def set_open_loop(self, o):
378  """ Set the loop state (open or closed)
379 
380  :param o: (long) : 1 if in "open-loop" mode (i.e. does not see dm)
381  """
382  self.__open_loop__open_loop = csu.enforce_or_cast_bool(o)
383 
384  open_loop = property(get_open_loop, set_open_loop)
385 
386  def get_fssize(self):
387  """ Get the size of field stop
388 
389  :return: (float) : size of field stop in arcsec
390  """
391  return self.__fssize__fssize
392 
393  def set_fssize(self, f):
394  """ Set the size of field stop
395 
396  :param f: (float) : size of field stop in arcsec
397  """
398  self.__fssize__fssize = csu.enforce_float(f)
399 
400  fssize = property(get_fssize, set_fssize)
401 
402  def get_fstop(self):
403  """ Get the size of field stop
404 
405  :return: (str) : size of field stop in arcsec
406  """
407  return self.__fstop__fstop
408 
409  def set_fstop(self, f):
410  """ Set the size of field stop
411 
412  :param f: (str) : size of field stop in arcsec
413  """
414  self.__fstop__fstop = scons.check_enum(scons.FieldStopType, f)
415 
416  fstop = property(get_fstop, set_fstop)
417 
418  def get_atmos_seen(self):
419  """ Gells if the wfs sees the atmosphere layers
420 
421  :return: (bool) :True if the WFS sees the atmosphere layers
422  """
423  return self.__atmos_seen__atmos_seen
424 
425  def set_atmos_seen(self, i):
426  """ Tells if the wfs sees the atmosphere layers
427 
428  :param i: (bool) :True if the WFS sees the atmosphere layers
429  """
430  self.__atmos_seen__atmos_seen = csu.enforce_or_cast_bool(i)
431 
432  atmos_seen = property(get_atmos_seen, set_atmos_seen)
433 
434  def get_xpos(self):
435  """ Get the guide star x position on sky
436 
437  :return: (float) : guide star x position on sky (in arcsec)
438  """
439  return self.__xpos__xpos
440 
441  def set_xpos(self, x):
442  """ Set the guide star x position on sky
443 
444  :param x: (float) : guide star x position on sky (in arcsec)
445  """
446  self.__xpos__xpos = csu.enforce_float(x)
447 
448  xpos = property(get_xpos, set_xpos)
449 
450  def get_ypos(self):
451  """ Get the guide star y position on sky
452 
453  :return: (float) : guide star y position on sky (in arcsec)
454  """
455  return self.__ypos__ypos
456 
457  def set_ypos(self, y):
458  """ Set the guide star y position on sky
459 
460  :param y: (float) : guide star y position on sky (in arcsec)
461  """
462  self.__ypos__ypos = csu.enforce_float(y)
463 
464  ypos = property(get_ypos, set_ypos)
465 
466  def get_G(self):
467  """ Get the magnifying factor
468 
469  :return: (float) : magnifying factor
470  """
471  return self.__G__G
472 
473  def set_G(self, G):
474  """ Set the magnifying factor
475 
476  :param G: (float) : magnifying factor
477  """
478  self.__G__G = csu.enforce_float(G)
479 
480  G = property(get_G, set_G)
481 
482  def get_thetaML(self):
483  """ Get the rotation angle in the pupil
484 
485  :return: (float) : rotation angle (rad)
486  """
487  return self.__thetaML__thetaML
488 
489  def set_thetaML(self, thetaML):
490  """ Set the rotation angle in the pupil
491 
492  :param thetaML: (float) : rotation angle (rad)
493  """
494  self.__thetaML__thetaML = csu.enforce_float(thetaML)
495 
496  thetaML = property(get_thetaML, set_thetaML)
497 
498  def get_dx(self):
499  """ Get the X axis misalignment
500 
501  :return: (float) : dx (pix)
502  """
503  return self.__dx__dx
504 
505  def set_dx(self, dx):
506  """ Set the X axis misalignment
507 
508  :param dx: (float) : dx (pix)
509  """
510  self.__dx__dx = csu.enforce_float(dx)
511 
512  dx = property(get_dx, set_dx)
513 
514  def get_dy(self):
515  """ Get the Y axis misalignment
516 
517  :return: (float) : dy (pix)
518  """
519  return self.__dy__dy
520 
521  def set_dy(self, dy):
522  """ Set the Y axis misalignment
523 
524  :param dy: (float) : dy (pix)
525  """
526  self.__dy__dy = csu.enforce_float(dy)
527 
528  dy = property(get_dy, set_dy)
529 
530  def get_fakecam(self):
531  """ Get the fakecam flag
532 
533  :return: (bool) : fakecam flag
534  """
535  return self.__fakecam__fakecam
536 
537  def set_fakecam(self, fakecam):
538  """ Set the fakecam flag
539 
540  :return: (bool) : fakecam flag
541  """
542  self.__fakecam__fakecam = csu.enforce_or_cast_bool(fakecam)
543 
544  fakecam = property(get_fakecam, set_fakecam)
545 
546  def get_maxFluxPerPix(self):
547  """ Get the max_flux_per_pix
548 
549  :return: (int) : max_flux_per_pix
550  """
551  return self.__max_flux_per_pix__max_flux_per_pix
552 
553  def set_max_flux_per_pix(self, max_flux_per_pix):
554  """ Set the max_flux_per_pix
555 
556  :return: (int) : max_flux_per_pix
557  """
558  self.__max_flux_per_pix__max_flux_per_pix = csu.enforce_int(max_flux_per_pix)
559 
560  max_flux_per_pix = property(get_maxFluxPerPix, set_max_flux_per_pix)
561 
562  def get_max_pix_value(self):
563  """ Get the max_pix_value
564 
565  :return: (int) : max_pix_value
566  """
567  return self.__max_pix_value__max_pix_value
568 
569  def set_max_pix_value(self, max_pix_value):
570  """ Set the max_pix_value
571 
572  :return: (int) : max_pix_value
573  """
574  self.__max_pix_value__max_pix_value = csu.enforce_int(max_pix_value)
575 
576  max_pix_value = property(get_max_pix_value, set_max_pix_value)
577 
578  def get_gsalt(self):
579  """ Get the altitude of guide star
580 
581  :return: (float) : altitude of guide star (in m) 0 if ngs
582  """
583  return self.__gsalt__gsalt
584 
585  def set_gsalt(self, g):
586  """ Set the altitude of guide star
587 
588  :param g: (float) : altitude of guide star (in m) 0 if ngs
589  """
590  self.__gsalt__gsalt = csu.enforce_float(g)
591 
592  gsalt = property(get_gsalt, set_gsalt)
593 
594  def get_gsmag(self):
595  """ Get the magnitude of guide star
596 
597  :return: (float) : magnitude of guide star
598  """
599  return self.__gsmag__gsmag
600 
601  def set_gsmag(self, g):
602  """ Set the magnitude of guide star
603 
604  :param g: (float) : magnitude of guide star
605  """
606  self.__gsmag__gsmag = csu.enforce_float(g)
607 
608  gsmag = property(get_gsmag, set_gsmag)
609 
610  def get_zerop(self):
611  """ Get the detector zero point
612 
613  :return: (float) : detector zero point
614  """
615  return self.__zerop__zerop
616 
617  def set_zerop(self, z):
618  """ Set the detector zero point
619 
620  :param z: (float) : detector zero point
621  """
622  self.__zerop__zerop = csu.enforce_float(z)
623 
624  zerop = property(get_zerop, set_zerop)
625 
626  def get_noise(self):
627  """ Get the desired noise
628 
629  :return: (float) : desired noise : < 0 = no noise / 0 = photon only / > 0 photon + ron
630  """
631  return self.__noise__noise
632 
633  def set_noise(self, n):
634  """ Set the desired noise
635 
636  :param n: (float) : desired noise : < 0 = no noise / 0 = photon only / > 0 photon + ron
637  """
638  self.__noise__noise = csu.enforce_float(n)
639 
640  noise = property(get_noise, set_noise)
641 
642  def get_nphotons4imat(self):
643  """ Get the desired numner of photons used for doing imat
644 
645  :return: (float) : desired number of photons
646  """
647  return self.__nphotons4imat__nphotons4imat
648 
649  def set_nphotons4imat(self, nphot):
650  """ Set the desired numner of photons used for doing imat
651 
652  :param nphot: (float) : desired number of photons
653  """
654  self.__nphotons4imat__nphotons4imat = csu.enforce_float(nphot)
655 
656  nphotons4imat = property(get_nphotons4imat, set_nphotons4imat)
657 
658  def get_kernel(self):
659  """ Get the attribute kernel
660 
661  :return: (float) :
662  """
663  return self.__kernel__kernel
664 
665  def set_kernel(self, k):
666  """ Set the attribute kernel
667 
668  :param k: (float) :
669  """
670  self.__kernel__kernel = csu.enforce_float(k)
671 
672  kernel = property(get_kernel, set_kernel)
673 
674  def get_laserpower(self):
675  """ Get the laser power
676 
677  :return: (float) : laser power in W
678  """
679  return self.__laserpower__laserpower
680 
681  def set_laserpower(self, l):
682  """ Set the laser power
683 
684  :param l: (float) : laser power in W
685  """
686  self.__laserpower__laserpower = csu.enforce_float(l)
687 
688  laserpower = property(get_laserpower, set_laserpower)
689 
690  def get_lltx(self):
691  """ Get the x position of llt
692 
693  :return: (float) : x position (in meters) of llt
694  """
695  return self.__lltx__lltx
696 
697  def set_lltx(self, l):
698  """ Set the x position of llt
699 
700  :param l: (float) : x position (in meters) of llt
701  """
702  self.__lltx__lltx = csu.enforce_float(l)
703 
704  lltx = property(get_lltx, set_lltx)
705 
706  def get_llty(self):
707  """ Get the y position of llt
708 
709  :return: (float) : y position (in meters) of llt
710  """
711  return self.__llty__llty
712 
713  def set_llty(self, l):
714  """ Set the y position of llt
715 
716  :param l: (float) : y position (in meters) of llt
717  """
718  self.__llty__llty = csu.enforce_float(l)
719 
720  llty = property(get_llty, set_llty)
721 
722  def get_proftype(self):
723  """ Get the type of sodium profile
724 
725  :return: (str) : type of sodium profile "gauss", "exp", etc ...
726  """
727  return self.__proftype__proftype
728 
729  def set_proftype(self, p):
730  """ Set the type of sodium profile
731 
732  :param p: (str) : type of sodium profile "gauss", "exp", etc ...
733  """
734  self.__proftype__proftype = scons.check_enum(scons.ProfType, p)
735 
736  proftype = property(get_proftype, set_proftype)
737 
738  def get_beamsize(self):
739  """ Get the laser beam fwhm on-sky
740 
741  :return: (float) : laser beam fwhm on-sky (in arcsec)
742  """
743  return self.__beamsize__beamsize
744 
745  def set_beamsize(self, b):
746  """ Set the laser beam fwhm on-sky
747 
748  :param b: (float) : laser beam fwhm on-sky (in arcsec)
749  """
750  self.__beamsize__beamsize = csu.enforce_float(b)
751 
752  beamsize = property(get_beamsize, set_beamsize)
753 
754  def get_pyr_ampl(self):
755  """ Get the pyramid wfs modulation amplitude radius
756 
757  :return: (float) : pyramid wfs modulation amplitude radius (in arsec)
758  """
759  return self.__pyr_ampl__pyr_ampl
760 
761  def set_pyr_ampl(self, p):
762  """ Set the pyramid wfs modulation amplitude radius
763 
764  :param p: (float) : pyramid wfs modulation amplitude radius (in arsec)
765  """
766  self.__pyr_ampl__pyr_ampl = csu.enforce_float(p)
767 
768  pyr_ampl = property(get_pyr_ampl, set_pyr_ampl)
769 
770  def get_pyr_npts(self):
771  """ Get the total number of point along modulation circle
772 
773  :return: (long) : total number of point along modulation circle
774  """
775  return self.__pyr_npts__pyr_npts
776 
777  def set_pyr_npts(self, p):
778  """ Set the total number of point along modulation circle
779 
780  :param p: (long) : total number of point along modulation circle
781  """
782  self.__pyr_npts__pyr_npts = csu.enforce_int(p)
783 
784  pyr_npts = property(get_pyr_npts, set_pyr_npts)
785 
786  def get_pyr_loc(self):
787  """ Get the location of modulation
788 
789  :return: (str) : location of modulation, before/after the field stop.
790  valid value are "before" or "after" (default "after")
791  """
792  return self.__pyr_loc__pyr_loc
793 
794  def set_pyr_loc(self, p):
795  """ Set the location of modulation
796 
797  :param p: (str) : location of modulation, before/after the field stop.
798  valid value are "before" or "after" (default "after")
799  """
800  self.__pyr_loc__pyr_loc = bytes(p.encode('UTF-8'))
801 
802  pyr_loc = property(get_pyr_loc, set_pyr_loc)
803 
804  def get_pyrtype(self):
805  """ Get the type of pyramid,
806 
807  :return: (str) : type of pyramid, either 0 for "Pyramid" or 1 for "RoofPrism"
808  """
809  return self.__pyrtype__pyrtype
810 
811  def set_pyrtype(self, p):
812  """ Set the type of pyramid,
813 
814  :param p: (str) : type of pyramid, either 0 for "Pyramid" or 1 for "RoofPrism"
815  """
816  self.__pyrtype__pyrtype = bytes(p.encode('UTF-8'))
817 
818  pyrtype = property(get_pyrtype, set_pyrtype)
819 
820  def get_pyr_cx(self):
821  """ Get the x position of modulation points for pyramid sensor
822 
823  :return: (np.ndarray[ndim=1,dtype=np.floatt32_t) : x positions
824  """
825  return self.__pyr_cx__pyr_cx
826 
827  def set_pyr_cx(self, cx):
828  """ Set the x position of modulation points for pyramid sensor
829 
830  :param cx: (np.ndarray[ndim=1,dtype=np.floatt32_t) : x positions
831  """
832  self.__pyr_cx__pyr_cx = csu.enforce_array(cx.copy(), self.__pyr_npts__pyr_npts, dtype=np.float32)
833 
834  _pyr_cx = property(get_pyr_cx, set_pyr_cx)
835 
836  def get_pyr_cy(self):
837  """ Get the y position of modulation points for pyramid sensor
838 
839  :return: (np.ndarray[ndim=1,dtype=np.floatt32_t) : y positions
840  """
841  return self.__pyr_cy__pyr_cy
842 
843  def set_pyr_cy(self, cy):
844  """ Set the y position of modulation points for pyramid sensor
845 
846  :param cy: (np.ndarray[ndim=1,dtype=np.floatt32_t) : y positions
847  """
848  self.__pyr_cy__pyr_cy = csu.enforce_array(cy.copy(), self.__pyr_npts__pyr_npts, dtype=np.float32)
849 
850  _pyr_cy = property(get_pyr_cy, set_pyr_cy)
851 
852  def get_dms_seen(self):
853  """ Get the index of dms seen by the WFS
854 
855  :return: (np.ndarray[ndim=1,dtype=np.int32_t) : index of dms seen by the WFS
856  """
857  return self.__dms_seen__dms_seen
858 
859  def set_dms_seen(self, dms_seen):
860  """ Set the index of dms seen by the WFS
861 
862  :param dms_seen: (np.ndarray[ndim=1,dtype=np.int32_t) : index of dms seen by the WFS
863  """
864  self.__dms_seen__dms_seen = csu.enforce_array(dms_seen.copy(), dms_seen.size,
865  dtype=np.int32)
866 
867  dms_seen = property(get_dms_seen, set_dms_seen)
868 
869  def get_lgsreturnperwatt(self):
870  """ Get the return per watt factor
871 
872  :return: (float) : return per watt factor (high season : 10 ph/cm2/s/W)
873  """
874  return self.__lgsreturnperwatt__lgsreturnperwatt
875 
876  def set_lgsreturnperwatt(self, lpw):
877  """ Set the return per watt factor
878 
879  :param lpw: (float) : return per watt factor (high season : 10 ph/cm2/s/W)
880  """
881  self.__lgsreturnperwatt__lgsreturnperwatt = csu.enforce_float(lpw)
882 
883  lgsreturnperwatt = property(get_lgsreturnperwatt, set_lgsreturnperwatt)
884 
885  def get_altna(self):
886  """ Get the corresponding altitude
887 
888  :return: (np.ndarray[ndim=1,dtype=np.float32]) : corresponding altitude
889  """
890  return self.__altna__altna
891 
892  def set_altna(self, a):
893  """ Set the corresponding altitude
894 
895  :param a: (np.ndarray[ndim=1,dtype=np.float32]) : corresponding altitude
896  """
897  self.__altna__altna = csu.enforce_array(a.copy(), a.size, dtype=np.float32)
898 
899  _altna = property(get_altna, set_altna)
900 
901  def get_profna(self):
902  """ Get the sodium profile
903 
904  :return: (np.ndarray[ndim=1,dtype=np.float32]) : sodium profile
905  """
906  return self.__profna__profna
907 
908  def set_profna(self, p):
909  """ Set the sodium profile
910 
911  :param p: (np.ndarray[ndim=1,dtype=np.float32]) : sodium profile
912  """
913  self.__profna__profna = csu.enforce_array(p.copy(), p.size, dtype=np.float32)
914 
915  _profna = property(get_profna, set_profna)
916 
917  def get_roket(self):
918  """ Get the error budget flag : if True, enable error budget analysis
919  for this simulation
920 
921  :return: (bool) : error budget flag
922  """
923  return self.__roket__roket
924 
925  def set_roket(self, roket):
926  """ Set the error budget flag : if True, enable error budget analysis
927  for this simulation
928 
929  :param roket: (bool) : error budget flag
930  """
931  self.__roket__roket = csu.enforce_or_cast_bool(roket)
932 
933  roket = property(get_roket, set_roket)
934 
935  def get_is_low_order(self):
936  """ Get the low order flag : if True, WFS arrays will not be mutualised
937 
938  :return: (bool) : low order flag
939  """
940  return self.__is_low_order__is_low_order
941 
942  def set_is_low_order(self, is_low_order):
943  """ Set the low order flag : if True, WFS arrays will not be mutualised
944 
945  :param is_low_order: (bool) : low order flag
946  """
947  self.__is_low_order__is_low_order = csu.enforce_or_cast_bool(is_low_order)
948 
949  is_low_order = property(get_is_low_order, set_is_low_order)
950 
951  def get_pyr_pup_sep(self):
952  """ Get the pyramid pupil separation. (default: long(wfs.nxsub))
953 
954  :return: (long) : pyramid pupil separation wanted
955  """
956  return self.__pyr_pup_sep__pyr_pup_sep
957 
958  def set_pyr_pup_sep(self, pyr_pup_sep):
959  """ Set the pyramid pupil separation. (default: long(wfs.nxsub))
960 
961  :param pyr_pup_sep: (long) : pyramid pupil separation wanted
962  """
963  self.__pyr_pup_sep__pyr_pup_sep = csu.enforce_int(pyr_pup_sep)
964 
965  pyr_pup_sep = property(get_pyr_pup_sep, set_pyr_pup_sep)
966 
967  def get_pyr_misalignments(self) -> None:
968 
969  return self.__pyr_misalignments__pyr_misalignments
970 
971  def set_pyr_misalignments(self, misalignments: np.ndarray) -> None:
972 
973  self.__pyr_misalignments__pyr_misalignments = csu.enforce_arrayMultiDim(misalignments.copy(),
974  (self.nPupilsnPupils, 2),
975  dtype=np.float32)
976 
977  pyr_misalignments = property(get_pyr_misalignments, set_pyr_misalignments)
978 
979  def get_pyr_compute_focalplane(self):
980  """ Get the status of the pyramid wfs focal plane computation
981  """
982  return self.__pyr_compute_focalplane__pyr_compute_focalplane
983 
984  def set_pyr_compute_focalplane(self, compute_focalplane):
985  """ Set the status of the pyramid wfs focal plane computation
986  """
987  self.__pyr_compute_focalplane__pyr_compute_focalplane = compute_focalplane
988 
989  pyr_compute_focalplane = property(get_pyr_compute_focalplane,
990  set_pyr_compute_focalplane)
991 
992  def get_nvalid(self):
993  """ Get the number of valid subapertures
994 
995  :return: (long) : number of valid subapertures
996  """
997  return self.__nvalid__nvalid
998 
999  def set_nvalid(self, n):
1000  """ Set the number of valid subapertures
1002  :param n: (long) : number of valid subapertures
1003  """
1004  self.__nvalid__nvalid = csu.enforce_int(n)
1005 
1006  _nvalid = property(get_nvalid, set_nvalid)
1007 
1008  def get_validsubsx(self):
1009  """ Get the valid subapertures along X-axis
1010 
1011  :return: (np.array(dim=1, dtype=np.int32)) : validsubsx
1012  """
1013  return self.__validsubsx__validsubsx
1014 
1015  def set_validsubsx(self, vx):
1016  """ Set the valid subapertures along X-axis
1017 
1018  :param vx: (np.array(dim=1, dtype=np.int32)) : validsubsx
1019  """
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)
1022  else:
1023  self.__validsubsx__validsubsx = csu.enforce_array(vx, self.__nvalid__nvalid, dtype=np.int32)
1024 
1025  _validsubsx = property(get_validsubsx, set_validsubsx)
1026 
1027  def get_validsubsy(self):
1028  """ Get the valid subapertures along Y-axis
1029 
1030  :return: (np.array(dim=1, dtype=np.int32)) : validsubsy
1031  """
1032  return self.__validsubsy__validsubsy
1033 
1034  def set_validsubsy(self, vy):
1035  """ Set the valid subapertures along Y-axis
1036 
1037  :param vy: (np.array(dim=1, dtype=np.int32)) : validsubsy
1038  """
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)
1041  else:
1042  self.__validsubsy__validsubsy = csu.enforce_array(vy, self.__nvalid__nvalid, dtype=np.int32)
1043 
1044  _validsubsy = property(get_validsubsy, set_validsubsy)
1045 
1046  def get_validsub(self):
1047  """ Return both validsubsx and validsubsy
1048 
1049  :return: (tuple) : (self._validsubsx, self._validsubsy)
1050  """
1051  return np.stack([self._validsubsx_validsubsx, self._validsubsy_validsubsy])
1053  def get_Nfft(self):
1054  """ Get the size of FFT support for a subap
1055 
1056  :return: (long) : size of FFT support
1057  """
1058  return self.__Nfft__Nfft
1060  def set_Nfft(self, n):
1061  """ Set the size of FFT support for a subap
1062 
1063  :param n: (long) : size of FFT support
1064  """
1065  self.__Nfft__Nfft = csu.enforce_int(n)
1066 
1067  _Nfft = property(get_Nfft, set_Nfft)
1068 
1069  def get_Ntot(self):
1070  """ Get the size of hr image for a subap
1071 
1072  :return: (long) : size of hr image for a subap
1073  """
1074  return self.__Ntot__Ntot
1075 
1076  def set_Ntot(self, n):
1077  """ Set the size of hr image for a subap
1078 
1079  :param n: (long) : size of hr image for a subap
1080  """
1081  self.__Ntot__Ntot = csu.enforce_int(n)
1082 
1083  _Ntot = property(get_Ntot, set_Ntot)
1084 
1085  def get_nrebin(self):
1086  """ Get the rebin factor from hr to binned image for a subap
1087 
1088  :return: (long) : rebin factor
1089  """
1090  return self.__nrebin__nrebin
1091 
1092  def set_nrebin(self, n):
1093  """ Set the rebin factor from hr to binned image for a subap
1094 
1095  :param n: (long) : rebin factor
1096  """
1097  self.__nrebin__nrebin = csu.enforce_int(n)
1098 
1099  _nrebin = property(get_nrebin, set_nrebin)
1101  def get_pdiam(self):
1102  """ Get the subap diameter in pixels
1103 
1104  :return: (long) : subap diam in pixels
1105  """
1106  return self.__pdiam__pdiam
1108  def set_pdiam(self, n):
1109  """ Set the subap diameter in pixels
1110 
1111  :param n: (long) : subap diam in pixels
1112  """
1113  self.__pdiam__pdiam = csu.enforce_int(n)
1114 
1115  _pdiam = property(get_pdiam, set_pdiam)
1116 
1117  def get_nphotons(self):
1118  """ Get number of photons per subap
1120  :return: (float) : number of photons per subap
1121  """
1122  return self.__nphotons__nphotons
1123 
1124  def set_nphotons(self, n):
1125  """ Set number of photons per subap
1127  :param n: (float) : number of photons per subap
1128  """
1129  self.__nphotons__nphotons = csu.enforce_float(n)
1130 
1131  _nphotons = property(get_nphotons, set_nphotons)
1132 
1133  def get_qpixsize(self):
1134  """ Get the quantum pixel size for the simulation
1135 
1136  :return: (float) : quantum pixel size
1137  """
1138  return self.__qpixsize__qpixsize
1139 
1140  def set_qpixsize(self, n):
1141  """ Set the quantum pixel size for the simulation
1142 
1143  :param n: (float) : quantum pixel size
1144  """
1145  self.__qpixsize__qpixsize = csu.enforce_float(n)
1146 
1147  _qpixsize = property(get_qpixsize, set_qpixsize)
1148 
1149  def get_subapd(self):
1150  """ Get the subap diameter (m)
1151 
1152  :return: (float) : subap diameter (m)
1153  """
1154  return self.__subapd__subapd
1155 
1156  def set_subapd(self, n):
1157  """ Set the subap diameter (m)
1158 
1159  :param n: (float) : subap diameter (m)
1160  """
1161  self.__subapd__subapd = csu.enforce_float(n)
1162 
1163  _subapd = property(get_subapd, set_subapd)
1165  def get_fluxPerSub(self):
1166  """ Get the subap diameter (m)
1167 
1168  :return: (np.array(ndim=2, dtype=np.float32)) : subap diameter (m)
1169  """
1170  return self.__fluxPerSub__fluxPerSub
1171 
1172  def set_fluxPerSub(self, data):
1173  """ Set the subap diameter (m)
1174 
1175  :param data: (np.array(ndim=2, dtype=np.float32)) : subap diameter (m)
1176  """
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)
1180  else:
1181  self.__fluxPerSub__fluxPerSub = csu.enforce_arrayMultiDim(data.copy(),
1182  (self.__nxsub__nxsub, self.__nxsub__nxsub),
1183  dtype=np.float32)
1184 
1185  _fluxPerSub = property(get_fluxPerSub, set_fluxPerSub)
1186 
1187  def get_ftkernel(self):
1188  """ TODO : docstring
1189  """
1190  return self.__ftkernel__ftkernel
1191 
1192  def set_ftkernel(self, data):
1193  """ TODO : docstring
1194  """
1195  self.__ftkernel__ftkernel = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1196  dtype=np.complex64)
1197 
1198  _ftkernel = property(get_ftkernel, set_ftkernel)
1199 
1200  def get_sincar(self):
1201  """ TODO : docstring
1202  """
1203  return self.__sincar__sincar
1204 
1205  def set_sincar(self, data):
1206  """ TODO : docstring
1207  """
1208  self.__sincar__sincar = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1209  dtype=np.float32)
1210 
1211  _sincar = property(get_sincar, set_sincar)
1212 
1213  def get_halfxy(self):
1214  """ TODO : docstring
1215  """
1216  return self.__halfxy__halfxy
1217 
1218  def set_halfxy(self, data):
1219  """ TODO : docstring
1220  """
1221  self.__halfxy__halfxy = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1222  dtype=np.float32)
1223 
1224  _halfxy = property(get_halfxy, set_halfxy)
1225 
1226  def get_submask(self):
1227  """ TODO : docstring
1228  """
1229  return self.__submask__submask
1230 
1231  def set_submask(self, data):
1232  """ TODO : docstring
1233  """
1234  self.__submask__submask = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1235  dtype=np.float32)
1236 
1237  _submask = property(get_submask, set_submask)
1238 
1239  def get_lgskern(self):
1240  """ TODO : docstring
1241  """
1242  return self.__lgskern__lgskern
1243 
1244  def set_lgskern(self, data):
1245  """ TODO : docstring
1246  """
1247  self.__lgskern__lgskern = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1248  dtype=np.float32)
1249 
1250  _lgskern = property(get_lgskern, set_lgskern)
1251 
1252  def get_azimuth(self):
1253  """ TODO : docstring
1254  """
1255  return self.__azimuth__azimuth
1256 
1257  def set_azimuth(self, data):
1258  """ TODO : docstring
1259  """
1260  self.__azimuth__azimuth = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1261  dtype=np.float32)
1262 
1263  _azimuth = property(get_azimuth, set_azimuth)
1264 
1265  def get_prof1d(self):
1266  """ TODO : docstring
1267  """
1268  return self.__prof1d__prof1d
1270  def set_prof1d(self, data):
1271  """ TODO : docstring
1272  """
1273  self.__prof1d__prof1d = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1274  dtype=np.float32)
1275 
1276  _prof1d = property(get_prof1d, set_prof1d)
1277 
1278  def get_profcum(self):
1279  """ TODO : docstring
1280  """
1281  return self.__profcum__profcum
1282 
1283  def set_profcum(self, data):
1284  """ TODO : docstring
1285  """
1286  self.__profcum__profcum = csu.enforce_array(data.copy(), data.size, dtype=np.float32)
1287 
1288  _profcum = property(get_profcum, set_profcum)
1289 
1290  def get_beam(self):
1291  """ TODO : docstring
1292  """
1293  return self.__beam__beam
1294 
1295  def set_beam(self, data):
1296  """ TODO : docstring
1297  """
1298  self.__beam__beam = csu.enforce_array(data.copy(), data.size, dtype=np.float32)
1299 
1300  _beam = property(get_beam, set_beam)
1302  def get_ftbeam(self):
1303  """ TODO : docstring
1304  """
1305  return self.__ftbeam__ftbeam
1307  def set_ftbeam(self, data):
1308  """ TODO : docstring
1309  """
1310  self.__ftbeam__ftbeam = csu.enforce_array(data.copy(), data.size, dtype=np.complex64)
1311 
1312  _ftbeam = property(get_ftbeam, set_ftbeam)
1313 
1314  def get_hrmap(self):
1315  """ TODO : docstring
1316  """
1317  return self.__hrmap__hrmap
1318 
1319  def set_hrmap(self, data):
1320  """ TODO : docstring
1321  """
1322  self.__hrmap__hrmap = csu.enforce_arrayMultiDim(data.copy(), data.shape, dtype=np.int32)
1323 
1324  _hrmap = property(get_hrmap, set_hrmap)
1325 
1326  def get_binmap(self):
1327  """ TODO : docstring
1328  """
1329  return self.__binmap__binmap
1330 
1331  def set_binmap(self, data):
1332  """ TODO : docstring
1333  """
1334  self.__binmap__binmap = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1335  dtype=np.int32)
1336 
1337  _binmap = property(get_binmap, set_binmap)
1339  def get_phasemap(self):
1340  """ TODO : docstring
1341  """
1342  return self.__phasemap__phasemap
1343 
1344  def set_phasemap(self, data):
1345  """ TODO : docstring
1346  """
1347  self.__phasemap__phasemap = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1348  dtype=np.int32)
1350  _phasemap = property(get_phasemap, set_phasemap)
1351 
1352  def get_ttprojmat(self):
1353  """ Get the TT subaperture projection matrices for this WFS
1355  :return: (np.ndarray) : TT projection matrices (2,NPHASE,NSUB)
1356  """
1357  return self.__ttprojmat__ttprojmat
1358 
1359  def set_ttprojmat(self, data):
1360  """ Set the TT subaperture projection matrices for this WFS
1361 
1362  :param data: (np.ndarray) : TT projection matrices (2,NPHASE,NSUB)
1363  """
1364  self.__ttprojmat__ttprojmat = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1365  dtype=np.float32)
1366 
1367  _ttprojmat = property(get_ttprojmat, set_ttprojmat)
1368 
1369  def get_validpuppixx(self):
1370  """ TODO : docstring
1371  """
1372  return self.__validpuppixx__validpuppixx
1373 
1374  def set_validpuppixx(self, data):
1375  """ TODO : docstring
1376  """
1377  self.__validpuppixx__validpuppixx = csu.enforce_array(data.copy(), data.size, dtype=np.int32)
1378 
1379  _validpuppixx = property(get_validpuppixx, set_validpuppixx)
1380 
1381  def get_validpuppixy(self):
1382  """ TODO : docstring
1383  """
1384  return self.__validpuppixy__validpuppixy
1385 
1386  def set_validpuppixy(self, data):
1387  """ TODO : docstring
1388  """
1389  self.__validpuppixy__validpuppixy = csu.enforce_array(data.copy(), data.size, dtype=np.int32)
1390 
1391  _validpuppixy = property(get_validpuppixy, set_validpuppixy)
1392 
1393  def get_isvalid(self):
1394  """ Get the valid subapertures array
1395 
1396  :return: (int*) array of 0/1 for valid subaps
1397  """
1398  return self.__isvalid__isvalid
1400  def set_isvalid(self, data):
1401  """ Set the valid subapertures array
1402 
1403  :param data: (int*) array of 0/1 for valid subaps
1404  """
1405  self.__isvalid__isvalid = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1406  dtype=np.int32)
1407 
1408  _isvalid = property(get_isvalid, set_isvalid)
1410  def get_pyr_pos(self):
1411  """ TODO : docstring
1412  """
1413  return self.__pyr_pos__pyr_pos
1415  def set_pyr_pos(self, data):
1416  """ TODO : docstring
1417  """
1418  self.__pyr_pos__pyr_pos = csu.enforce_arrayMultiDim(data.copy(), data.shape,
1419  dtype=np.float32)
1420 
1421  pyr_pos = property(get_pyr_pos, set_pyr_pos)
1422 
1423  def get_pyr_weights(self):
1424  """ TODO : docstring
1425  """
1426  return self.__pyr_weights__pyr_weights
1427 
1428  def set_pyr_weights(self, data):
1429  """ TODO : docstring
1430  """
1431  self.__pyr_weights__pyr_weights = csu.enforce_array(data.copy(), data.size, dtype=np.float32)
1432 
1433  _pyr_weights = property(get_pyr_weights, set_pyr_weights)
P-Class (parametres) Param_wfs.
Definition: PWFS.py:47
def set_proftype(self, p)
Set the type of sodium profile.
Definition: PWFS.py:736
def set_nvalid(self, n)
Set the number of valid subapertures.
Definition: PWFS.py:1018
def get_pyrtype(self)
Get the type of pyramid,.
Definition: PWFS.py:811
None get_pyr_misalignments(self)
Definition: PWFS.py:982
def set_Nfft(self, n)
Set the size of FFT support for a subap.
Definition: PWFS.py:1088
def set_ttprojmat(self, data)
Set the TT subaperture projection matrices for this WFS.
Definition: PWFS.py:1450
def get_zerop(self)
Get the detector zero point.
Definition: PWFS.py:617
def set_max_flux_per_pix(self, max_flux_per_pix)
Set the max_flux_per_pix.
Definition: PWFS.py:560
def get_qpixsize(self)
Get the quantum pixel size for the simulation.
Definition: PWFS.py:1176
def set_nphotons4imat(self, nphot)
Set the desired numner of photons used for doing imat.
Definition: PWFS.py:656
def get_fakecam(self)
Get the fakecam flag.
Definition: PWFS.py:537
def get_G(self)
Get the magnifying factor.
Definition: PWFS.py:473
def get_nxsub(self)
Get the linear number of subaps.
Definition: PWFS.py:246
def set_gsalt(self, g)
Set the altitude of guide star.
Definition: PWFS.py:592
def set_beam(self, data)
TODO docstring.
Definition: PWFS.py:1369
def set_pyr_compute_focalplane(self, compute_focalplane)
Set the status of the pyramid wfs focal plane computation.
Definition: PWFS.py:1001
def set_zerop(self, z)
Set the detector zero point.
Definition: PWFS.py:624
def get_Lambda(self)
Get the observation wavelength.
Definition: PWFS.py:329
def get_isvalid(self)
Get the valid subapertures array.
Definition: PWFS.py:1493
def set_fracsub(self, f)
Set the minimal illumination fraction for valid subaps.
Definition: PWFS.py:368
def get_fracsub(self)
Get the minimal illumination fraction for valid subaps.
Definition: PWFS.py:361
def set_lgsreturnperwatt(self, lpw)
Set the return per watt factor.
Definition: PWFS.py:889
def get_fstop(self)
Get the size of field stop.
Definition: PWFS.py:409
def set_phasemap(self, data)
TODO docstring.
Definition: PWFS.py:1430
def set_pixsize(self, p)
Set the pixel size.
Definition: PWFS.py:301
def set_pyr_scale_pos(self, p)
Set the pixel size.
Definition: PWFS.py:317
def get_gsalt(self)
Get the altitude of guide star.
Definition: PWFS.py:585
def get_profcum(self)
TODO docstring.
Definition: PWFS.py:1349
def get_max_pix_value(self)
Get the max_pix_value.
Definition: PWFS.py:569
def get_kernel(self)
Get the attribute kernel.
Definition: PWFS.py:665
def get_fluxPerSub(self)
Get the subap diameter (m)
Definition: PWFS.py:1214
def set_nphotons(self, n)
Set number of photons per subap.
Definition: PWFS.py:1164
def get_altna(self)
Get the corresponding altitude.
Definition: PWFS.py:898
def get_gsmag(self)
Get the magnitude of guide star.
Definition: PWFS.py:601
def get_nPupils(self)
Get the number of pupil images.
Definition: PWFS.py:262
def set_npix(self, n)
Set the number of pixels per subap.
Definition: PWFS.py:285
def get_nphotons(self)
Get number of photons per subap.
Definition: PWFS.py:1157
def get_subapd(self)
Get the subap diameter (m)
Definition: PWFS.py:1195
def get_pyr_cy(self)
Get the y position of modulation points for pyramid sensor.
Definition: PWFS.py:846
def set_hrmap(self, data)
TODO docstring.
Definition: PWFS.py:1399
def get_nphotons4imat(self)
Get the desired numner of photons used for doing imat.
Definition: PWFS.py:649
def get_validsub(self)
Return both validsubsx and validsubsy.
Definition: PWFS.py:1074
def set_lltx(self, l)
Set the x position of llt.
Definition: PWFS.py:704
def set_G(self, G)
Set the magnifying factor.
Definition: PWFS.py:480
def get_validpuppixy(self)
TODO docstring.
Definition: PWFS.py:1476
def get_pixsize(self)
Get the pixel size.
Definition: PWFS.py:294
def get_ftbeam(self)
TODO docstring.
Definition: PWFS.py:1379
def get_ypos(self)
Get the guide star y position on sky.
Definition: PWFS.py:457
def get_pyr_compute_focalplane(self)
Get the status of the pyramid wfs focal plane computation.
Definition: PWFS.py:996
def set_altna(self, a)
Set the corresponding altitude.
Definition: PWFS.py:905
def get_ttprojmat(self)
Get the TT subaperture projection matrices for this WFS.
Definition: PWFS.py:1443
def get_beamsize(self)
Get the laser beam fwhm on-sky.
Definition: PWFS.py:745
def get_maxFluxPerPix(self)
Get the max_flux_per_pix.
Definition: PWFS.py:553
def get_hrmap(self)
TODO docstring.
Definition: PWFS.py:1394
def get_dy(self)
Get the Y axis misalignment.
Definition: PWFS.py:521
def set_fssize(self, f)
Set the size of field stop.
Definition: PWFS.py:400
def get_profna(self)
Get the sodium profile.
Definition: PWFS.py:917
def get_pyr_npts(self)
Get the total number of point along modulation circle.
Definition: PWFS.py:777
def set_atmos_seen(self, i)
Tells if the wfs sees the atmosphere layers.
Definition: PWFS.py:432
def set_Ntot(self, n)
Set the size of hr image for a subap.
Definition: PWFS.py:1107
def set_pyr_pos(self, data)
TODO docstring.
Definition: PWFS.py:1516
def set_thetaML(self, thetaML)
Set the rotation angle in the pupil.
Definition: PWFS.py:496
def set_max_pix_value(self, max_pix_value)
Set the max_pix_value.
Definition: PWFS.py:576
def set_fakecam(self, fakecam)
Set the fakecam flag.
Definition: PWFS.py:544
def get_optthroughput(self)
Get the wfs global throughput.
Definition: PWFS.py:345
def get_dms_seen(self)
Get the index of dms seen by the WFS.
Definition: PWFS.py:865
def get_laserpower(self)
Get the laser power.
Definition: PWFS.py:681
def get_lltx(self)
Get the x position of llt.
Definition: PWFS.py:697
def get_beam(self)
TODO docstring.
Definition: PWFS.py:1364
def set_pyr_pup_sep(self, pyr_pup_sep)
Set the pyramid pupil separation.
Definition: PWFS.py:977
def set_pyr_ampl(self, p)
Set the pyramid wfs modulation amplitude radius.
Definition: PWFS.py:768
def get_pyr_ampl(self)
Get the pyramid wfs modulation amplitude radius.
Definition: PWFS.py:761
def set_nPupils(self, n)
Set the number of pupil images.
Definition: PWFS.py:269
def get_atmos_seen(self)
Gells if the wfs sees the atmosphere layers.
Definition: PWFS.py:425
def set_llty(self, l)
Set the y position of llt.
Definition: PWFS.py:720
def set_gsmag(self, g)
Set the magnitude of guide star.
Definition: PWFS.py:608
def get_xpos(self)
Get the guide star x position on sky.
Definition: PWFS.py:441
def get_llty(self)
Get the y position of llt.
Definition: PWFS.py:713
def set_halfxy(self, data)
TODO docstring.
Definition: PWFS.py:1274
def get_noise(self)
Get the desired noise.
Definition: PWFS.py:633
def set_pdiam(self, n)
Set the subap diameter in pixels.
Definition: PWFS.py:1145
def set_ftkernel(self, data)
TODO docstring.
Definition: PWFS.py:1242
def set_dy(self, dy)
Set the Y axis misalignment.
Definition: PWFS.py:528
def get_proftype(self)
Get the type of sodium profile.
Definition: PWFS.py:729
def get_azimuth(self)
TODO docstring.
Definition: PWFS.py:1317
def get_halfxy(self)
TODO docstring.
Definition: PWFS.py:1269
def set_pyr_loc(self, p)
Set the location of modulation.
Definition: PWFS.py:802
def get_npix(self)
Get the number of pixels per subap.
Definition: PWFS.py:278
def set_pyr_npts(self, p)
Set the total number of point along modulation circle.
Definition: PWFS.py:784
def set_profna(self, p)
Set the sodium profile.
Definition: PWFS.py:924
def set_is_low_order(self, is_low_order)
Set the low order flag : if True, WFS arrays will not be mutualised.
Definition: PWFS.py:961
def set_azimuth(self, data)
TODO docstring.
Definition: PWFS.py:1322
def get_sincar(self)
TODO docstring.
Definition: PWFS.py:1253
None set_pyr_misalignments(self, np.ndarray misalignments)
Definition: PWFS.py:986
def get_dx(self)
Get the X axis misalignment.
Definition: PWFS.py:505
def set_pyr_weights(self, data)
TODO docstring.
Definition: PWFS.py:1529
def get_lgskern(self)
TODO docstring.
Definition: PWFS.py:1301
def set_pyrtype(self, p)
Set the type of pyramid,.
Definition: PWFS.py:818
def set_sincar(self, data)
TODO docstring.
Definition: PWFS.py:1258
def set_open_loop(self, o)
Set the loop state (open or closed)
Definition: PWFS.py:384
def get_thetaML(self)
Get the rotation angle in the pupil.
Definition: PWFS.py:489
def set_type(self, typewfs)
Set the type of wfs.
Definition: PWFS.py:237
def set_submask(self, data)
TODO docstring.
Definition: PWFS.py:1290
def set_ypos(self, y)
Set the guide star y position on sky.
Definition: PWFS.py:464
def set_validpuppixx(self, data)
TODO docstring.
Definition: PWFS.py:1466
def get_validpuppixx(self)
TODO docstring.
Definition: PWFS.py:1461
def set_dms_seen(self, dms_seen)
Set the index of dms seen by the WFS.
Definition: PWFS.py:872
def set_noise(self, n)
Set the desired noise.
Definition: PWFS.py:640
def get_ftkernel(self)
TODO docstring.
Definition: PWFS.py:1237
def set_nrebin(self, n)
Set the rebin factor from hr to binned image for a subap.
Definition: PWFS.py:1126
def set_prof1d(self, data)
TODO docstring.
Definition: PWFS.py:1338
def get_pyr_scale_pos(self)
Get the pixel size.
Definition: PWFS.py:310
def get_Nfft(self)
Get the size of FFT support for a subap.
Definition: PWFS.py:1081
def get_lgsreturnperwatt(self)
Get the return per watt factor.
Definition: PWFS.py:882
def set_validsubsy(self, vy)
Set the valid subapertures along Y-axis.
Definition: PWFS.py:1059
def get_phasemap(self)
TODO docstring.
Definition: PWFS.py:1425
def get_pyr_pos(self)
TODO docstring.
Definition: PWFS.py:1511
def set_fluxPerSub(self, data)
Set the subap diameter (m)
Definition: PWFS.py:1221
def set_kernel(self, k)
Set the attribute kernel.
Definition: PWFS.py:672
def set_optthroughput(self, o)
Set the wfs global throughput.
Definition: PWFS.py:352
def get_pyr_weights(self)
TODO docstring.
Definition: PWFS.py:1524
def get_binmap(self)
TODO docstring.
Definition: PWFS.py:1409
def get_pdiam(self)
Get the subap diameter in pixels.
Definition: PWFS.py:1138
def set_xpos(self, x)
Set the guide star x position on sky.
Definition: PWFS.py:448
def set_validsubsx(self, vx)
Set the valid subapertures along X-axis.
Definition: PWFS.py:1037
def set_pyr_cx(self, cx)
Set the x position of modulation points for pyramid sensor.
Definition: PWFS.py:834
def get_nrebin(self)
Get the rebin factor from hr to binned image for a subap.
Definition: PWFS.py:1119
def get_open_loop(self)
Get the loop state (open or closed)
Definition: PWFS.py:377
def set_beamsize(self, b)
Set the laser beam fwhm on-sky.
Definition: PWFS.py:752
def get_pyr_loc(self)
Get the location of modulation.
Definition: PWFS.py:794
def get_validsubsy(self)
Get the valid subapertures along Y-axis.
Definition: PWFS.py:1052
def get_prof1d(self)
TODO docstring.
Definition: PWFS.py:1333
def get_pyr_cx(self)
Get the x position of modulation points for pyramid sensor.
Definition: PWFS.py:827
def get_pyr_pup_sep(self)
Get the pyramid pupil separation.
Definition: PWFS.py:970
def get_submask(self)
TODO docstring.
Definition: PWFS.py:1285
def set_binmap(self, data)
TODO docstring.
Definition: PWFS.py:1414
def set_dx(self, dx)
Set the X axis misalignment.
Definition: PWFS.py:512
def get_fssize(self)
Get the size of field stop.
Definition: PWFS.py:393
def set_roket(self, roket)
Set the error budget flag : if True, enable error budget analysis for this simulation.
Definition: PWFS.py:945
def get_is_low_order(self)
Get the low order flag : if True, WFS arrays will not be mutualised.
Definition: PWFS.py:954
def set_lgskern(self, data)
TODO docstring.
Definition: PWFS.py:1306
def set_ftbeam(self, data)
TODO docstring.
Definition: PWFS.py:1384
def set_Lambda(self, L)
Set the observation wavelength.
Definition: PWFS.py:336
def set_nxsub(self, n)
Set the linear number of subaps.
Definition: PWFS.py:253
def get_validsubsx(self)
Get the valid subapertures along X-axis.
Definition: PWFS.py:1030
def set_qpixsize(self, n)
Set the quantum pixel size for the simulation.
Definition: PWFS.py:1183
def set_isvalid(self, data)
Set the valid subapertures array.
Definition: PWFS.py:1500
def set_validpuppixy(self, data)
TODO docstring.
Definition: PWFS.py:1481
def set_laserpower(self, l)
Set the laser power.
Definition: PWFS.py:688
def get_nvalid(self)
Get the number of valid subapertures.
Definition: PWFS.py:1011
def get_roket(self)
Get the error budget flag : if True, enable error budget analysis for this simulation.
Definition: PWFS.py:937
def __init__(self, roket=False)
Definition: PWFS.py:49
def get_type(self)
Get the type of wfs.
Definition: PWFS.py:230
def set_pyr_cy(self, cy)
Set the y position of modulation points for pyramid sensor.
Definition: PWFS.py:853
def get_Ntot(self)
Get the size of hr image for a subap.
Definition: PWFS.py:1100
def set_fstop(self, f)
Set the size of field stop.
Definition: PWFS.py:416
def set_profcum(self, data)
TODO docstring.
Definition: PWFS.py:1354
def set_subapd(self, n)
Set the subap diameter (m)
Definition: PWFS.py:1202
Numerical constants for shesha and config enumerations for safe-typing.
Definition: constants.py:1