-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
creating wrapping function for particle sizes to make things faster
- Loading branch information
1 parent
92defe2
commit 3be7505
Showing
2 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Interactive components within notebooks""" | ||
|
||
|
||
def slider_widget(function_call, slider_parameters): | ||
"""Creates a slider in the notebook, displays results of the input function | ||
Parameters | ||
---------- | ||
function_call: function established earlier in code | ||
slider_parameters: list of start, stop, and increment for slider to follow | ||
Examples | ||
--------- | ||
>>> urchin.ui.slider_widget(update_sizes_from_firing) | ||
""" | ||
try: | ||
import ipywidgets as widgets | ||
except ImportError: | ||
raise ImportError("Widgets package is not installed. Please pip install ipywidgets to use this function.") | ||
# widgets.interact(function_call, t=(slider_parameters[0],slider_parameters[1],slider_parameters[2])) |