refactor lazy arrays, upgrade to fpl.NDWidget#190
Conversation
|
docs failing because this breaks compatability with old imagewidget that's used for the docs gallery |
2c2c34f to
c999384
Compare
| background_trace = np.mean(self._fluctuating_background_array[:, row_start:row_stop, col_start:col_stop], axis = (1, 2)) | ||
| ac_trace = np.mean(self._ac_array[:, row_start:row_stop, col_start:col_stop], axis = (1, 2)) | ||
|
|
||
| self._ndw[self._trace_panels[0]][self._trace_panels[0]].data = fpl.utils.functions.heatmap_to_positions(pmd_trace[None, :], x_data) |
There was a problem hiding this comment.
@kushalkolar updating data in NDWidget is nice. You can access an NDImage or NDPositions object (like I've done here). It's data setter will access the underlying NDProcessor data and update it, and there's a re-draw that gets triggered. All good.
I find it weird that in order to auto-scale the subplot, I can't do the analogous thing: access the NDSubplot like:
self._ndw[self._trace_panels[0]].auto_scale()
I need to actually directly access the underlying figure subplot (like below). Think this is something we should change in the API?
There was a problem hiding this comment.
Can chat later about API. The "subplot" access that's direct from ndw is just access to the add_<ndg> methods. To get the actual subplot you need to do ndw.figure["subplot"].
…ecks canvas when deciding how to display
f9fe6a0 to
4fdea43
Compare
…pl utils functions
…idget needed for single session vis
…ode to not squeeze dimensions
* shift shape better block centers included * Includes code to do piecewise rigid moco visualization
* Fixes more bugs in AC Array * Fixes bug with centers and also massively accelerates the set roi average function by about 100x * Removes print * Initial commit containing some of the tracking code
* Fixes a small if vs elif statement in array interfaces * Includes code for constructing and using the graph laplacian to correct background vs signal misattribution * Includes full joint compression and detrending pipeline * Includes the option to rescale the a matrix that gets exported in ac array * Adds option to rescale export a in ac array and also adds all the filter steps
* Updates to the gradient motion corrector and fixes some issues with the standard 2p calcium pipeline on the infrastructure front * Updates the deletion threshold again
* Includes better representation for contours in ac array * Includes options for what summary image to display in demixing visualization, includes demixing overlay
|
Random 4am adhd thoughts: I think the some_mask_nmf_viz = ...
# read-only property
some_mask_nmf_viz.ref_index
# user creates some other ndwidgets, or other libs that use NDWidget accept a `ReferenceIndex` instance
ndw_beh = NDWidget(ref_index=some_mask_nmf_viz.ref_index)
# this is now sycned with the calciumFor this to work, the non-spatial dim names have to be:
|
* Includes code for running detrending in PMD, including mean reassignment * Returns the old filter code and makes the mask expansion much better * Includes min thresholding code implementation and update to the pipeline for 2p somatic data * Faster code for merging components, avoids quadratic runtime * Faster support expansion code * Further optimizations that accelerate the demixer by reusing computations across hals updates and reducing the number of fully expanded dense matrices * Broad commit that ensures the demixing vis shows correctly scaled traces, threholded data only looks at positive neg or unconstrained parts in mad thresholding and other improvements to calcium pipeline * Includes the right detrending code for 2p and 1p calcium data * Includes pipeline updates including multiunit stuff etc
…d also adds oasis deconvolution to masknmf
| rgb_dim="c", | ||
| name=image_panels[2]) | ||
|
|
||
| return ndw_corr.show() |
There was a problem hiding this comment.
better to return the ndw instance to the user for customization and so it can be closed later
closes #189
NDWidgetcompatability by adding__array__ArrayLikeslice(start, start + 1, 1)the dim on which the slice was used must remain in the array with size. Ex: we need[t, m, n]->[1, m, n]not[m, n].Don't know if this breaks other parts of the codebase, but I checked that the basics work with
NDWidget.Is the
FactorizedVideomainly for instance checks? It doesn't have any functionality beyondArrayLike?