From bcef4b4daeadd192aeb78c494ff22a02eaf0e10a Mon Sep 17 00:00:00 2001 From: juhuntenburg Date: Tue, 30 Apr 2024 12:07:27 +0200 Subject: [PATCH] keyword arguments in session loader --- brainwidemap/bwm_loading.py | 2 +- brainwidemap/decoding/00_data_caching.py | 6 +++--- brainwidemap/decoding/04_decode_single_session.py | 2 +- brainwidemap/decoding/decoding_example_script.py | 2 +- brainwidemap/meta/intro_figure_example_time_series.py | 2 +- data_loading_examples.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/brainwidemap/bwm_loading.py b/brainwidemap/bwm_loading.py index cc99d1c4..824c2e23 100644 --- a/brainwidemap/bwm_loading.py +++ b/brainwidemap/bwm_loading.py @@ -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() diff --git a/brainwidemap/decoding/00_data_caching.py b/brainwidemap/decoding/00_data_caching.py index d8dffcae..81aebbbe 100644 --- a/brainwidemap/decoding/00_data_caching.py +++ b/brainwidemap/decoding/00_data_caching.py @@ -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) @@ -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 @@ -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']) diff --git a/brainwidemap/decoding/04_decode_single_session.py b/brainwidemap/decoding/04_decode_single_session.py index 5e304459..966213d5 100644 --- a/brainwidemap/decoding/04_decode_single_session.py +++ b/brainwidemap/decoding/04_decode_single_session.py @@ -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 diff --git a/brainwidemap/decoding/decoding_example_script.py b/brainwidemap/decoding/decoding_example_script.py index 4d80c126..0ea153ca 100644 --- a/brainwidemap/decoding/decoding_example_script.py +++ b/brainwidemap/decoding/decoding_example_script.py @@ -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 diff --git a/brainwidemap/meta/intro_figure_example_time_series.py b/brainwidemap/meta/intro_figure_example_time_series.py index d08de702..77aba664 100644 --- a/brainwidemap/meta/intro_figure_example_time_series.py +++ b/brainwidemap/meta/intro_figure_example_time_series.py @@ -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) diff --git a/data_loading_examples.py b/data_loading_examples.py index 65e3aedb..f31d019c 100644 --- a/data_loading_examples.py +++ b/data_loading_examples.py @@ -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