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
e42f8160
Commit
e42f8160
authored
3 years ago
by
rfetick
Browse files
Options
Downloads
Patches
Plain Diff
update psfaogalpak example
parent
fe6d77e5
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/psfaogalpak.py
+25
-6
25 additions, 6 deletions
maoppy/example/psfaogalpak.py
with
25 additions
and
6 deletions
maoppy/example/psfaogalpak.py
+
25
−
6
View file @
e42f8160
...
...
@@ -2,9 +2,7 @@
"""
Created on Fri Jul 9 10:16:23 2021
Create a wrapper around Psfao for GalPak
TODO: manage odd pixels
Create a wrapper around Psfao for GalPak software
@author: rfetick
"""
...
...
@@ -19,7 +17,26 @@ class PointSpreadFunction:
class
PsfaoGalpak
(
Psfao
,
PointSpreadFunction
):
"""
Implementation of Psfao for GalPak software.
"""
def
__init__
(
self
,
param
,
wvl_um
,
system
=
None
,
Lext
=
10.
,
fixed_k
=
None
):
"""
Constructor.
Parameters
----------
param : list, tuple, np.array (of 7 elements)
Vector of parameters as defined in Psfao.
[r0,C,A,alpha,ratio,theta,beta].
wvl_um : float
The wavlength [um] corresponding to the given parameter.
A theoretical evolution of the parameters is used by default,
otherwise consider changing the parameters for each wavelength.
system : maoppy.instrument.Instrument
The AO system related to the PSF computation.
"""
npix
=
(
10
,
10
)
# will be modified in 'as_image'
samp
=
2.0
# will be modified in 'as_image'
super
().
__init__
(
npix
,
system
=
system
,
Lext
=
Lext
,
samp
=
samp
,
fixed_k
=
fixed_k
)
...
...
@@ -51,8 +68,9 @@ class PsfaoGalpak(Psfao, PointSpreadFunction):
return
self
.
__call__
(
p
,
dx
=
dx
,
dy
=
dy
)
###################################################
################### TEST SCRIPT ###################
###################################################
if
__name__
==
"
__main__
"
:
...
...
@@ -90,7 +108,7 @@ if __name__ == "__main__":
print
(
"
PSF energy = %.4f
"
%
psf
.
sum
())
# E=1 up to intfy, so E<1 on the FoV
### PLOT
### PLOT
PSF
import
matplotlib.pyplot
as
plt
from
matplotlib.colors
import
LogNorm
plt
.
figure
(
1
)
...
...
@@ -102,6 +120,7 @@ if __name__ == "__main__":
plt
.
ylabel
(
"
Y [pix]
"
)
plt
.
show
()
### PLOT PSD
# from maoppy.utils import circavg
# psd,_ = pg.psd(p0)
...
...
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