Skip to content

Commit 484d47f

Browse files
committed
added mini2
1 parent 40835f6 commit 484d47f

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

lecilab_behavior_analysis/plot_testing.ipynb

Lines changed: 13 additions & 2 deletions
Large diffs are not rendered by default.

lecilab_behavior_analysis/plots.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,18 +1019,25 @@ def plot_number_of_pokes_histogram(df: pd.DataFrame, port_number: int, ax: plt.A
10191019
return ax
10201020

10211021

1022-
def plot_port_holding_time_histogram(df: pd.DataFrame, port_number: int, ax: plt.Axes = None) -> plt.Axes:
1022+
def plot_port_holding_time_histogram(df: pd.DataFrame,
1023+
port_number: int,
1024+
ax: plt.Axes = None,
1025+
**kwargs) -> plt.Axes:
10231026
if ax is None:
10241027
ax = plt.gca()
10251028
port_hold_column = f"port{port_number}_holds"
10261029
column_checker(df, required_columns={port_hold_column})
10271030
# plot the histogram of the holding times
10281031
port_holds = df[port_hold_column].tolist()
10291032
port_holds = [item for sublist in port_holds for item in sublist]
1033+
if "bins" in kwargs:
1034+
bins = kwargs["bins"]
1035+
else:
1036+
bins = 100
10301037

10311038
sns.histplot(port_holds,
10321039
ax=ax,
1033-
bins=100,
1040+
bins=bins,
10341041
color="gray",
10351042
stat="probability",
10361043
kde=True)

lecilab_behavior_analysis/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ def get_outpath():
319319
"tudou": "/home/kudongdong/data/LeciLab/behavioral_data",
320320
"setup2": "/home/kudongdong/Documents/data/LeciLab/behavioral_data",
321321
"minibaps": "/archive/training_village",
322+
"minibaps2": "/archive/training_village",
322323
}
323324
return paths.get(hostname, "default/path")
324325

0 commit comments

Comments
 (0)