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

Stitch plugin #107

Merged
merged 2 commits into from
Apr 22, 2024
Merged

Stitch plugin #107

merged 2 commits into from
Apr 22, 2024

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Apr 16, 2024

Screen.Recording.2024-04-16.at.2.19.02.PM.mov

Stitch plugins docs

Potential follow-up:

Open questions:

  • should there be functionality to either unload the input entries from the viewer or delete from the app entirely within this plugin (so effectively replace the individual entries with the stitched entry)?
  • should this be called "stitch", "combine", "merge", etc?

@kecnry kecnry force-pushed the stitch-plugin branch 3 times, most recently from 3a717f6 to 1f2a2cc Compare April 16, 2024 18:18
@bmorris3
Copy link
Contributor

Some thoughts:

  • "Stitch" is the word used for this operation in lightkurve, let's use that too
  • I like the idea of optionally deleting data entries after stitch. there could be a toggle in the plugin set to "delete after stitch" by default.
  • in most cases, stitching without applying a corrector function is not useful. this would be the first place in lcviz where we could have a Model Fitting-like interface outside of jdaviz – we could support specifying a functional form for the baseline and fitting it, or taking simple statistics (mean/median/rolling mean or median) of each segment.
  • it looks like we need to update the data labeler to put in the quarter/sector (should we call these "segments"?) info.

@kecnry
Copy link
Member Author

kecnry commented Apr 16, 2024

"Stitch" is the word used for this operation in lightkurve, let's use that too

✅ 🪡

I like the idea of optionally deleting data entries after stitch. there could be a toggle in the plugin set to "delete after stitch" by default.

ok, then I'll add it (but not sure about having it on by default - we'll see as we play with it I guess)

in most cases, stitching without applying a corrector function is not useful.

I'm not sure I agree with this. All of the other plugins take a single light curve as input, so this allows you to combine multiple quarters/sectors together and then use that as input to... frequency analysis, binning, etc. Down the road, we may want to have that done on the fly by allowing any plugin to have multi-select support for the dataset and stitch on the fly, but again, without necessarily normalizing or flattening as part of that process.

this would be the first place in lcviz where we could have a Model Fitting-like interface outside of jdaviz – we could support specifying a functional form for the baseline and fitting it, or taking simple statistics (mean/median/rolling mean or median) of each segment.

Maybe, but definitely not for this first pass. And I think we want model fitting on its own... it just needs to be completely refactored to not rely on specutils.

it looks like we need to update the data labeler to put in the quarter/sector (should we call these "segments"?) info.

Good idea - I support this. EDIT: done in #111

@kecnry kecnry marked this pull request as ready for review April 18, 2024 14:23
kecnry added 2 commits April 19, 2024 12:39
only shown in plugin tray if at least two light curves are loaded into a viewer
Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 81.63265% with 9 lines in your changes missing coverage. Please review.

Project coverage is 92.39%. Comparing base (7b78df5) to head (fc7eaf7).
Report is 32 commits behind head on main.

Files Patch % Lines
lcviz/plugins/stitch/stitch.py 80.85% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   93.92%   92.39%   -1.54%     
==========================================
  Files          37       41       +4     
  Lines        1598     1933     +335     
==========================================
+ Hits         1501     1786     +285     
- Misses         97      147      +50     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@bmorris3 bmorris3 left a comment

Choose a reason for hiding this comment

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

This works great for me, and I like the delete feature – very easy.

@kecnry kecnry merged commit 6883142 into spacetelescope:main Apr 22, 2024
8 of 11 checks passed
@kecnry kecnry deleted the stitch-plugin branch April 22, 2024 14:59
kecnry added a commit that referenced this pull request Apr 22, 2024
* stitch plugin: basic implementation
* only shown in plugin tray if at least two light curves are loaded into a viewer
* optionally replace input datasets when stitching
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.

2 participants