Skip to content

Add support for "complex" bounding boxes.#11699

Closed
WilliamJamieson wants to merge 15 commits into
astropy:mainfrom
WilliamJamieson:tickets/AL-517
Closed

Add support for "complex" bounding boxes.#11699
WilliamJamieson wants to merge 15 commits into
astropy:mainfrom
WilliamJamieson:tickets/AL-517

Conversation

@WilliamJamieson

Copy link
Copy Markdown
Contributor

Description

Often one ends of with models for images with many slices have a dependency on that slice. These models can be extremely complex, being comprised of ~100 models, which are nearly identical for all slices, but have different bounding boxes for each slice. The bounding box calculations for each slice can become expensive if there is a need to run the model multiple times. For this reason, it is useful to be able to bind a "complex" bounding box to the model, which can select the "correct" bounding box based on a slice argument.

In this pull request, I introduce a ComplexBoundingBox which essentially is a dictionary of bounding boxes with keys given by the slice values. Then Model and CompoundModel were modified so that they can use this complex bounding box when the need arises. Moreover, the interface bind_complex_bounding_box was added to facilitate the easy creation and adding of a complex bounding box to any existing model.

@WilliamJamieson

Copy link
Copy Markdown
Contributor Author

Tagging @nden and @perrygreenfield for comment.

@github-actions

github-actions Bot commented May 4, 2021

Copy link
Copy Markdown
Contributor

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

@pllim

pllim commented May 4, 2021

Copy link
Copy Markdown
Member

Is this fully backward compatible. Will this break people's custom models downstream?

@pllim pllim added this to the v5.0 milestone May 4, 2021
@WilliamJamieson

Copy link
Copy Markdown
Contributor Author

Is this fully backward compatible. Will this break people's custom models downstream?

@plim I do not think this would break people's custom models. It seems to pass all the jwst and gwcs tests in addition to the astropy tests.

@WilliamJamieson WilliamJamieson force-pushed the tickets/AL-517 branch 2 times, most recently from 7d7b848 to a267bd5 Compare June 24, 2021 18:06
@nden

nden commented Oct 30, 2021

Copy link
Copy Markdown
Contributor

Superseded by #11942

@nden nden closed this Oct 30, 2021
@WilliamJamieson WilliamJamieson deleted the tickets/AL-517 branch April 18, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants