-
Notifications
You must be signed in to change notification settings - Fork 9
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
Flux Column plugin #77
Conversation
486cec0
to
39d861a
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
==========================================
- Coverage 95.04% 94.49% -0.55%
==========================================
Files 32 36 +4
Lines 1393 1545 +152
==========================================
+ Hits 1324 1460 +136
- Misses 69 85 +16 ☔ View full report in Codecov by Sentry. |
bd9ba95
to
0bff08d
Compare
fe4e929
to
070f663
Compare
* later will merge template_mixin into here as well
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.
Sorry for this small but annoying-to-address comment/question.
docs/plugins.rst
Outdated
@@ -35,6 +35,41 @@ This plugin allows viewing of any metadata associated with the selected data. | |||
:ref:`Jdaviz Metadata Viewer <jdaviz:imviz_metadata-viewer>` | |||
Jdaviz documentation on the Metadata Viewer plugin. | |||
|
|||
.. _flux-origin: | |||
|
|||
Flux Origin |
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 know what you mean by origin
but the term used throughout lightkurve is column
. Is there a reason to introduce another term?
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.
hmmm I actually originally had column, but then changed it because its exposed as "FLUX_COLUMN" in the metadata and the string representation of the LightCurve
object 🤔
I guess this and this both use "column", but this tutorial shows how many times "origin" also appears.
Ultimately it's not too difficult to change (now or before this makes a release - significantly more difficult after a release)... so we can either decide which one we think is better or exposed more publicly or ask if they'd ever consider moving to be more self-consistent within lightkurve and go with that?
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.
Sounds good. Personally, I'd reserve "origin" for the origin of the axis, which might be, e.g., zero or one, depending on units and normalization.
b8f50a4
to
227c7c5
Compare
227c7c5
to
d7882a8
Compare
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 read everything and tested it and it works great, thanks! The comment I left doesn't block merge.
:items="flux_column_items.map(i => i.label)" | ||
v-model="flux_column_selected" | ||
label="Flux Column" | ||
hint="Select the column to adopt as flux." |
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 would love to put a link here to someone's docs that define the columns, so I looked around online to see if the Kepler/TESS/NASA docs have a good description of the column name definitions, but none are obvious. The relevant bit of the lightkurve docs don't link elsewhere. Eventually, let's have a brief expansion of the acronyms, and a literature reference for Kepler+TESS column definitions in our docs.
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.
what would be awesome is if we could just pull descriptions from somewhere on-the-fly for the currently selected column, or at least change the link based on the "author" (need to think about the HLSP case here as well).
* spacetelescope#77 uses .columns which is only supported by light curves, not TPFs
This PR implements a plugin for selecting the flux origin per-dataset (note that this means that each dataset chooses which column is treated as flux, and then every viewer and plugin will use that column as input).
Screen.Recording.2023-12-28.at.3.28.18.PM.mov
This also results in some necessary changes to the flatten plugin - which no longer writes to a new data entry, but rather appends a new column in the input light curve and selects that as the flux-origin by default. This does make some workflows like comparing before and after flattening a little more cumbersome, but should be more natural for the more common use-cases:
Screen.Recording.2023-12-29.at.3.45.56.PM.mov
Rendered plugin docs: https://lcviz--77.org.readthedocs.build/en/77/plugins.html#flux-column
TODO:
Potential follow-up: