Skip to content

Commit dd0a2c3

Browse files
ready for tag
1 parent 52458c7 commit dd0a2c3

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

sealrtc/optics/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def make_optics():
1212
mode = "simulation"
1313

1414
print(f"SEAL Real-Time Controller running in {mode} mode.")
15+
return optics
1516

1617
from .flatten import flatten
1718
from .align import align

sealrtc/optics/align.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def applytiptilt(amptip,amptilt,bestflat=bestflat): #amp is the P2V in DM units
5454
cenmaskradmax, cenmaskradmin = 49, 10 #mask radii for central lobe, ignoring central part where the pinhole PSF is (if not ignored, this would bias the alignment algorithm)
5555
cenmaskind = np.where(
5656
np.logical_and(
57-
cenmaskrho < cenmaskradmax,cenmaskrho > cenmaskradmin
57+
cenmaskrho < cenmaskradmax,
58+
cenmaskrho > cenmaskradmin
5859
)
5960
)
6061
cenmask[cenmaskind] = 1
@@ -73,7 +74,7 @@ def applytiptilt(amptip,amptilt,bestflat=bestflat): #amp is the P2V in DM units
7374
cenfraction=np.sum(mtfopt[cenmaskind])/np.sum(mtfopt)
7475
ttoptarr[i,j]=sidefraction+0.1/cenfraction #the factor of 0.01 is a relative weight; because we only expect the fringe visibility to max out at a few %, this attempts to give equal weight to both terms
7576

76-
medttoptarr = median_filter(ttoptarr, 3) #smooth out hot pizels, attenuating noise issues
77+
medttoptarr = median_filter(ttoptarr, 3) #smooth out hot pixels, attenuating noise issues
7778
indopttip, indopttilt = np.where(
7879
medttoptarr == np.max(medttoptarr)
7980
)
@@ -94,7 +95,7 @@ def applytiptilt(amptip,amptilt,bestflat=bestflat): #amp is the P2V in DM units
9495
cenfraction = np.sum(mtfopt[cenmaskind])/np.sum(mtfopt)
9596
ttoptarr1[i,j] = sidefraction+0.1/cenfraction
9697

97-
medttoptarr1 = median_filter(ttoptarr1, 3) #smooth out hot pizels, attenuating noise issues
98+
medttoptarr1 = median_filter(ttoptarr1, 3) #smooth out hot pixels, attenuating noise issues
9899
indopttip1, indopttilt1 = np.where(medttoptarr1 == np.max(medttoptarr1))
99100
applytiptilt(tipamparr[indopttip1][0],tiltamparr[indopttilt1][0])
100101

sealrtc/optics/flatten.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ def vcmd(rcond): #view the reconstructed DM commands, making sure that waffle mo
127127
#ds9.view(np.flipud(cmd.reshape(dmcini.shape)))
128128

129129
#reference slopes from commented out code above preamble
130-
refslopes=np.load(joindata('refslopes/refSlopes4ALPAOflat.npy'))
130+
refslopes=np.load(joindata("refslopes", "refSlopes4ALPAOflat.npy"))
131131

132132
rcond=3e-1
133-
cmd_mtx=np.linalg.pinv(IM,rcond=rcond)
133+
cmd_mtx = np.linalg.pinv(IM, rcond=rcond)
134134
numiter=20 #convergence seems around this many iterations for a gain of 0.5
135135
gain=0.5
136136
leak=1

sealrtc/optics/optics.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def set_process_vars(self):
7171
for (i, (n, m)) in enumerate(nmarr):
7272
self.zernarr[i] = self.funz(n, m)[self.indap]
7373

74-
7574
self.make_im_cm()
7675

7776
def processim(self, imin): #process SCC image, isolating the sidelobe in the FFT and IFFT back to the image

0 commit comments

Comments
 (0)