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

adding support for temporal subsets #2168

Merged
merged 1 commit into from
May 1, 2023

Conversation

bmorris3
Copy link
Contributor

Downstream, LCviz will show light curves as profiles of flux over time. In order give LCviz a subset API that's consistent with jdaviz, we need to generalize a few things here.

The get_data_from_viewer and get_subsets methods in Application make some assumptions about the dimensionality of data in jdaviz (data with ndim=1 is spectral; dim options are only spectral or spatial). This PR generalizes the get_data_from_viewer method to work with non-spectral profiles, and introduces a temporal subset option.

I've milestoned this to 3.4.1 just in case we can get a release ASAP.

Change log entry

  • Is a change log needed? If yes, is it added to 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, maintainer
    should 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.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)? 🐱

@bmorris3 bmorris3 added trivial Only needs one approval instead of two no-changelog-entry-needed changelog bot directive labels Apr 27, 2023
@bmorris3 bmorris3 added this to the 3.4.1 milestone Apr 27, 2023
statistic=statistic)
else:
# otherwise simply translate to an object:
layer_data = handler.to_object(layer_data)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to leave open the possibility of having a light curve collapsed down from 2D temporal slices (which would require statistic)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is a 2D temporal slice?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am guessing like spectral cube but in time domain?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, that's what I meant. Is that actually a thing that we expect to be loaded at some point? No idea!

Copy link
Member

Choose a reason for hiding this comment

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

We will eventually want to support target pixel files and modifying the aperture, but if its not obvious how to handle that now, we can just add a note and modify this logic later when needed (I don't think we'll be adding support for that in the terribly near future).

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, I know that is a thing in heliophysics, so definitely possible.

Copy link
Member

@kecnry kecnry left a comment

Choose a reason for hiding this comment

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

looks reasonable to me, but I'm curious if @javerbukh has any thoughts/concerns as to how this fits into the broader subsets refactoring work. If we need to merge to move forward with the downstream PR, we can always come back and tweak the implementation here though.

jdaviz/app.py Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Patch coverage: 60.00% and project coverage change: -0.09 ⚠️

Comparison is base (0aaee4f) 91.50% compared to head (13d30e7) 91.42%.

❗ Current head 13d30e7 differs from pull request most recent head ff75b72. Consider uploading reports for the commit ff75b72 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2168      +/-   ##
==========================================
- Coverage   91.50%   91.42%   -0.09%     
==========================================
  Files         147      147              
  Lines       16142    16163      +21     
==========================================
+ Hits        14771    14777       +6     
- Misses       1371     1386      +15     
Impacted Files Coverage Δ
jdaviz/configs/imviz/tests/test_parser.py 99.19% <50.00%> (-0.81%) ⬇️
jdaviz/app.py 92.80% <62.50%> (-0.60%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bmorris3
Copy link
Contributor Author

bmorris3 commented May 1, 2023

I'll check in with @javerbukh about this one at tag up today if I can, and merge if not.

@bmorris3
Copy link
Contributor Author

bmorris3 commented May 1, 2023

I just remembered Jesse is out for a while, so I'll merge now. Thanks all!

@bmorris3 bmorris3 force-pushed the viz-those-times branch from 13d30e7 to ff75b72 Compare May 1, 2023 14:09
@bmorris3 bmorris3 requested a review from rosteen May 1, 2023 14:38
@bmorris3 bmorris3 merged commit d7f28ab into spacetelescope:main May 1, 2023
@kecnry
Copy link
Member

kecnry commented May 4, 2023

@meeseeksdev backport to v3.4.x

@kecnry kecnry added the 💤backport-v3.4.x on-merge: backport to v3.4.x label May 4, 2023
@lumberbot-app
Copy link

lumberbot-app bot commented May 4, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.4.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 d7f28abf64c9be3060c480fed561b84e08883bf1
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #2168: adding support for temporal subsets'
  1. Push to a named branch:
git push YOURFORK v3.4.x:auto-backport-of-pr-2168-on-v3.4.x
  1. Create a PR against branch v3.4.x, I would have named this PR:

"Backport PR #2168 on branch v3.4.x (adding support for temporal subsets)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

bmorris3 added a commit to bmorris3/jdaviz that referenced this pull request May 5, 2023
bmorris3 added a commit to bmorris3/jdaviz that referenced this pull request May 5, 2023
adding support for temporal subsets

(cherry picked from commit d7f28ab)
@pllim
Copy link
Contributor

pllim commented May 5, 2023

Was this backported? If so, please cross link the backport PR here. If not, please change the milestone. Thanks!

@bmorris3 bmorris3 modified the milestones: 3.4.1, 3.5 May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog-entry-needed changelog bot directive trivial Only needs one approval instead of two
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants