Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poppy Utility Functions Issues #492

Open
MTLeist255 opened this issue Feb 9, 2022 · 2 comments
Open

Poppy Utility Functions Issues #492

MTLeist255 opened this issue Feb 9, 2022 · 2 comments

Comments

@MTLeist255
Copy link

MTLeist255 commented Feb 9, 2022

Greetings, I am attempting to use the following functions 'display_ee, radial_profile, display_profiles' to measure and display the FWHM, radial profile, and encircled energies of a few model inputs and have run into the following issues I was hoping to get some help in resolving.

  1. display_ee: Not displaying radial percentages and values, unable to add a title

Screen Shot 2022-02-09 at 9 39 30 AM

Here is the line of code I am calling to create this plot: display_ee(residual, overplot = False, mark_levels = True)
  1. radial_profiles: not populating at all

Screen Shot 2022-02-09 at 9 40 10 AM

Here is the line of code I am calling to create this plot: radial_profile(residual, ee = False, stddev = True)
  1. display_profiles: not measuring(displaying?) correct FWHM measurements (I am measuring a 2D-Gaussian I created with a known FWHM of 2), not displaying radial percentages and values for the encircled energy, and not including title

Screen Shot 2022-02-09 at 9 41 23 AM

Here is the line of code I am calling to create this plot: display_profiles(residual, overplot = False, center = position2, title='FWHM Test'), position2 = centroid_quadratic(data)

I am curious if I am attempting to measure an incorrectly formatted FITS file and if this is the reason I am receiving my errors. I've searched for online examples using these utility functions and documentation to help address these issues I am having. I've found the source code here https://www.stsci.edu/~mperrin/software/poppy_prerelease/_modules/poppy/utils.html but not a lot of examples. Is there a repository somewhere with examples on the proper ways to format your FITS file to be read by these utilities, with different examples demonstrating their capabilities?

Best Regards,
Mason

@mperrin
Copy link
Collaborator

mperrin commented Feb 16, 2022

Hi Mason, Thanks for the issue report. Apologies for not having time to respond right now - right now all of us who develop & maintain poppy are excitingly busy commissioning a 6.5 meter space telescope. Thanks for your understanding and patience!

For examples of how to format FITS files, you can look at any of the output PSF files as produced by poppy itself. Looking at your plots above it seems to me you probably have not normalized your PSFs. The utility functions in general expect the PSF to be in units normalized to total intensity = 1.0. That may be part of the issue you're having.

@MTLeist255
Copy link
Author

Hi mperrin, I was wondering if there is an updated version of this code available? I've normalized my PSFs to a total intensity = 1.0, but am having trouble returning accurate FWHM measurements in the presence of noise. This tool works well if measuring the radial profile, encircled energy and FWHM of a WebbPSF generated image, but fails when trying to measuring a MIRISim simulated image. I was wondering what advice you could give to help solve this problem?
Regards, Mason Leist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants