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

DM-32355: Develop function and unit test to remove Poisson contribution from sources in variance plane #265

Merged
merged 3 commits into from Apr 8, 2024

Conversation

MorganSchmitz
Copy link
Contributor

No description provided.

@beckermr
Copy link

What is the status of this one?

@MorganSchmitz
Copy link
Contributor Author

MorganSchmitz commented Jun 22, 2022

The code itself is ready (it's just a very simple free function)
Iirc, I never got it to review because I ran into trouble trying to make unit tests for it, which had to do with creating an Exposure with several Amplifiers (see this slack thread)

and then I guess it completely slipped my mind, sorry

@arunkannawadi arunkannawadi changed the title Add function to remove Poisson contribution from source from variance plane DM-32355: Add function to remove Poisson contribution from source from variance plane Sep 17, 2022
@arunkannawadi arunkannawadi self-assigned this Feb 6, 2023
@enourbakhsh enourbakhsh force-pushed the tickets/DM-32355 branch 3 times, most recently from f76406b to e1ca937 Compare February 26, 2024 19:04
@enourbakhsh enourbakhsh marked this pull request as ready for review February 26, 2024 19:05
@enourbakhsh enourbakhsh changed the title DM-32355: Add function to remove Poisson contribution from source from variance plane DM-32355: Add a function and a unit test to meas_algorithms for removing the Poisson contribution from sources in the variance plane Mar 9, 2024
@enourbakhsh enourbakhsh changed the title DM-32355: Add a function and a unit test to meas_algorithms for removing the Poisson contribution from sources in the variance plane DM-32355: Develop function and unit test within meas_algorithms to remove Poisson contribution from sources in variance plane Mar 9, 2024
@enourbakhsh enourbakhsh force-pushed the tickets/DM-32355 branch 3 times, most recently from dd3bbb4 to 6d288eb Compare March 13, 2024 11:44
@enourbakhsh enourbakhsh force-pushed the tickets/DM-32355 branch 5 times, most recently from 57557e5 to 9cfbe79 Compare March 16, 2024 08:08
Copy link
Member

@TallJimbo TallJimbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

In addition to the line comments, I'd like to make sure this is tested to robustly do nothing (or nearly nothing) when given an image with no signal, rather than (say) subtracting arbitrary constants.

I'm also interested in the use case of doing this on coadds, if that's even possible - I'd love for someone to work through the algebra to see if:

  • there is an "effective gain" on the coadd that is a weighted sum of images with different gains;
  • if not, what the error is when running this algorithm on such a coadd if (say) those gains are drawn from a Gaussian distribution with some mean and standard deviation.

python/lsst/meas/algorithms/variance_plane.py Outdated Show resolved Hide resolved
python/lsst/meas/algorithms/variance_plane.py Outdated Show resolved Hide resolved
python/lsst/meas/algorithms/variance_plane.py Outdated Show resolved Hide resolved
python/lsst/meas/algorithms/variance_plane.py Outdated Show resolved Hide resolved
@enourbakhsh enourbakhsh changed the title DM-32355: Develop function and unit test within meas_algorithms to remove Poisson contribution from sources in variance plane DM-32355: Develop function and unit test to remove Poisson contribution from sources in variance plane Apr 3, 2024
@enourbakhsh enourbakhsh force-pushed the tickets/DM-32355 branch 3 times, most recently from 3c95b78 to d1034b8 Compare April 3, 2024 10:03
@arunkannawadi arunkannawadi removed their assignment Apr 3, 2024
@enourbakhsh enourbakhsh force-pushed the tickets/DM-32355 branch 2 times, most recently from 586771c to 4ac308d Compare April 8, 2024 05:27
@enourbakhsh
Copy link
Contributor

enourbakhsh commented Apr 8, 2024

Looks good!

In addition to the line comments, I'd like to make sure this is tested to robustly do nothing (or nearly nothing) when given an image with no signal, rather than (say) subtracting arbitrary constants.

I'm also interested in the use case of doing this on coadds, if that's even possible - I'd love for someone to work through the algebra to see if:

  • there is an "effective gain" on the coadd that is a weighted sum of images with different gains;
  • if not, what the error is when running this algorithm on such a coadd if (say) those gains are drawn from a Gaussian distribution with some mean and standard deviation.

I moved the unit test to ip_isr to avoid circular dependency. As requested, I added a test for when the image given has no signal to ensure nearly the same variance plane post-correction. Regarding its applicability to coadds, I've opened a new ticket linked to this one.

@enourbakhsh enourbakhsh merged commit a2e4dd1 into main Apr 8, 2024
2 checks passed
@enourbakhsh enourbakhsh deleted the tickets/DM-32355 branch April 8, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants