Commit e0db6e35 authored by Romain Fetick's avatar Romain Fetick
Browse files

add squared correction area and Papyrus instrument

parent 0b52ded5
[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
......@@ -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
......
......@@ -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.)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment