![]() |
COMPASS
5.4.4
End-to-end AO simulation tool using GPU acceleration
|
Functions | |
def | roundpupil (dim_pp, prad, center_pos='b') |
Create a circular pupil. More... | |
def | classical_lyot_fpm (rad_lyot_fpm, dim_fpm, Lyot_fpm_sampling, wav_vec) |
Create a classical Lyot coronagraph of radius rad_LyotFP. More... | |
def | make_VLT_pupil (pupdiam, centralobs=0.14, spiders=0.00625, spiders_bool=True, centralobs_bool=True) |
Return a VLT pupil based on make_VLT function from shesha/shesha/util/make_pupil.py. More... | |
def | sphere_apodizer_radial_profile (x) |
Compute the transmission radial profile of the SPHERE APO1 apodizer. More... | |
def | make_sphere_apodizer (pupdiam, centralobs=0.14, radial_profile=sphere_apodizer_radial_profile) |
Return the SPHERE APLC apodizer APO1, based on its radial transmission profile. More... | |
def | make_sphere_lyot_stop (pupdiam, centralobs=0.14, spiders=0.00625, add_centralobs=7.3/100, add_spiders=3.12/100, add_outer_edge_obs=1.8/100) |
Return the SPHERE Lyot stop. More... | |
def | ring (center, radius_min, radius_max, shape) |
Returns a ring mask. More... | |
def | compute_contrast (image, center, r_min, r_max, width) |
Computes average, standard deviation, minimum and maximum over rings at several distances from the center of the image. More... | |
def shesha.util.coronagraph_utils.classical_lyot_fpm | ( | rad_lyot_fpm, | |
dim_fpm, | |||
Lyot_fpm_sampling, | |||
wav_vec | |||
) |
Create a classical Lyot coronagraph of radius rad_LyotFP.
AUTHOR Johan Mazoyer
Returns -------
ClassicalLyotFPM_allwl list of 2D numpy arrays The FP masks at all wavelengths.
Definition at line 55 of file coronagraph_utils.py.
def shesha.util.coronagraph_utils.compute_contrast | ( | image, | |
center, | |||
r_min, | |||
r_max, | |||
width | |||
) |
Computes average, standard deviation, minimum and maximum over rings at several distances from the center of the image.
A ring includes the pixels between the following radiuses :
with k = 0, 1, 2... until r_min + k * width > r_max (excluded).
image | (2D array): the coronagraphic image |
center | (float or (float, float)): center of the coronagraphic image in pixel |
r_min | (float): radius of the first ring in pixel |
r_max | (float): maximum radius in pixel |
width | (float): width of one ring in pixel |
Definition at line 291 of file coronagraph_utils.py.
def shesha.util.coronagraph_utils.make_sphere_apodizer | ( | pupdiam, | |
centralobs = 0.14 , |
|||
radial_profile = sphere_apodizer_radial_profile |
|||
) |
Return the SPHERE APLC apodizer APO1, based on its radial transmission profile.
can be used with any profile, assuming that the radial coordinates is 0 at center and 1 at the outer edge pixel
pupdiam (int) [pixel] : pupil diameter centralobs (float, optional) [fraction of diameter] : central obtruction diameter radialProfile (function, optional) : apodizer radial transmission; default is SPHERE APO1 apodizer
Definition at line 162 of file coronagraph_utils.py.
def shesha.util.coronagraph_utils.make_sphere_lyot_stop | ( | pupdiam, | |
centralobs = 0.14 , |
|||
spiders = 0.00625 , |
|||
add_centralobs = 7.3/100 , |
|||
add_spiders = 3.12/100 , |
|||
add_outer_edge_obs = 1.8/100 |
|||
) |
Return the SPHERE Lyot stop.
default values of additional central obstruction, spiders size and outer edge obstruction have been estimated by eye on the real lyot stop WARNING this lyot stop does not feature the dead actuators patches
pupdiam (int) [pixel] : pupil diameter centralobs (float, optional) [fraction of diameter] : central obstruction diameter spiders (float, optional) [fraction of diameter] : spider diameter add_centralobs (float, optional) [fraction of diameter] : additional diameter of central obstruction add_spiders (float, optional) [fraction of diameter] : additional diameter of spiders obstruction add_outer_edge_obs (float, optional) [fraction of diameter] : outer edge obstruction size
Definition at line 195 of file coronagraph_utils.py.
def shesha.util.coronagraph_utils.make_VLT_pupil | ( | pupdiam, | |
centralobs = 0.14 , |
|||
spiders = 0.00625 , |
|||
spiders_bool = True , |
|||
centralobs_bool = True |
|||
) |
Return a VLT pupil based on make_VLT function from shesha/shesha/util/make_pupil.py.
pupdiam (int) [pixel] : pupil diameter centralobs (float, optional) [fraction of diameter] : central obtruction diameter, default = 0.14 spiders (float, optional) [fraction of diameter] : spider diameter, default = 0.00625 spiders_bool (bool, optional) : if False, return the VLT pupil without spiders; default = True centralobs_bool (bool, optional) : if False, return the VLT pupil without central obstruction; default = True
Definition at line 89 of file coronagraph_utils.py.
def shesha.util.coronagraph_utils.ring | ( | center, | |
radius_min, | |||
radius_max, | |||
shape | |||
) |
Returns a ring mask.
center | (float or (float, float)): center of the ring in pixel |
radius_min | (float): internal radius in pixel |
radius_max | (float): external radius in pixel |
shape | (int or (int, int)): shape of the image in pixel |
Definition at line 249 of file coronagraph_utils.py.
def shesha.util.coronagraph_utils.roundpupil | ( | dim_pp, | |
prad, | |||
center_pos = 'b' |
|||
) |
Create a circular pupil.
AUTHORS Axel Pottier, Johan Mazoyer 7/9/22 Modified by J Mazoyer to remove the pixel crenellation with rebin and add a better center option
dim_pp int Size of the image (in pixels) prad float Size of the pupil radius (in pixels) center_pos string (optional, default 'b') Option for the center pixel. If 'p', center on the pixel dim_pp//2. If 'b', center in between pixels dim_pp//2 -1 and dim_pp//2, for 'dim_pp' odd or even.
pupilnormal 2D array Output circular pupil
Definition at line 29 of file coronagraph_utils.py.
def shesha.util.coronagraph_utils.sphere_apodizer_radial_profile | ( | x | ) |
Compute the transmission radial profile of the SPHERE APO1 apodizer.
x is the radial coordinate inside the pupil x = 0 at the center of the pupil and x = 1 on the outer edge This profile has been estimated with a five order polynomial fit. Don't go inside the central obstruction, namely x < 0.14, as the fit is no longer reliable.
x float or array distance to the pupil center, in fraction of the pupil radius
profile float or array corresponding transmission
Definition at line 136 of file coronagraph_utils.py.