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

HLA-1150: MVM failure due to HAPProduct constructor mismatch #1693

Conversation

s-goldman
Copy link
Collaborator

@s-goldman s-goldman commented Nov 1, 2023

Resolves HLA-1150

Closes #1692

This PR addresses a failure in dlhstdmcv2 HST Auto-run for 10/31/23 where the following error was thrown:

TypeError: init() missing 1 required positional argument: 'log_level'

This appears linked HLA-1110 (#1683) likely due to aperture not being added to the Product Objects for MVM processing. A test should be created to pick up these kinds of errors in the future.

The first commit shows the relevant changes for this PR, he second commit is the result of blacking poller_utils.py

Additional issues were found in the process of fixing these bugs. The code reduces the number of files to process using the analyze module and produces a new list called usable_datasets. This resulted in a uneven match of the new aperture column and the list that is passed through the code: cols. The new code now returns indices along with the usable_dataset, in order to select the correct aperture values to pass.

Copy link

codecov bot commented Nov 1, 2023

Codecov Report

Attention: 113 lines in your changes are missing coverage. Please review.

Files Coverage Δ
drizzlepac/haputils/align_utils.py 76.90% <100.00%> (ø)
drizzlepac/haputils/product.py 61.97% <ø> (ø)
drizzlepac/runastrodriz.py 35.00% <0.00%> (ø)
drizzlepac/haputils/analyze.py 43.27% <80.00%> (+0.61%) ⬆️
drizzlepac/haputils/poller_utils.py 47.93% <45.00%> (+0.30%) ⬆️

📢 Thoughts on this report? Let us know!.

@s-goldman s-goldman added the Do Not Merge PR which should not be merged label Nov 1, 2023
@s-goldman
Copy link
Collaborator Author

As of now, the code is creating MVMs with filenames e.g.

hst_skycell-p1749x18y06_wfpc2_pc_empty_aperture_f502n_all_drz.fits

Looking for ways to remove the empty_aperture keyword

@s-goldman
Copy link
Collaborator Author

It looks like the MVM output drz filename is based on the SkyCellProduct.info string. While we had previously added aperture to this string, it isn't needed for MVMs and so it has been removed from only the info string for SkyCellProduct objects.

This appears to have fixed the naming issue.

@s-goldman s-goldman removed the Do Not Merge PR which should not be merged label Nov 1, 2023
@s-goldman s-goldman changed the title HLA-1150: mvm failure from log level HLA-1150: MVM failure due to HAPProduct constructor mismatch Nov 2, 2023
)
input_table.add_column(add_col, index=7)
poller_dtype += ("str",)
cols["aperture"] = ["empty_aperture"] * len(usable_datasets)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is possible for cols["aperture"] Line 1331 to have more rows than are remaining in usable_datasets which will ultimately cause a failure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It shoudn't? Are tests still coming back with uneven indices?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was able to find the edge case that you were alluding to: Full poller table with datasets that are not usable. I altered the analyze.py module to return indices (as well as usable_datasets) to retrieve the corresponding aperture values from the input_table/poller_file.

@s-goldman
Copy link
Collaborator Author

Code appears to run as expected and is passing jenkins regression tests

@s-goldman s-goldman requested a review from mdlpstsci November 3, 2023 13:11
@s-goldman s-goldman merged commit 2b91fc5 into spacetelescope:master Nov 3, 2023
15 of 16 checks passed
@s-goldman s-goldman deleted the HLA-1150_MVM-Failure_from_log_level_11_01_23 branch November 3, 2023 21:41
mdlpstsci pushed a commit to mdlpstsci/drizzlepac that referenced this pull request Nov 5, 2023
mdlpstsci added a commit that referenced this pull request Nov 5, 2023
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.

MVM failure due to HAPProduct constructor mismatch
2 participants