[bug] model does not fit correctly when the image is not normalized
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- julia
- Domain
- computer-vision
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.
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:

- Dominant language
- Julia
- Stars
- 11
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from JuliaAstro/PSFModels.jl
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
JuliaAstro/PSFModels.jl#47 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
JuliaAstro/PSFModels.jl#12 · 3 comments ·
All issues in JuliaAstro/PSFModels.jl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
brown-ccv/Chamber.jl#272 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaAstro/SolarPosition.jl#143 ·
-
distributions
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JuliaBayes/Wren.jl#404 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaAI/MLJTransforms.jl#113 ·
Maintainers usually reply within 1 day