Conversation
… improve_plane_seg_coverage
Codecov Report
@@ Coverage Diff @@
## master #196 +/- ##
==========================================
+ Coverage 67.72% 69.54% +1.81%
==========================================
Files 32 33 +1
Lines 2947 3067 +120
==========================================
+ Hits 1996 2133 +137
+ Misses 951 934 -17
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
nwbwidgets/image.py
Outdated
| imageseries.starting_time | ||
| + get_frame_count(path_ext_file) / imageseries.rate | ||
| ) | ||
| tmin = 0 |
There was a problem hiding this comment.
why reset tmin to 0 every update?
There was a problem hiding this comment.
knowing the starting_time for video files other than the first one is not possible. Unless we assume the starting time to the end time for the last video in the sequence. But I don't think this would be a good approximation, so I have made the time_slider widget to span the video frames (0, num_frames) instead, only when the user requests video other than the first one. What do you think of this approach?
Check here https://github.com/NeurodataWithoutBorders/nwb-jupyter-widgets/blob/3add69ade68d62a7790abeac45f538e11c7ea7dc/nwbwidgets/image.py#L114
nwbwidgets/image.py
Outdated
| self.controls.update({key: widgets.fixed(val) for key, val in kwargs.items()}) | ||
| def get_children(self, *widgets): | ||
| set_widgets = [wid for wid in widgets if wid is not None] | ||
| return [self.figure, self.time_slider, *set_widgets] |
There was a problem hiding this comment.
a foreign time slider should not be included in the children
There was a problem hiding this comment.
In case there is a foreign_time_slider, then what is the best way to add another callback (update figure) ? The usual way of using foreign_time_slider.observe(set_figure) would overwrite the old callbacks.
One possible solution would be to link the values of foreign_time_slider to the new time_slider: widgets.jslink((foreign_time_slider,"value"),(time_slider,"value")) In effect, the time_slider would now be controlled by the foreign slider while keeping the functionality of being changed independently.
Check ae8e9cc

Updating the
ImageSeriesWidgetand makingTwoPhotonSeriesWidgetas a child class.ImageSeriesWidget:external_file:external_fileneeds to be viz.TwoPhotonSeriesWidget:ImageSeriesWidget