Skip to content

Commit b55e356

Browse files
fix bug with phase pixel scale
1 parent 5779e44 commit b55e356

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

soapy/DM.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def makeIMat(self, callback=None):
173173
# Send the DM shape off to the relavent WFS. put result in iMat
174174
iMat[i, subap: subap + (2*self.wfss[nWfs].activeSubaps)] = (
175175
-1*self.wfss[nWfs].frame(
176-
phs, correction=self.dmShape))/self.dmConfig.iMatValue
176+
phs, correction=self.dmShape, iMatFrame=True))/self.dmConfig.iMatValue
177177

178178
if callback != None:
179179
callback()

soapy/lineofsight.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,13 @@ def findMetaPupilSizes(self, GSHeight):
171171
GSHeight (float): The height of the GS in metres
172172
173173
Returns:
174-
dict : A dictionary containing the radii of a meta-pupil at each screen height
174+
dict : A dictionary containing the radii of a meta-pupil at each screen height in phase pixels
175175
'''
176176

177177
radii = {}
178178
for i in xrange(self.atmosConfig.scrnNo):
179-
radii[i] = self.calcMetaPupilSize(self.atmosConfig.scrnHeights[i], GSHeight)
179+
radii[i] = self.simConfig.pxlScale * self.calcMetaPupilSize(
180+
self.atmosConfig.scrnHeights[i], GSHeight)
180181

181182
return radii
182183

@@ -190,7 +191,7 @@ def calcMetaPupilSize(self, scrnHeight, GSHeight):
190191
GSHeight (float): Altitude of guide star
191192
192193
Returns:
193-
float: Radius of metapupil
194+
float: Radius of metapupil in metres
194195
195196
"""
196197
# If GS at infinity, radius is telescope radius
@@ -203,7 +204,7 @@ def calcMetaPupilSize(self, scrnHeight, GSHeight):
203204

204205
# Find radius of metaPupil geometrically (fraction of pupil at
205206
# Ground Layer)
206-
radius = (self.simConfig.pupilSize/2.) * (1-(float(scrnHeight)/GSHeight))
207+
radius = (self.soapyConfig.tel.telDiam/2.) * (1-(float(scrnHeight)/GSHeight))
207208

208209

209210

0 commit comments

Comments
 (0)