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

feature request: Output image background level and variance #442

Open
esheldon opened this issue Jan 10, 2024 · 8 comments
Open

feature request: Output image background level and variance #442

esheldon opened this issue Jan 10, 2024 · 8 comments

Comments

@esheldon
Copy link
Contributor

I'm interested in having the background and background variance (since it may not be pure poisson) output in the image header for the "eimage" type.

The motivation is to enable quick analysis of the image without going through the entire characterize/calibrate processes.

@cwwalter
Copy link
Member

Just to add a bit of info in case it isn't widely known: The background isn't flat, it is a gradient taken from the sky model so this would be an image and variance plane I think.

Would you want things like fringing or tree-rings included in it?

@esheldon
Copy link
Contributor Author

esheldon commented Jan 10, 2024

I didn't know that, thanks. In that case I suppose it is the full variance plane that is needed.

My example is pretty simple: I want to try to characterize the PSF on the image. I want to do it in a fully controlled way. I want to isolate PSF determination errors from other sources of error such as calibration, astrometric calibration, background determination, etc. the WCS is in the header but I need some other info in order to construct the input data for the algorithms.

@cwwalter
Copy link
Member

There are somethings, like tree-rings, which I think won't be completely separable. That is going to affect sources as well as the background and is going to depend where you hit a specific sensor.

But, you would like anything that could affect the background to be included correct?

@esheldon
Copy link
Contributor Author

esheldon commented Jan 12, 2024

I'm turning off tree rings for this (see the footnote 1 for why)

I only need to know the background in order to subtract it, and the noise in order to give the code a way to remove low S/N objects (footnote 2). We don't need to know the noise precisely to run PIFF but we do need the background subtracted accurately.

By the way, I did come up with a hack that may work

  • turn off apply_sky_gradient
  • turn off vignetting
  • turn off tree rings
  • store sky_level in the truth catalog
  • assume poisson noise

storing sky level in the cat is a real hack, but I don't know any other way to get it

footnotes

  1. Tree rings are hopefully not relevant for how well PIFF works. We think PIFF will work fine with with tree rings as long as the astrometric solution includes it, but I don't have a full WCS only what's in the header (SIP).
  2. PIFF is doing a gaussian fit to get the S/N, which for constant noise works fine even if you don't know the noise perfectly

@cwwalter
Copy link
Member

@esheldon Is there still something that needs to be done here? BTW note that HyeYun is working on updating the tree-ring model.

@esheldon
Copy link
Contributor Author

I just implemented this functionality myself outside of the config interface.

@cwwalter
Copy link
Member

You mean in your own framework code correct?

If so, can you close this?

@esheldon
Copy link
Contributor Author

I do think it would be useful for the background to be written so people can use it.

But I no longer need this as I've worked around it.

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