Solved

Estimate PSF over the entire image plane

  • 7 November 2023
  • 9 replies
  • 111 views

Hello Experts,

 

is there a way to simulate/evaluate the PSF distribution ove the image plane?

I would like to use the PSF distribution to convolve images and create output images for which i need the PSF distribution over the image plane.

I tried to create grid field positions and then extracting the Huygens PSF in txt format then combining them together to form a consolidated PSF of the image plane. Is that the right way to go?

The grid positions created here is only a quarter of the entire FOV with the idea that i can later mirror them to create the PSF for the entire image plane because the lens is symmetric.

 

Best regards,
Amit

icon

Best answer by David.Nguyen 7 November 2023, 17:57

View original

9 replies

Userlevel 7
Badge +2

Hi @Amit,

 

Is there a reason why you don’t use the Analyze..Extended Scene Analysis..Image Simulation? The Help File for Image Simulation reads:

This feature simulates the formation of images by convolving a source bitmap file with an array of Point Spread Functions

 

Image Simulation uses the Huygens PSF when the Aberrations settings is Diffraction. You also have a setting Show As that you can set to PSF grid, if that helps.

PS: this might be relevant as well

https://support.zemax.com/hc/en-us/articles/1500005486701-How-to-simulate-high-resolution-images

Take care,

 

David

Hi David,

 

Thanks for the response.

 

Couple of reasons:

The image simulation with specific sensor settings take a lot of time. The goal is to generate at set of images for multiple tasks, object detection being one of those.

 

If I can generate the PSF distribution, I can use python to quicken the process (or so I assume). With that I can generate larger dataset for a statistical analysis.

 

In the end, approaches like machine learning would need large datasets which becomes difficult with the time image simulation takes and there are no other ways that I could think of, to produce images that would be a close reprensatation of how the output of the lens would be.

 

Best,

Amit

Userlevel 3
Badge

A simple way is to create zpl macro or ZOS-API script to scan over the field and get PSF in each point.

Hi Andrey,

 

A simple way is to create zpl macro or ZOS-API script to scan over the field and get PSF in each point.

 

I was thinking of that, hence the creation of field point grid. But i was wondering if there was a more elegant way of doing that. I was more intrigued by this question because if there is a “MTF Map” option that can be calculated there should be a PSF Map somehow being calculated in the background.

 

Thanks,

Amit

Userlevel 3
Badge

Hi Andrey,

 

A simple way is to create zpl macro or ZOS-API script to scan over the field and get PSF in each point.

 

I was thinking of that, hence the creation of field point grid. But i was wondering if there was a more elegant way of doing that. I was more intrigued by this question because if there is a “MTF Map” option that can be calculated there should be a PSF Map somehow being calculated in the background.

 

Thanks,

Amit

You can create a set of small dots and do Image simulation on it. So you will have a set of PSFs via field in a single file.

You can create a set of small dots and do Image simulation on it. So you will have a set of PSFs via field in a single file.

But that would just give a qualitative estimation of the PSF.

I want PSF data (as in the intensity distribution as a txt file) so that i can later use it to convolve image in python and produce output same as the image simulation process in ZEMAX. This because, the image simulation process in ZEMAX is slow and generating large datasets would be very difficult.

Userlevel 3
Badge

If you set a lot of pixels you can translate image to txt after the simulation. 

 

But the simplest and direct way is a zpl or ZOS-API. I did such script before.

If you set a lot of pixels you can translate image to txt after the simulation. 

 

But the simplest and direct way is a zpl or ZOS-API. I did such script before.

Do you mean a script for generating PSF from different field points? I have such a script for extracting the PSFs for different field point. Then i have to combine them and form the PSF distribution over the image plane (all in python).

Or do you mean a script for image simulation and translating it to a txt?

Userlevel 3
Badge

I have a script for generating PSF from different field points

Reply