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

Create Tracer from result with same API as instance #187

Open
Jammy2211 opened this issue Mar 16, 2022 · 0 comments
Open

Create Tracer from result with same API as instance #187

Jammy2211 opened this issue Mar 16, 2022 · 0 comments

Comments

@Jammy2211
Copy link
Owner

There are currently two ways we can manipulate a lens model result:

tracer = result.max_log_likelihood_tracer
bulge_image = tracer.planes[0].galaxies[0].bulge.image_2d_from(grid=imaging.grid)

or

samples = result.samples

ml_instance = samples.max_log_likelihood_instance
bulge = ml_instance.galaxies.lens.bulge
bulge_image = bulge.image_2d_from(grid=imaging.grid)

Currently, it is not possible for us to create a Tracer with the API:

tracer = result.max_log_likelihood_tracer
bulge_image = tracer.lens.bulge.image_2d_from(grid=imaging.grid)

It should be possible to extend the Tracer object such that if the input galaxies object is a ModelInstance it has both the above API's as opposed to only the first one. This will make manipulating results more self consistent.

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

1 participant