JuliaAstro / JuliaAstro/PSFModels.jl

[bug] model does not fit correctly when the image is not normalized

Open
#11 4 comments 0 reactions 0 assignees View on GitHub

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:
unnormalized_bead

and the fitted gaussian PSF model gives:
unnormalized_fit

When I normalize the bead image by

bead .-= minimum(bead)
bead ./= maximum(bead)

then the image looks like this:
normalized_bead

and the fitted gaussian PSF model looks like this:
normalized_fit

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:
unnormalized_fit_with_amp

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.