-
Notifications
You must be signed in to change notification settings - Fork 30
Update examples and plotters for bumps webview #676
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
Open
pkienzle
wants to merge
17
commits into
master
Choose a base branch
from
fix-plotly-plotting
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…_width to q_width,q_length
…clude plotly versions
…r the residuals plot
Contributor
Author
|
Wait for bumps v1.0.4 before merging. Also, check that it is using the plotly plots with the new bumps+webview: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Redo the plotting routines using a more compact layout, better suited for use with bumps webview.
This code is not used by SasView
Notes:
(1) Include both matplotlib and plotly backends.
The plotly backend isn't enabled because the bumps interface to plotly in model is not yet stable. See bumps/bumps#342
(2) plotly heatmaps do not yet display correctly in bumps
To see the plots in matplotlib and plotly type the following to load and display the plots without bumps:
python example/fit2d.pyNow switch to the fix-improve-mpl-support branch in bumps, uncomment
def plotly(...)inbumps_model.Experiment.plot, then runbumps example/fit2d.pyThe plotly 2d plots are still ugly. Figure out how to shrink the graph area to just the data
(3) The limits parameter for plot_theory doesn't work for q^4 plots
(4) matplotlib log data error plots do not work with webview
This is an issue with the mpld3 library used to render them: mpld3/mpld3#488
(5) Should be sharing the 2D rebinning code with sasview
(6) The algorithm for select Δqx and Δqy when converting from a bag of (qx, qy, I(qx, qy)) values to a 2D image should be improved. Pixels should be roughly square; instead of assuming a square aspect ratio it should use the qx and qy extent ratio. The algorithm is assuming that (qx, qy) is relatively uniform throughout bounding box so it is creating a grid with approximately one measurement per pixel. This fails if the dataset has significant masking, or if it combines measurements with significant overlap. Either find a better algorithm as part of this PR or create a separate ticket asking to improve it.
(7) Although these changes mirror some of those in the sasview plotting refactor (SasView/sasview#2940 and SasView/sasview#3111) it doesn't look like higher level code sharing will be possible.