Skip to content

DM-54227: Allow for more than requested bands to be supplied#1274

Open
yalsayyad wants to merge 4 commits intomainfrom
tickets/DM-54227
Open

DM-54227: Allow for more than requested bands to be supplied#1274
yalsayyad wants to merge 4 commits intomainfrom
tickets/DM-54227

Conversation

@yalsayyad
Copy link
Contributor

No description provided.

imageBArray = np.zeros(shape, dtype=np.float32)

for band, image in channels.items():
if band not in self.config.channelConfig:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this. I forgot something like this was on a branch from DP1 around FL, and just came across it too while porting things back from that whole mess. However, by this time the data has already been pulled from the butler. If you make the change down below in my other comment, it will save memory and run time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be done in adjustQuantum instead, to slightly shrink the QG and keep the task from being blocked by an upstream failure in an irrelevant band. Probably not worth it for this ticket, this late in the game.

"""
sortedImages: dict[str, Exposure] = {}
for ref in refs:
key: str = cast(str, ref.dataId["band"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you check and continue here, the get call will never happen for bands we don't need.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, right in makeInputsFromRefs in PrettyPictureTask

Arrays in assemble_sub_region don't match otherwise
imageBArray = np.zeros(shape, dtype=np.float32)

for band, image in channels.items():
if band not in self.config.channelConfig:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be done in adjustQuantum instead, to slightly shrink the QG and keep the task from being blocked by an upstream failure in an irrelevant band. Probably not worth it for this ticket, this late in the game.

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

Successfully merging this pull request may close these issues.

3 participants