large subset warnings in aperture photometry#1801
Conversation
551eb2c to
3604062
Compare
| ></v-select> | ||
| </v-row> | ||
|
|
||
| <v-row v-if="current_plot_type==='Radial Profile (Raw)' && subset_area > 5000"> |
There was a problem hiding this comment.
I have a feeling that this number actually depends on the hardware. Is "5000" representative enough? Should we document how you decided on this number?
There was a problem hiding this comment.
It likely is, I kind of just guessed, but as I said in the description, I'm hoping that we can revise that during reviews. Ultimately it isn't a cutoff where we prevent running, just a cutoff where we start displaying the warning, so I think we should err on the side of too low of a number... or maybe we should just always display the message?
Codecov ReportBase: 87.89% // Head: 87.92% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1801 +/- ##
==========================================
+ Coverage 87.89% 87.92% +0.02%
==========================================
Files 95 95
Lines 10186 10211 +25
==========================================
+ Hits 8953 8978 +25
Misses 1233 1233
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
javerbukh
left a comment
There was a problem hiding this comment.
I tried using a very large subset (75k+) and it crashed the tab I have jupyter-lab running in. Tested on main and the same thing happens. I think including a warning is good but do we want to consider setting a hard limit on subset size as a followup?
We definitely can, but the actual limit probably depends on the memory available to the browser and will vary from machine to machine (I suppose maybe we could detect and estimate that limit that on the javascript-side, or maybe we could request that bqplot handles refusing to overload the memory). |
|
Instead of warning, do we just want to exclude listing "large" subsets for Aperture Photometry plugin only? |
|
How would you define "large"? |
|
@camipacifici , currently it is arbitrarily |
|
I did miss that comment, thanks. Anyway, I meant the motivation to pick a specific number. I would not exclude subsets. The warning seems fine for now. We can revisit this later if we get reports of the app crashing. |
| </v-row> | ||
|
|
||
| <div v-if="plot_available && fit_radial_profile"> | ||
| <j-plugin-section-header>Gaussian Fit Results</j-plugin-section-header> |
There was a problem hiding this comment.
@larrybradley specifically wanted the fit results to be on top, so moving this down is a step backwards. See #1409 (comment)
There was a problem hiding this comment.
ok, thanks for that context. This does keep them with the plot, but moves the plot and the gaussian fit below the photometry results. If we want to move them both back up to the top, then we might need to look into a javascript solution for detecting when the plot is rendered and show a spinner in the meantime, since the blank plot just suggests something isn't working.
There was a problem hiding this comment.
Moving things around need PO's blessing, I think. I am neutral on whatever that works.
The warning itself pops up as advertised though it is hard for me to judge whether 5000 is a good cutoff or not.
There was a problem hiding this comment.
Maybe this is a Jenn question, but would you consider having two buttons? calculate photometry and plot curve or something like that, so the user can decide not to show either if they do not need it and they would see first what they want.
There was a problem hiding this comment.
I like that idea, and then the warning is more tied to just the plotting step rather than computing the photometry itself - would you like me to do that as part of this PR?
There was a problem hiding this comment.
I originally wanted the plotting to be a separate plugin...
I think adding another button would introduce too much diff that goes beyond the scope of this PR. Is there a way to do the warning without moving things around?
There was a problem hiding this comment.
Yes, I can easily revert changing the order but keep the warning, but see my concerns above for why I think this isn't ideal. But if the plan is to follow-up (relatively soon) with splitting into two buttons/sections, then the warning on its own is still an incremental improvement.
I'm also curious what @larrybradley thinks - was your original request from the comment @pllim linked just to keep the gaussian results tied closely with the plots, or to have the plot and gaussian results before the photometry results?
There was a problem hiding this comment.
Stick with the warning for this PR and open a new one (if you have time now or an issue if you don't) for splitting the button, please.
There was a problem hiding this comment.
I did revert the re-ordering for this PR. I'm working on some smarter thresholds for the warning and will then open a follow-up ticket for either considering re-ordering, splitting the buttons, or splitting the plugin.
3604062 to
ef050a2
Compare
ef050a2 to
ccf7a40
Compare
pllim
left a comment
There was a problem hiding this comment.
As discussed, this is a good minimal implementation of the request. We can fancy it up later.
Works on dark mode! 🎉
|
I'll let you decide if a change log is needed. |
ccf7a40 to
1d5060e
Compare
|
Woops, change log got lost when I removed the re-ordering commit. Re-added and will merge once CI passes. Thanks for the reviews! |
Description
This pull request is to address slow performance for the raw profile plot in aperture photometry when using large subsets. This does
two thingsthe following to attempt to address this case:reorders so the results table appears above the plots. Any size image/subset that jdaviz currently handles should return the results almost immediately... if this is ever not the case, then we should consider adding a spinner while computing the results.Screen.Recording.2022-11-01.at.1.34.08.PM.mov
Unfortunately a spinner for just the plot isn't obviously feasible as the drawing is handled in bqplot and the browser... although it might be possible to implement from javascript callbacks if we want to explore that further.
Change log entry
CHANGES.rst? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rstbefore merge. If no, maintainershould add a
no-changelog-entry-neededlabel.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.
triviallabel.