Giter Club home page Giter Club logo

Comments (3)

ehpor avatar ehpor commented on August 11, 2024

My original plan for this was to have a Propagator child class that did this, without any function like the one you propose. That class would decide on the propagator to use based on its input wavefront (including the pilot Gaussian beam). It would internally use the FresnelPropagator and FraunhoferPropagator to propagate from plate to spherical and spherical to plane (via the waist of the Gaussian beam). Why do you need your proposed function? It avoids the need for internal storage of the propagators, but it complicates user code.

FYI, something related: I'd like to revert to the old way of doing the agnostic optical elements. I realize now that having the optical element be agnostic to input grid was a mistake and overcomplicates things. I'm currently using an intermediate solution myself, where the input grid and future Gaussian beam are fixed after (lazy) initialization, but optical elements should still be able to handle input wavefronts with different wavelengths. That has worked out so far, and I aim to push that after SPIE (and my holiday). It simplifies internal hcipy code, especially for the planned multi-backend support, and is almost equivalent for user code.

I wholeheartedly agree with never renaming classes. Having aliases however is always an option.

from hcipy.

syhaffert avatar syhaffert commented on August 11, 2024

A child class works for me too. The planar to spherical (and vice-versa propagation) is a bit different from the Fraunhofer propagation, right? It's factor * quadratic_phase(output_grid) * Fourier Transform{ quadratic_phase(input_grid) }.
The quadratic phases have to be added and the spatial frequency sampling is different? Or is the sampling equal if the propagation distance is chosen instead of the focal length?

Yeah I think the current agnostic implementation is indeed a little bit over engineered.

from hcipy.

philhinzatucsc avatar philhinzatucsc commented on August 11, 2024

Just writing to say that this would be a very nice feature enhancement for HCIpy. I use but dislike the ZEMAX Physical Optics Propagation, and was playing around with HCIpy to see whether it could provide an alternative. I am looking for something that can model the surface errors from optics, and estimate the PSF for a realistic optical system (in this case, Keck AO + SCALES). Unless I am missing something this is not possible to do (easily? at all?) since much of the propagation I will want to model is in non-collimated space.

Great tool, otherwise - by the way.

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.