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

Better integration of Masks #26

Closed
luizfelippesr opened this issue Jul 1, 2020 · 0 comments · Fixed by #51
Closed

Better integration of Masks #26

luizfelippesr opened this issue Jul 1, 2020 · 0 comments · Fixed by #51
Assignees
Labels
Observables Involves Dataset, Observable or Observable Dictionary objects Pipeline Involves Pipeline objects Simulator Involves Simulator objects

Comments

@luizfelippesr
Copy link
Member

At present, Masks objects can be supplied to Likelihood objects, which use them to ignore the masked pixels in the likelihood calculation. However, it would be interesting to use, when possible, the same masks in the Simulators. The end of tutorial_masks illustrates (using "low level"ish operations) how hammurabi X can make use of a mask.

Plans for the Mask integration:

  • The Simulator base class should include an argument for a masks dictionary in its __init__
  • The Pipeline base should pass the likelihood to the Simulator
  • There must be a way of making the user know if the Simulator can only handle a single mask
    • as this is the case of hammurabi X, and may be common,
    • one (crude but simple) possibility is requiring that masks of all the keys to be equal (raising an error otherwise)
  • Whenever a Masks dictionary is provided by the user, the Hammurabi simulator must be updated internally, following the exact same procedure showed in the end of tutorial_masks (using the same temp directory used for dumping the Fields)
  • Finally, tutorial_masks must be updated accordingly
@luizfelippesr luizfelippesr added Pipeline Involves Pipeline objects Simulator Involves Simulator objects Observables Involves Dataset, Observable or Observable Dictionary objects labels Jul 1, 2020
@luizfelippesr luizfelippesr mentioned this issue Jul 1, 2020
2 tasks
@luizfelippesr luizfelippesr self-assigned this Aug 21, 2020
@luizfelippesr luizfelippesr linked a pull request Aug 24, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Observables Involves Dataset, Observable or Observable Dictionary objects Pipeline Involves Pipeline objects Simulator Involves Simulator objects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant