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

Impact of finite differences on metacalibration #38

Open
4 of 5 tasks
EiffL opened this issue Nov 6, 2021 · 4 comments
Open
4 of 5 tasks

Impact of finite differences on metacalibration #38

EiffL opened this issue Nov 6, 2021 · 4 comments
Assignees
Labels
investigation Issues related to investigating a given question

Comments

@EiffL
Copy link
Member

EiffL commented Nov 6, 2021

The zeroth order thing we want to check is whether the fact that ngmix relies on finite differences to measure the gradients can have a measurable impact on the response matrix, on a galaxy per galaxy basis, and more importantly for a sample of galaxies.

Things to do for this:

  • Build a realistic galaxy sample, with some typical SNR, shape, size #39
  • On a galaxy per galaxy basis, make a plot of R_finitediff vs R_autodiff, estimate bias if bias there is
  • For the entire sample, estimate the impact of errors, do they average out?
  • Answer the question: Should we worry about using finite differences in practice?
  • Write paper section on it
@EiffL EiffL added the investigation Issues related to investigating a given question label Nov 6, 2021
@EiffL
Copy link
Member Author

EiffL commented Nov 6, 2021

I'm gonna start by ctr+c/ctr+v a preliminary plot made by @andrevitorelli showing the relative error between responses as measured by finite diff vs auto diff on a galaxy per galaxy basis:
snr_10_1000_log_steps
(showing the results for various SNR from 10 to 1000)

This would seem to indicate that the relative gradient error would can be of order 1%, but that's on a galaxy per galaxy basis.

@andrevitorelli
Copy link
Member

For the entire sample, estimate the impact of errors, do they average out?

R: No.

difference_of_medians_auto_finite

@andrevitorelli
Copy link
Member

For the penultimate question, I will do the tf vs ngmix test on different levels of shear, and see the residual m between AD & FD respective to different step sizes.

@andrevitorelli
Copy link
Member

andrevitorelli commented Apr 28, 2022

On the question

Answer the question: Should we worry about using finite differences in practice?

It seems that no, when we're at m ~5e-2. Lower than that it might get different. Plots Numbers coming soon...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigation Issues related to investigating a given question
Projects
None yet
Development

No branches or pull requests

2 participants