Giter Club home page Giter Club logo

Comments (2)

ehpor avatar ehpor commented on August 11, 2024 1

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()

actuator_locations

from hcipy.

ehpor avatar ehpor commented on August 11, 2024

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()

actuator_locations2

from hcipy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.