Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
maoppy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LAM-GRD-public
maoppy
Commits
8de40a47
Commit
8de40a47
authored
3 years ago
by
rfetick
Browse files
Options
Downloads
Patches
Plain Diff
add script to profile Psfao computation time
parent
abafe6c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
maoppy/example/psfao_computation_time_test.py
+36
-0
36 additions, 0 deletions
maoppy/example/psfao_computation_time_test.py
with
36 additions
and
0 deletions
maoppy/example/psfao_computation_time_test.py
0 → 100644
+
36
−
0
View file @
8de40a47
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 31 17:16:53 2021
Run profiler on this script to find computation bottleneck
@author: rfetick
"""
import
matplotlib.pyplot
as
plt
import
numpy
as
np
from
maoppy.psfmodel
import
Psfao
from
maoppy.instrument
import
muse_nfm
Npix
=
128
# pixel size of PSF
wvl
=
600
*
1e-9
# wavelength [m]
niter
=
20
# number of PSF to generate
#%% Initialize PSF model
samp
=
muse_nfm
.
samp
(
wvl
)
# sampling (2.0 for Shannon-Nyquist)
Pmodel
=
Psfao
((
Npix
,
Npix
),
system
=
muse_nfm
,
samp
=
samp
)
#%% Choose parameters and compute PSF
r0
=
0.15
# Fried parameter [m]
bck
=
1e-5
# Phase PSD background [rad² m²]
amp
=
5.0
# Phase PSD Moffat amplitude [rad²]
alpha
=
0.1
# Phase PSD Moffat alpha [1/m]
ratio
=
1.2
theta
=
np
.
pi
/
4
beta
=
1.6
# Phase PSD Moffat beta power law
param
=
[
r0
,
bck
,
amp
,
alpha
,
ratio
,
theta
,
beta
]
for
i
in
range
(
niter
):
psf
=
Pmodel
(
param
,
dx
=
0
,
dy
=
0
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment