Skip to content

Commit

Permalink
checkpoint passing
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Apr 10, 2024
1 parent 14fef28 commit 2dcc091
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 195 deletions.
152 changes: 76 additions & 76 deletions docs/gallery/general/plot_configurator.py
Original file line number Diff line number Diff line change
@@ -1,75 +1,19 @@
from datetime import datetime
from uuid import uuid4
from hdmf.term_set import TermSetWrapper, TermSet

import numpy as np
from dateutil import tz

from pynwb import NWBHDF5IO, NWBFile
from pynwb.behavior import Position, SpatialSeries
from pynwb.file import Subject
from pynwb import unload_type_config, load_type_config

load_type_config()
session_start_time = datetime(2018, 4, 25, 2, 30, 3, tzinfo=tz.gettz("US/Pacific"))
terms = TermSet(term_schema_path='/Users/mavaylon/Research/NWB/hdmf/docs/gallery/example_term_set.yaml')
# from datetime import datetime
# from uuid import uuid4
# from hdmf.term_set import TermSetWrapper, TermSet
#
nwbfile = NWBFile(
session_description="Mouse exploring an open field", # required
identifier=str(uuid4()), # required
session_start_time=session_start_time, # required
session_id="session_1234", # optional
experimenter=[
"Ryan Ly",
], # optional
lab="Bag End Laboratory", # optional
institution="University of My Institution", # optional
experiment_description="I went on an adventure to reclaim vast treasures.", # optional
related_publications="DOI:10.1016/j.neuron.2016.12.011", # optional
)
subject = Subject(
subject_id="01",
age="One shouldn't ask",
description="A human.",
species="Homo sapiens",
sex="M",
)

nwbfile.subject = subject

device = nwbfile.create_device(
name="array", description="the best array", manufacturer="Probe Company 9000"
)

nwbfile.add_electrode_column(name="label", description="label of electrode")

nshanks = 4
nchannels_per_shank = 3
electrode_counter = 0

for ishank in range(nshanks):
# create an electrode group for this shank
electrode_group = nwbfile.create_electrode_group(
name="shank{}".format(ishank),
description="electrode group for shank {}".format(ishank),
device=device,
location='Amygdala'
)
# add electrodes to the electrode table
for ielec in range(nchannels_per_shank):
nwbfile.add_electrode(
group=electrode_group,
label="shank{}elec{}".format(ishank, ielec),
location='Amygdala'
)
electrode_counter += 1

breakpoint()
# # nwbfile.subject = subject
# # breakpoint()
# unload_type_config()
# load_type_config()
# import numpy as np
# from dateutil import tz
#
# from pynwb import NWBHDF5IO, NWBFile
# from pynwb.behavior import Position, SpatialSeries
# from pynwb.file import Subject
# from pynwb import unload_type_config, load_type_config
#
# load_type_config()
# session_start_time = datetime(2018, 4, 25, 2, 30, 3, tzinfo=tz.gettz("US/Pacific"))
# terms = TermSet(term_schema_path='/Users/mavaylon/Research/NWB/hdmf/docs/gallery/example_term_set.yaml')
# #
# nwbfile = NWBFile(
# session_description="Mouse exploring an open field", # required
# identifier=str(uuid4()), # required
Expand All @@ -83,13 +27,69 @@
# experiment_description="I went on an adventure to reclaim vast treasures.", # optional
# related_publications="DOI:10.1016/j.neuron.2016.12.011", # optional
# )
#
#
# subject = Subject(
# subject_id="001",
# age="P90D",
# description="mouse 5",
# species="Mus musculus",
# subject_id="01",
# age="One shouldn't ask",
# description="A human.",
# species="Homo sapiens",
# sex="M",
# )
#
# nwbfile.subject = subject
#
# device = nwbfile.create_device(
# name="array", description="the best array", manufacturer="Probe Company 9000"
# )
#
# nwbfile.add_electrode_column(name="label", description="label of electrode")
#
# nshanks = 4
# nchannels_per_shank = 3
# electrode_counter = 0
#
# for ishank in range(nshanks):
# # create an electrode group for this shank
# electrode_group = nwbfile.create_electrode_group(
# name="shank{}".format(ishank),
# description="electrode group for shank {}".format(ishank),
# device=device,
# location='Amygdala'
# )
# # add electrodes to the electrode table
# for ielec in range(nchannels_per_shank):
# nwbfile.add_electrode(
# group=electrode_group,
# label="shank{}elec{}".format(ishank, ielec),
# location='Amygdala'
# )
# electrode_counter += 1
#
# breakpoint()
# # # nwbfile.subject = subject
# # # breakpoint()
# # unload_type_config()
# # load_type_config()
# #
# # nwbfile = NWBFile(
# # session_description="Mouse exploring an open field", # required
# # identifier=str(uuid4()), # required
# # session_start_time=session_start_time, # required
# # session_id="session_1234", # optional
# # experimenter=[
# # "Ryan Ly",
# # ], # optional
# # lab="Bag End Laboratory", # optional
# # institution="University of My Institution", # optional
# # experiment_description="I went on an adventure to reclaim vast treasures.", # optional
# # related_publications="DOI:10.1016/j.neuron.2016.12.011", # optional
# # )
# #
# #
# # subject = Subject(
# # subject_id="001",
# # age="P90D",
# # description="mouse 5",
# # species="Mus musculus",
# # sex="M",
# # )
# # breakpoint()
Loading

0 comments on commit 2dcc091

Please sign in to comment.