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

Demonstrate Model Bias with real galaxies #7

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open

Conversation

b-remy
Copy link
Owner

@b-remy b-remy commented Feb 7, 2022

This pull request is to document the implementation of a script for the joint inference of shear and shape for #5 .

So far, we assume:

  • Gaussian profiles (fixed hlr)
  • COSMOS PSF (fixed)
  • Constant shear (varying)
  • Intrinsic ellipticity (varying)

Remarks:

  • tf.function was enable by removing all non-tensorflow code in the edward model
  • Increasing the number of galaxies seems to unbias the shear estimation

@b-remy b-remy marked this pull request as draft February 7, 2022 08:55
@b-remy
Copy link
Owner Author

b-remy commented Feb 7, 2022

Also sometimes it infers -gamma_1 insted of gamma_1.

@b-remy
Copy link
Owner Author

b-remy commented Feb 8, 2022

The last version of the code is working well as illustrated in #5 .

I'll try to reproduce the issue I had above. In this scenario there were to calls to the model, which may trouble the code idk...

with ed.tape() as true_params:
    ims = model(N*N, stamp_size)

# Apply a constant shear on the field
custom_shear = [0.01, 0.]
with ed.condition(hlr=true_params['hlr'],
                  gamma=custom_shear,
                  e=true_params['e'],
                  ):
    ims = model(N*N, stamp_size)

@b-remy b-remy marked this pull request as ready for review February 8, 2022 19:46
@b-remy b-remy linked an issue Jun 9, 2022 that may be closed by this pull request
@b-remy b-remy changed the title Inference with Gaussians script Demonstrate Model Bias with real galaxies Jun 9, 2022
This was linked to issues Jun 9, 2022
@b-remy
Copy link
Owner Author

b-remy commented Jun 15, 2022

This pull request contains a lot of code a files, but can be summarized as follow:

Merging this pull request would close the following issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Demonstrating model bias for realistic galaxies Shear inference with Gaussians Toy model #1
1 participant