JuliaAstro / JuliaAstro/PSFModels.jl
[bug] model does not fit correctly when the image is not normalized
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 11
- Forks
- 3
- Avg merge
- 13h 59m
- Merged PRs (30d)
- 4
Description
Hi! Like your work!
There is a slight problem when trying to fit a model to bead image in practice... The optimization without specifying the amp parameter does not work with real bead images, because they are usually not normalized to (0,1). For example, I have this image of a bead:

and the fitted gaussian PSF model gives:

When I normalize the bead image by
bead .-= minimum(bead)
bead ./= maximum(bead)
then the image looks like this:

and the fitted gaussian PSF model looks like this:

Which is a much better fit.
Note, that just specifying the amp = 1 parameter would not help in this case, because it makes the optimization much more likely to land at a local optimum. This could be solved only by setting the amp parameter very close to the true value. Here is the result when optimizing against amp also with the same bead:

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing Gaussian PSF fitting with the unnormalized bead image described in the issue, then compare it with the manually normalized image and the case where amp is optimized. Investigate the fitting behavior around the amp parameter; done means unnormalized real bead images fit reliably without requiring manual normalization or an amp value tuned close to the true value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100