Voxel plotting support (3D) - #126
Conversation
|
Thank you Joel for turning my code into something that is actually useable, but I think you are mistaken on a few things.
Also I was under the impression that animation support wasn't implemented because it was deemed too complex for this update, but may be added later? |
|
Thanks @ShaunD137 for correcting the mistakes in my PR, I have updated it so that it better reflects the points you made. With regards to animations, I assumed we didn't implement it because it was too computationally expensive but in retrospect I remember now that it was because we just wanted to get voxel plots asap so that they might make it into the JOSS paper. Will the documentation be ready for this PR or do you want to raise a new PR at a later date? |
|
@JoelLucaAdams I'll look into getting the documentation written soon. However, I think with voxel plots, data limiting and resizing, the "Exploring and Manipulating Data" will get a bit too long. Perhaps at a later date plotting should become it's own section? |
|
Happy for you to add another page to the documentation / move existing plotting content |
|
I have quite a lot on so can't review right now. Feel free to tag me when the tests etc are passing and it's in a more finished state though. |
|
@LiamPattinson ready to review :) |
|
Thank you ruff for updating to a new version that violates the code in several places... |
LiamPattinson
left a comment
There was a problem hiding this comment.
I have a few comments but it's mostly very pedantic stuff. Otherwise looks good!
Co-authored-by: Liam Pattinson <LiamPattinson@users.noreply.github.com>
LiamPattinson
left a comment
There was a problem hiding this comment.
All looks good to me from a code perspective, though I can't say I've tested the functionality myself.
Add the ability to perform 3D voxel plotting utilising Matplotlib. Unfortunately, Matplotlib will always attempt to load in every single voxel including those invisible from a given angle which drastically increases the time it takes to run this function (via
DataArray.epoch.plot(). To alleviate this we introduce two new helperDataArray.accessorfunctions;limit()who's purpose is two-fold: (1) to allow the new voxel plots to limit the axes in a similar fashion to conventional plots and (2) to allow the user to reduce the size of the DataArray to make it easier to work with. It will have no effect on the run time of voxel plots unless it is used by the user.resize()rescales the data but this has no effect on the rendering time.Currently the code is in a decent state, however some improvements could be made to the
voxel_plotting()function as you can pass in an axes but this does get heavily modified internally which might appear confusing to the user but maintaining the ability to pass in an axes matches the lineout and pcolormesh plot functions available via theDataArray.epoch.plot()function.Note
Animations are not supported but might be implemented at a future time. This is done so that we can get this into the main branch and update the JOSS paper.
Documentation will be added by @ShaunD137 prior to the merging of this PR.
Written by @ShaunD137 and edited by @JoelLucaAdams