Skip to content

Commit

Permalink
keyword arguments in session loader
Browse files Browse the repository at this point in the history
  • Loading branch information
juhuntenburg committed Apr 30, 2024
1 parent e839873 commit bcef4b4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion brainwidemap/bwm_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def load_trials_and_mask(
]

if sess_loader is None:
sess_loader = SessionLoader(one, eid)
sess_loader = SessionLoader(one=one, eid=eid)

if sess_loader.trials.empty:
sess_loader.load_trials()
Expand Down
6 changes: 3 additions & 3 deletions brainwidemap/decoding/00_data_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
else: # Oddly not problem with errors here, dont need BAD_EIDS like wheel or spike sorting
print(f"Downloading trials data for {eid}")
try:
sess_loader = SessionLoader(one, eid)
sess_loader = SessionLoader(one=one, eid=eid)
sess_loader.load_trials()
except Exception as e:
print(e)
Expand All @@ -80,7 +80,7 @@
continue
else:
print(f"Downloading wheel data for {eid}")
sess_loader = SessionLoader(one, eid)
sess_loader = SessionLoader(one=one, eid=eid)
sess_loader.load_wheel()

# Download whisker data for all sessions
Expand All @@ -93,5 +93,5 @@
continue
else:
print(f"Downloading motion energy data for {eid}")
sess_loader = SessionLoader(one, eid)
sess_loader = SessionLoader(one=one, eid=eid)
sess_loader.load_motion_energy(views=['left', 'right'])
2 changes: 1 addition & 1 deletion brainwidemap/decoding/04_decode_single_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"""

# load trials df
sess_loader = SessionLoader(one, eid)
sess_loader = SessionLoader(one=one, eid=eid)
sess_loader.load_trials()

# create mask
Expand Down
2 changes: 1 addition & 1 deletion brainwidemap/decoding/decoding_example_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"""

# load trials df
sess_loader = SessionLoader(one, eid)
sess_loader = SessionLoader(one=one, eid=eid)
sess_loader.load_trials()

# create mask
Expand Down
2 changes: 1 addition & 1 deletion brainwidemap/meta/intro_figure_example_time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def bwm_data_series_fig(sl, cnew=True):
illustrating time series and neural data for
3 example trials
'''
sl = SessionLoader(one, eid)
sl = SessionLoader(one=one, eid=eid)
sl.load_session_data()

example_block_structure(sl)
Expand Down
2 changes: 1 addition & 1 deletion data_loading_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


# To load other session data such as wheel, pose (DLC) and motion energy, we just use the SessionLoader, e.g.
sess_loader = SessionLoader(one, eid)
sess_loader = SessionLoader(one=one, eid=eid)
sess_loader.load_wheel(fs=1000)
# wheel is a dataframe that contains wheel times and position interpolated to a uniform sampling rate, velocity and
# acceleration computed using Gaussian smoothing
Expand Down

0 comments on commit bcef4b4

Please sign in to comment.