Spaces:
Sleeping
Sleeping
Update zern_generator.py
Browse files- zern_generator.py +2 -1
zern_generator.py
CHANGED
|
@@ -36,6 +36,7 @@ def generate_zern_wavefront_fig(resolution, *zerns):
|
|
| 36 |
|
| 37 |
|
| 38 |
def generate_batch(resolution):
|
|
|
|
| 39 |
ddx = np.linspace(*span, resolution)
|
| 40 |
ddy = np.linspace(*span, resolution)
|
| 41 |
xv, yv = np.meshgrid(ddx, ddy)
|
|
@@ -51,7 +52,7 @@ def generate_batch(resolution):
|
|
| 51 |
zern = [0] * (zern_index - 1) + [1]
|
| 52 |
ax = plt.subplot2grid((5, 6), (i, j))
|
| 53 |
Phi = generate_zern_wavefront(xv, yv, zern)
|
| 54 |
-
ax.set_title(f"Zernike {zern_index-1}")
|
| 55 |
ax.imshow(Phi, extent=(*span, *span), cmap='gray')
|
| 56 |
|
| 57 |
zern_index += 1
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
def generate_batch(resolution):
|
| 39 |
+
term = ["PISTON","V-TILT","H-TILT","DEFOCUS0","O-PR.ASTIGMATISM","V-PR.ASTIGMATISM","V-PR.COMA","H-PR.COMA","V-TREFOIL","O-TREFOIL","P-SPHERICAL","O-SC.ASTIGMATISM","V-SC.ASTIGMATISM","V-QUADRAFOIL","O-QUADRAFOIL","V-SC.COMA","H-SC.COMA","V-SC-TREFOIL","O-SC-TREFOIL","O-PENTAFOIL","V-PENTAFOIL"]
|
| 40 |
ddx = np.linspace(*span, resolution)
|
| 41 |
ddy = np.linspace(*span, resolution)
|
| 42 |
xv, yv = np.meshgrid(ddx, ddy)
|
|
|
|
| 52 |
zern = [0] * (zern_index - 1) + [1]
|
| 53 |
ax = plt.subplot2grid((5, 6), (i, j))
|
| 54 |
Phi = generate_zern_wavefront(xv, yv, zern)
|
| 55 |
+
ax.set_title(f"Zernike {zern_index-1} \n {term[i]} ")
|
| 56 |
ax.imshow(Phi, extent=(*span, *span), cmap='gray')
|
| 57 |
|
| 58 |
zern_index += 1
|