Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LAM-GRD-public
maoppy
Commits
a687fb96
Commit
a687fb96
authored
Nov 20, 2019
by
FETICK Romain
Browse files
Correct bug: shift undersampled PSF
parent
7aa1235b
Changes
2
Hide whitespace changes
Inline
Side-by-side
maoppy/example/create_muse_psf.py
View file @
a687fb96
...
...
@@ -29,7 +29,7 @@ beta = 1.6 # Phase PSD Moffat beta power law
param
=
[
r0
,
bck
,
amp
,
ax
,
beta
]
psf
=
Pmodel
(
param
)
psf
=
Pmodel
(
param
,
dx
=
0
,
dy
=
0
)
#%% Plot results
plt
.
figure
(
1
)
...
...
maoppy/psfmodel.py
View file @
a687fb96
...
...
@@ -392,10 +392,10 @@ class Psfao(ParametricPSF):
def
symmetric
(
self
,
value
):
self
.
_symmetric
=
value
if
not
value
:
bounds_down
=
[
_EPSILON
,
0
,
_EPSILON
,
_EPSILON
,
_EPSILON
,
-
np
.
inf
,
1
+
_EPSILON
]
bounds_down
=
[
_EPSILON
,
0
,
0
,
_EPSILON
,
_EPSILON
,
-
np
.
inf
,
1
+
_EPSILON
]
bounds_up
=
[
np
.
inf
for
i
in
range
(
7
)]
else
:
bounds_down
=
[
_EPSILON
,
0
,
_EPSILON
,
_EPSILON
,
1
+
_EPSILON
]
bounds_down
=
[
_EPSILON
,
0
,
0
,
_EPSILON
,
1
+
_EPSILON
]
bounds_up
=
[
np
.
inf
for
i
in
range
(
5
)]
self
.
bounds
=
(
bounds_down
,
bounds_up
)
...
...
@@ -508,7 +508,7 @@ class Psfao(ParametricPSF):
else
:
dlFTO
=
1.
X
,
Y
=
self
.
_shift_array
(
self
.
Npix
[
0
]
*
self
.
_k
,
self
.
Npix
[
1
]
*
self
.
_k
)
return
np
.
exp
(
-
Dphi
/
2.
)
*
dlFTO
*
np
.
exp
(
X
*
dx
+
Y
*
dy
)
return
np
.
exp
(
-
Dphi
/
2.
)
*
dlFTO
*
np
.
exp
(
X
*
dx
*
self
.
_k
+
Y
*
dy
*
self
.
_k
)
def
__call__
(
self
,
x0
,
dx
=
0
,
dy
=
0
):
"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment