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
e0db6e35
Commit
e0db6e35
authored
Jun 28, 2022
by
Romain Fetick
Browse files
add squared correction area and Papyrus instrument
parent
0b52ded5
Changes
3
Hide whitespace changes
Inline
Side-by-side
maoppy/data/papyrus.ini
0 → 100644
View file @
e0db6e35
[metadata]
; Tag
tag
=
papyrus
; Human readable name
name
=
OHP Papyrus
[telescope]
; Primary diameter [m]
d
=
1.52
; Occultation ratio
occ
=
0.3
[ao]
; Number of effectively controlled modes across the diameter
nact
=
16
; Aliasing factor between aliased variance and fitting variance
aliasing
=
0
; Shape of the corrected area
correction_shape
=
square
[camera]
; Resolution of one pixel for ORCA camera [mas]
res_mas
=
35.7
maoppy/instrument.py
View file @
e0db6e35
...
...
@@ -56,6 +56,7 @@ class Instrument:
self
.
filters
=
{}
self
.
Nact
=
Nact
self
.
aliasing
=
0
self
.
correction_shape
=
'circle'
# or 'square'
self
.
_resolution_rad
=
res
self
.
gain
=
gain
...
...
@@ -162,6 +163,11 @@ def load_ini(pth):
# [ao]
nact
=
int
(
config
[
'ao'
][
'nact'
])
aliasing
=
float
(
config
[
'ao'
][
'aliasing'
])
correction_shape
=
'circle'
try
:
correction_shape
=
config
[
'ao'
][
'correction_shape'
]
except
:
pass
# [camera]
res_mas
=
float
(
config
[
'camera'
][
'res_mas'
])
# [filters]
...
...
@@ -178,6 +184,7 @@ def load_ini(pth):
instru
.
fullname
=
name
instru
.
filters
=
filters
instru
.
aliasing
=
aliasing
instru
.
correction_shape
=
correction_shape
return
instru
...
...
maoppy/psfmodel.py
View file @
e0db6e35
...
...
@@ -605,7 +605,13 @@ class Psfao(ParametricPSFfromPSD):
def
_computeXYarray
(
self
):
super
().
_computeXYarray
()
self
.
_maskin
=
(
self
.
_f2
<
self
.
cutoffAOfreq
**
2.
)
if
self
.
system
.
correction_shape
==
'circle'
:
self
.
_maskin
=
(
self
.
_f2
<
self
.
cutoffAOfreq
**
2.
)
elif
self
.
system
.
correction_shape
==
'square'
:
fx
,
fy
=
self
.
_fx_fy
self
.
_maskin
=
(
np
.
abs
(
fx
)
<
self
.
cutoffAOfreq
)
*
(
np
.
abs
(
fy
)
<
self
.
cutoffAOfreq
)
else
:
raise
ValueError
(
'Instrument.correction_shape must be the string `circle` or `square`.'
)
self
.
_vk
=
(
1
-
self
.
_maskin
)
*
0.0229
*
((
1.
/
self
.
lext
**
2.
)
+
self
.
_f2
)
**
(
-
11.
/
6.
)
...
...
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