-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Implement DQ support for HST #2844
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused about what changing the dq mapping in the dropdown actually triggers to change.
For example, looking at mast:HST/product/hst_17183_02_wfc3_uvis_g280_iexr02mt_flt.fits, when i toggle between UVIS (the correct dq mapping) and IR (not correct, but apparently able to toggle to), the 32 bit flag retains the UVIS definition (CTE tail).
Thanks for catching that @cshanahan1! I simply hadn't tried to select a different mapping because the auto-detect has worked each time, but on changing the flag map, the definitions should change in the DQ list. I made a small update in bf1105f which enforces that change. |
This I think should be a separate ticket from this PR if it is applicable, when I am using DQ in Imviz, I must For Cubeviz, I think this should also be true, but the parser? will automatically load the DQ without the ext in So the separate ticket I will create if we agree would be to have consistency in the loading logic for DQ across plugins. |
in terms of the labels applied to each flag, i see that they each get labeled with their bit value but there is a second number which appears to be their index in the list of all flags it appears that flag 8 (which would be labeled with a 4) is being skipped in both UVIS and IR. Hot pixel gets the label '4' |
Correct – Imviz loads only the science/data extension by default. If you want all, you can list them explicitly like
Correct – Cubeviz always loads the science/data, error, and DQ extensions.
Here's why it was designed to be intentionally inconsistent for these configs:
|
I’m not sure I follow:
We can check that the DQ array for the WFC3 observation contains these values:
which returns
these are the bold values in the plugin: The values in the parentheses are the flags decomposed into powers of two. So referring to the WFC3 flag mapping docs, if you have a DQ value of 4, that corresponds to "bad detector pixel," and in parentheses we have log2(4) = 2. |
i take back my comment! that makes perfect sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, the only issue I found was the non-updating issue which you fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the only case that I found that could be an issue (where B1 in the plugin is displayed as the child of A [excluding this example, the opacity works as expected and does get applied to B1 when you reselect B]), but it isn't easily reproducible. I've tried ~10 times this morning and only could force it to happen again once.
edge_case.mov
I feel like this has no meaning, but is there ever a case where a reverse bit filter would be desirable? I can make sure all the 2s are on, is there any utility in making sure all the 2s are off?
The turn around from ticket -> PR is awesome and super happy that this got in for 3.10!
Thanks @gibsongreen and @cshanahan1! RE @gibsongreen:
It's possible this would be useful, and it's possible that it's easy to implement. But let's wait for someone to ask for it. |
This PR adds DQ plugin support for L2 products from four HST instruments, with data quality flag mappings from these HST instrument docs pages (retrieved today):
Example
Now using a MAST URI for an HST L2 product will work in the concept notebook
imviz_dq_concept.ipynb
. Two example HST products are:Here's the demo for the WFC3 observations:
imviz-dq-hst-wfc3.mov
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.