Skip to content

Commit

Permalink
Merge pull request #96 from holoviz-topics/public-docs-multi-ts
Browse files Browse the repository at this point in the history
Draft public docs for Multi-Channel timeseries set of workflows
  • Loading branch information
droumis authored Jun 12, 2024
2 parents 76c3be4 + b327775 commit 3d2c701
Show file tree
Hide file tree
Showing 28 changed files with 7,435 additions and 4,088 deletions.
171 changes: 72 additions & 99 deletions README.md

Large diffs are not rendered by default.

80 changes: 75 additions & 5 deletions benchmarks/create_ephys_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -29,7 +29,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -142,6 +142,76 @@
" mr.save_recording_generator(recgen, f'data/ephys_sim_neuropixels_{dur}s_384ch.h5')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Add channel names object"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/Users/droumis/data/ephys_sim_neuropixels/ephys_sim_neuropixels_1s_384ch.h5 num_channels: 384\n",
"channels object already present.\n",
"/Users/droumis/data/ephys_sim_neuropixels/ephys_sim_neuropixels_10s_384ch.h5 num_channels: 384\n",
"channels object already present.\n",
"/Users/droumis/data/ephys_sim_neuropixels/ephys_sim_neuropixels_100s_384ch.h5 num_channels: 384\n",
"channels object added successfully.\n",
"channels object already present.\n",
"/Users/droumis/data/ephys_sim_neuropixels/ephys_sim_neuropixels_200s_384ch.h5 num_channels: 384\n",
"channels object added successfully.\n",
"channels object already present.\n"
]
}
],
"source": [
"import h5py\n",
"from pathlib import Path\n",
"\n",
"durations = [1, 10, 100, 200]\n",
"\n",
"for dur in durations:\n",
" # Open the existing HDF5 file in append mode\n",
" H5_PATH = Path(f'~/data/ephys_sim_neuropixels/ephys_sim_neuropixels_{dur}s_384ch.h5').expanduser()\n",
" with h5py.File(H5_PATH, 'a') as f:\n",
" num_channels = f['channel_positions'].shape[0]\n",
" print(H5_PATH, 'num_channels:', num_channels)\n",
" # skip if 'channels' object already exists\n",
" if 'channels' in f:\n",
" print(\"channels object already present.\")\n",
" else:\n",
" f.create_dataset('channels', data=list(range(384)))\n",
" print(\"channels object added successfully.\") \n",
" "
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"PosixPath('/Users/droumis/data/ephys_sim_neuropixels_10s_384ch.h5')"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"H5_PATH"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -152,7 +222,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "neuro-eeg-viewer",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -166,9 +236,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.11.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
12 changes: 1 addition & 11 deletions workflows/image_stack/workflow_image-stack.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -370,16 +370,6 @@
"# TODO: Consider including additional advanced versions are in 231218_backup_workflow_image-stack.ipynb"
]
},
{
"cell_type": "markdown",
"id": "4905ce20-3c49-4631-b4b7-6676faa2d9e7",
"metadata": {},
"source": [
"## Conclusion\n",
"\n",
"This workflow represents our efforts to create a performant and easily adaptable tool for neuroscience imaging data visualization."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -405,7 +395,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3d2c701

Please sign in to comment.