Comments (2)
I added a function to do this in b02a394, but generalized to any actuator basis so that it also works on non-segmented DMs. Example usage code below.
from hcipy import *
import matplotlib.pyplot as plt
import numpy as np
pupil_grid = make_pupil_grid(512)
num_rings = 5
segment_positions = make_hexagonal_grid(0.5 / num_rings * np.sqrt(3) / 2, num_rings)
aperture, segments = make_segmented_aperture(hexagonal_aperture(0.5 / num_rings - 0.003, np.pi / 2), segment_positions, return_segments=True)
aperture = evaluate_supersampled(aperture, pupil_grid, 2)
segments = evaluate_supersampled(segments, pupil_grid, 2)
imshow_field(aperture, cmap='gray')
label_actuator_centroid_positions(segments)
plt.show()
from hcipy.
Another general example for a tilted DM:
from hcipy import *
import matplotlib.pyplot as plt
import numpy as np
pupil_grid = make_pupil_grid(512)
inf = make_gaussian_influence_functions(pupil_grid, 11, 0.8 / 11, y_tilt=np.radians(25), z_tilt=np.radians(10))
# Display waffle pattern on DM
imshow_field(inf.linear_combination((-1)**(np.arange(len(inf)))), cmap='RdBu')
label_actuator_centroid_positions(inf)
plt.show()
from hcipy.
Related Issues (20)
- Deterministic atmospheric phase screens #173 HOT 2
- 'gaussian_mode' is not defined HOT 8
- Is it possible to remove specific modes in atmospher layer using HCIPy? HOT 4
- Add a function to pad regularly-spaced grids HOT 4
- Observing a Satellite (e.g. ISS) HOT 2
- `utcnow` is deprecated in Python 3.12
- Add support for Python 3.11.
- Drop support for Python 3.7. HOT 1
- The random function in the deformable mirror is not functioning properly HOT 2
- Matplotlib 3.7 `get_cmap()` deprecation warning
- Numpy 1.25 deprecation warning
- Imageio v3 API changes.
- Add support for Python 3.12.
- Add support for geometric operations
- pip install hcipy not complete? HOT 2
- Add grid indexing support when indexing or slicing a Field HOT 2
- docstring error in FraunhoferPropagator (?) HOT 2
- Non ideal optics to emulate manufacturing errors?
- FraunhoferPropagator total power not conserved HOT 6
- User Settable Number of Cores HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hcipy.