-
Notifications
You must be signed in to change notification settings - Fork 53
Refactor imwidget #459
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
Refactor imwidget #459
Conversation
…by character also updates old documentation
…e the function was only being applied to the first array
…e graphic now occurs outside of the for loop for running the window functions which is more efficient
… Z dimensions, also removes logic saying that window_funcs can be ints, they now have to be dictionaries or None
…nd also updates init docstring
…handling in __init__
…ies some of the slider dim logic to ensure all sliders come from t and z dims
… to be clearer in the window funcs code, and updates some comments
I think we can use the Currently fastplotlib/fastplotlib/widgets/image.py Lines 540 to 546 in 5ec3fb2
and then in fastplotlib/fastplotlib/widgets/image.py Lines 218 to 221 in 5ec3fb2
when iterating through each individual data array, we do something like this to prevent out of bounds indices for the data arrays which have fewer "t" or "z" items (ex. corr images) than the other data arrays (ex. movies). current_index = dict()
for k in self._current_index:
dim_ix = dict(reversed(ALLOWED_SLIDER_DIMS))[k]
current_index[k] = min(self._current_index[k], data.shape[dim_ix]) It'll be generally useful anytime the shapes are very different. Might want to raise a warning in the constructor and |
…num_scrollable_dims
… a list of indices which are to be displayed as rgba
…num to n for readability, makes rgb init parameter a list of boolean values
…length as number of arrays being displayed
…array so it can be applied in a modular fashion to each individual array
…ing the max length logic to reflect the mixed types and also adding explicit property for histogram_widget
@kushalkolar It seems the tests for pre-existing cells in image_widget_test.ipynb are failing. The rgba_to_rgb function seems to complain that the input has 2 indices but 3 indices are indexed etc. Let me know what you think, maybe we need to update the rgba_to_rgb function? Once we have that fixed, I can re-run to generate + update new screenshots. |
I've made this a full PR from the draft so the CI will run on GitHub actions, we can check the result tomorrow. |
* fefactor imwidget, restrict to tzxy, txy, xy, added RGB(A) support (#459) * add new iw test screenshots * update api docs --------- Co-authored-by: Amol Pasarkar <amolpasarkar@gmail.com>
* figure refactor seems to work * update nbs w.r.t. new figure * update test util * black * remove lingering uses of gridplot * update API doc generation * update contributing * typo Co-authored-by: Caitlin Lewis <69729525+clewis7@users.noreply.github.com> * Iw refactor (#482) * fefactor imwidget, restrict to tzxy, txy, xy, added RGB(A) support (#459) * add new iw test screenshots * update api docs --------- Co-authored-by: Amol Pasarkar <amolpasarkar@gmail.com> * figure refactor seems to work * update nbs w.r.t. new figure * update test util * black * remove lingering uses of gridplot * update API doc generation * update contributing * typos * update iw with FIgure * update api docs * black * update quickstart * update iw examples * update iw type annotations * default cmap iw * remove gp docs * update readme * forgot to delete more api docs * I need to run nbs before committing them * more docs --------- Co-authored-by: Caitlin Lewis <69729525+clewis7@users.noreply.github.com> Co-authored-by: Amol Pasarkar <amolpasarkar@gmail.com>
Closes #284