Skip to content

Commit

Permalink
move restiction when fetch_nwb from merge table into argument
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelbray32 committed Mar 14, 2024
1 parent 10bf4ac commit fb68e76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions notebooks/03_Merge_Tables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -503,7 +503,7 @@
}
],
"source": [
"uuid_key = LFPOutput.fetch(limit=1, as_dict=True)[-1]\n",
"uuid_key = (LFPOutput & nwb_file_dict).fetch(limit=1, as_dict=True)[-1]\n",
"restrict = LFPOutput & uuid_key\n",
"restrict"
]
Expand Down Expand Up @@ -546,7 +546,7 @@
}
],
"source": [
"result1 = restrict.fetch_nwb()\n",
"result1 = restrict.fetch_nwb(restrict.fetch1(\"KEY\"))\n",
"result1"
]
},
Expand Down Expand Up @@ -594,7 +594,7 @@
}
],
"source": [
"result2 = (LFPOutput & nwb_key).fetch_nwb()\n",
"result2 = LFPOutput().fetch_nwb(nwb_key)\n",
"result2 == result1"
]
},
Expand Down
8 changes: 4 additions & 4 deletions notebooks/py_scripts/03_Merge_Tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.16.0
# jupytext_version: 1.15.2
# kernelspec:
# display_name: spy
# language: python
Expand Down Expand Up @@ -137,17 +137,17 @@
# by referencing this or other features.
#

uuid_key = LFPOutput.fetch(limit=1, as_dict=True)[-1]
uuid_key = (LFPOutput & nwb_file_dict).fetch(limit=1, as_dict=True)[-1]
restrict = LFPOutput & uuid_key
restrict

result1 = restrict.fetch_nwb()
result1 = restrict.fetch_nwb(restrict.fetch1("KEY"))
result1

nwb_key = LFPOutput.merge_restrict(nwb_file_dict).fetch(as_dict=True)[0]
nwb_key

result2 = (LFPOutput & nwb_key).fetch_nwb()
result2 = LFPOutput().fetch_nwb(nwb_key)
result2 == result1

# ## Selecting data
Expand Down

0 comments on commit fb68e76

Please sign in to comment.