Skip to content

Commit 69e2bb9

Browse files
author
Andrew Reeves
committed
Merge pull request #58 from matthewtownson/gradientWFS
Gradient wfs
2 parents 740cde5 + 2cf543a commit 69e2bb9

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

soapy/confParse.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,6 @@ class WfsConfig(ConfigObj):
629629
``GSPosition`` tuple: position of GS on-sky in arc-secs
630630
``wavelength`` float: wavelength of GS light in metres
631631
``nxSubaps`` int: number of SH sub-apertures
632-
``pxlsPerSubap`` int: number of pixels per sub-apertures
633-
``subapFOV`` float: Field of View of sub-aperture in
634-
arc-secs
635632
================== ===================
636633
637634
Optional:
@@ -701,6 +698,10 @@ class WfsConfig(ConfigObj):
701698
system processor number. ``1``
702699
``fftwFlag`` str: Flag to pass to FFTW
703700
when preparing plan. ``FFTW_PATIENT``
701+
``pxlsPerSubap`` int: number of pixels per
702+
sub-apertures ``10``
703+
``subapFOV`` float: Field of View of
704+
sub-aperture in arc-secs ``5``
704705
=================== ================================== ===========
705706
706707
@@ -709,8 +710,6 @@ class WfsConfig(ConfigObj):
709710
requiredParams = [ "GSPosition",
710711
"wavelength",
711712
"nxSubaps",
712-
"pxlsPerSubap",
713-
"subapFOV",
714713
]
715714
optionalParams = [ ("propagationMode", "Geometric"),
716715
("fftwThreads", 1),
@@ -734,6 +733,8 @@ class WfsConfig(ConfigObj):
734733
("GSMag", 0.0),
735734
("wvlBandWidth", 100.),
736735
("extendedObject", None),
736+
("pxlsPerSubap", 10),
737+
("subapFOV", 5),
737738
]
738739

739740
# Parameters which may be Set at some point and are allowed

soapy/wfs/gradient.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ def calcFocalPlane(self, intensity=1):
105105
coord = self.simConfig.simPad
106106
self.pupilPhase = self.los.phase[coord:-coord, coord:-coord]
107107

108-
#create an array of individual subap phase
109-
for i, (x,y) in enumerate(self.subapCoords):
108+
# Create an array of individual subap phase
109+
for i, (x, y) in enumerate(self.subapCoords):
110110
self.subapArrays[i] = self.pupilPhase[
111111
x: x+self.subapSpacing, y: y+self.subapSpacing]
112112

113113

114114
def makeDetectorPlane(self):
115115
'''
116-
Creates a 'detector' image suitable
116+
Creates a 'detector' image suitable for plotting
117117
'''
118118
self.wfsDetectorPlane = numpy.zeros((self.wfsConfig.nxSubaps,)*2)
119119

0 commit comments

Comments
 (0)