![]() |
COMPASS
5.0.0
End-to-end AO simulation tool using GPU acceleration
|
Functions | |
def | psf_rec_Vii (filename, err=None, fitting=True, covmodes=None, cov=None) |
PSF reconstruction using Vii functions with GPU acceleration. More... | |
def | psf_rec_vii_cpu (filename) |
PSF reconstruction using Vii functions (CPU version) More... | |
def | test_Vii (filename) |
def | add_fitting_to_psf (filename, otf, otffit) |
Compute the PSF including the fitting OTF. More... | |
def | intersample (Cvvmap, pupilImage, IFImage, pixscale, dactu, lambdaIR) |
res = intersample( Cvvmap, pupilImage, IFImage, pixscale, dactu, lambdaIR) More... | |
Variables | |
gpudevices = np.array([0, 1, 2, 3], dtype=np.int32) | |
c = carmaWrap_context.get_instance_ngpu(gpudevices.size, gpudevices) | |
def guardians.gamora.add_fitting_to_psf | ( | filename, | |
otf, | |||
otffit | |||
) |
Compute the PSF including the fitting OTF.
:parameters: otf (np.ndarray[ndim=2, dtype=np.float32]): OTF otffit (np.ndarray[ndim=2, dtype=np.float32]): Fitting error OTF :return: psf (np.ndarray[ndim=2, dtype=np.float32]): PSF
def guardians.gamora.intersample | ( | Cvvmap, | |
pupilImage, | |||
IFImage, | |||
pixscale, | |||
dactu, | |||
lambdaIR | |||
) |
res = intersample( Cvvmap, pupilImage, IFImage, pixscale, dactu, lambdaIR)
Cvvmap is the 'map' of the Cvv matrix (cov matrix of tomo error expressed on volts). The "volts" unit must be used together with the influence function funcInflu(x,y,dm.x0) expressed in meters.
Then, the result of intersample is in meter^2.
<Cvvmap> : output of Cvvmap=getMap(Cvv) <pupilImage> : pupil image, of size (N,N), shall be properly zero-padded, ready for FFT <IFImage> : image of influence function of 1 actu. Same support as pupilImage, same sampling. <pixscale> : size of pixel (in pupil space, meters) of pupilImage and IFImage <dactu> : inter-actuator pitch in pupil space (meters) <lambdaIR> : in microns
Units of IFImage and Cvvmap shall be such that the product of Cvvmap numbers and IFImage^2 is microns^2
SEE getMap() # pour test/debug : N = 1024 D=39. npup=300 pixscale = D/npup dactu = 4*pixscale x=(np.arange(N)-N/2)*pixscale x,y = np.meshgrid(x,x,indexing='ij') r2=(x**2+y**2) IFImage = np.exp(-1.5* r2 / dactu**2) pupilImage = generateEeltPupilReflectivity(1., N, 0.53, N/2, N/2, pixscale, 0.03, -10., softGap=1) Nactu = int(np.round(D/dactu))+1 ncov = 2*Nactu+1 x=np.arange(ncov)-Nactu x,y = np.meshgrid(x,x,indexing='ij') r=np.sqrt(x**2+y**2) Cvvmap = np.exp(-r/3) Cvvmap = np.zeros((ncov, ncov)) Cvvmap[Nactu, Nactu]=1.
Definition at line 257 of file gamora.py.
def guardians.gamora.psf_rec_Vii | ( | filename, | |
err = None , |
|||
fitting = True , |
|||
covmodes = None , |
|||
cov = None |
|||
) |
PSF reconstruction using Vii functions with GPU acceleration.
:parameters: filename (str): path to the ROKET file err (np.ndarray[ndim=2, dtype=np.float32]): (optionnal) Buffers of command error fitting (bool): (optional) Add the fitting error to the PSF or not (True by default) covmodes (np.ndarray[ndim=2, dtype=np.float32]): (optionnal) Error covariance matrix in the modal space cov (np.ndarray[ndim=2, dtype=np.float32]): (optionnal) Error covariance matrix in the DM space
:return: otftel (np.ndarray[ndim=2, dtype=np.float32]): OTF of the perfect telescope otf2 (np.ndarray[ndim=2, dtype=np.float32]): OTF due to residual phase error psf (np.ndarray[ndim=2, dtype=np.float32]): LE PSF gpu (Gamora): Gamora GPU object (for manipulation and debug)
Definition at line 39 of file gamora.py.
def guardians.gamora.psf_rec_vii_cpu | ( | filename | ) |
PSF reconstruction using Vii functions (CPU version)
:parameters: filename (str): path to the ROKET file
:return: otftel (np.ndarray[ndim=2, dtype=np.float32]): OTF of the perfect telescope otf2 (np.ndarray[ndim=2, dtype=np.float32]): OTF due to residual phase error psf (np.ndarray[ndim=2, dtype=np.float32]): LE PSF
Definition at line 108 of file gamora.py.
def guardians.gamora.test_Vii | ( | filename | ) |
guardians.gamora.c = carmaWrap_context.get_instance_ngpu(gpudevices.size, gpudevices) |