-
Notifications
You must be signed in to change notification settings - Fork 76
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
Concept notebooks for composite subset to scope out work #3320
Conversation
7e44815
to
1d9b57c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3320 +/- ##
==========================================
- Coverage 88.80% 88.80% -0.01%
==========================================
Files 125 125
Lines 19137 19137
==========================================
- Hits 16995 16994 -1
- Misses 2142 2143 +1 ☔ View full report in Codecov by Sentry. |
Thank you for investigating this so thoroughly! My understanding of the priorities for the points you bring up:
I think some of the things you mentioned in the concept notebooks can be a part of those top 3 (for example, only allowing combination_mode = "or" for a filename would be part of 1, same with one file only being able to store one subset). Please let me know if I understood things correctly! |
(2) Depends on how thorough a roundtrip you really want. If user does not mind the simplified version, then we're basically done for spectral regions. (3) Depends on (2). |
Sorry I am late here. I am ok with the recommendations in the imviz concept notebook. Will be looking at the specviz one shortly |
Comments about the specviz notebook, assuming that one day we will be able to save multiple subsets in the same file.
Regardless, I think that the default when reading should be 'new', not 'replace'. |
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.
(Some relevant thoughts to this notebook while working on subset api stuff):
See my comment in #3340. The load_regions and get_regions in subset tools should round trip for composite subsets, and they don't currently.
It sounds like the easiest solution to me to just not support CompoundRegions at all to represent Composite Subsets, and use the current expected input format @javerbukh wrote for Subset Tools.import_regions which is corresponding list of subsets and recognized combination modes. I think this is neater honestly - you can only combine two subsets with CompoundRegion so they become nested when combining many which is more confusing than a list. You won't be able to load any arbitrary CompoundRegion that may have been created outside jdaviz, but you can't anyway unless we figure out how to map the 'operator' to a glue combination mode.
for spatial subsets Add specviz pondering, update imviz
1d9b57c
to
89cffa5
Compare
Re: #3320 (review) @cshanahan1 , the complication with your suggestion is the serialization. We would have to roll our own data format if user decides to want to save these spatial composite subsets, send the file to collaborator, and then have the collaborator load the file and get back exactly the same thing. Furthermore, such a specialized file format would be useless outside of Jdaviz (unlike the formats supported natively by |
Re: #3320 (comment) @javerbukh , if I understood your comment correctly, you are accepting my recommendations in both notebooks without any request for changes. Is that correct? |
Re: #3320 (comment) @camipacifici , if I understood your comments correctly, these would be the new recommendations (instead of the ones I put at the end of
This gives me the same concern as #3320 (comment) ; i.e., we will end up with a custom file format that is useless outside of Jdaviz.
Yes, theoretically. But given |
I am ok with this new set of recommendations with two additions:
|
Note to self: Cross check with a list of tickets from @cshanahan1 (🐱 🐱) and then open tickets. |
Is this the ticket? https://jira.stsci.edu/browse/JDAT-4533 (from #2871). Update: Created https://jira.stsci.edu/browse/JDAT-5040
|
"\n", | ||
"### Recommendations\n", | ||
"\n", | ||
"1. Acknowledge that this feature will never be used for aperture photometry.\n", |
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.
"### Recommendations\n", | ||
"\n", | ||
"1. Acknowledge that this feature will never be used for aperture photometry.\n", | ||
"2. Create follow-up ticket to add support for [compound region](https://astropy-regions.readthedocs.io/en/latest/compound.html).\n", |
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.
"\n", | ||
"1. Acknowledge that this feature will never be used for aperture photometry.\n", | ||
"2. Create follow-up ticket to add support for [compound region](https://astropy-regions.readthedocs.io/en/latest/compound.html).\n", | ||
"3. Create follow-up ticket to then investigate REPLACE and REMOVE, after (1) is implemented." |
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.
"1. Acknowledge that original inputs might be lost upon saving it back out\n", | ||
" because we simplify the composite spectral regions.\n", |
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.
"2. Acknowledge that one file can only store one subset.\n", | ||
" (Needs extra pondering if you also want to support `\"new\"` to create one subset\n", | ||
" per file entry.)\n", | ||
"4. Only allow `combination_mode=\"or\"` when a filename is given.\n", | ||
" Since default is actually `None` (which `glue` translated to `\"replace\"`,\n", | ||
" maybe have to recode `None` to mean `\"or\"` when input is filename.\n", | ||
" Raise exception for any other value." |
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.
https://jira.stsci.edu/browse/JDAT-5038 (modified with Cami's comments)
Tickets are opened. Closing without merging. |
Description
This pull request is to address, "Investigate: test existing composite subset support and scope additional work."
TODO for reviewers
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.